Bỏ qua, đến nội dung

@digiforce-nc/plugin-mobile-client

Plugin mobile client SDK — cung cấp API và SDK cho ứng dụng mobile native (React Native, Flutter) hoặc WebView container kết nối với Digiforce server.

Plugin này làm gì?

Khác với plugin-digiforce-mobile (responsive web), plugin này cung cấp API layer tối ưu cho mobile native: authentication flow phù hợp mobile (biometric, token refresh), data sync offline → online, push notification registration, chunked file upload, và response nén — tất cả được thiết kế cho bandwidth thấp và pin hạn chế.

Sáu tính năng chính

#Tính năngChi tiết
1Mobile authĐăng nhập tối ưu: biometric (FaceID/TouchID), secure token storage, auto refresh
2Data syncĐồng bộ dữ liệu offline → online với conflict resolution
3Push tokenĐăng ký device token cho FCM (Android) / APNs (iOS)
4Chunked uploadUpload file lớn với resume support (tránh timeout trên 3G/4G)
5Compressed APIResponse nén gzip/brotli để tiết kiệm bandwidth
6SDKClient SDK cho React Native và Flutter

Kiến trúc

Luồng authentication mobile

API endpoints

EndpointMô tả
mobile:authĐăng nhập / refresh token (mobile-optimized)
mobile:syncData sync endpoint (delta sync, batch support)
mobile:registerDeviceĐăng ký device push token (FCM/APNs)
mobile:uploadChunked file upload với resume
mobile:configLấy cấu hình app cho mobile (menus, theme, features)

Thành phần client

Thành phầnMô tả
MobileSDKSDK JavaScript cho React Native / WebView
SyncManagerQuản lý offline queue và sync logic
PushManagerĐăng ký và xử lý push notification
ChunkedUploaderUpload file theo chunks với progress tracking

Dependencies

PackageVai trò
@digiforce-nc/serverServer framework
@digiforce-nc/databaseDatabase ORM
@digiforce-nc/authAuth framework (token management)

Mục lục chi tiết

(Xem trang tổng quan ở trên)