2.4 KiB
sxchnge_kyc
Shared Flutter identity verification and backend-owned visible limits. Both web and future mobile clients consume the same models, providers and service contracts.
IdentityProvidercoordinates draft photos, validation errors, submission, refresh and semantic analytics. InjectIdentityServiceandPhotoService.LimitsProviderfetchesLimitsServicemodels; it does not calculate caps from a client-selected status. Refresh after status updates. Existing values are marked stale after an error; out-of-order responses cannot replace newer data.DummyIdentityServicekeeps only review metadata in memory.DummyLimitsServicemimics backend policy with explicitly illustrative EUR fixtures. Neither is production authorization.reviewexists only on the dummy service.FilePhotoServiceopens the platform picker and validates JPEG/PNG content, 10 MiB size, minimum 600px per dimension, maximum 40 megapixels and decodability. It performs no face matching, OCR or identity approval. Camera capture is not implemented; users can take a photo separately and select it.- Photo models are transient; clients must dispose providers and evict sensitive image cache entries. No disk, browser storage, network or document telemetry is used by these stubs. No guarantee of cryptographic memory erasure is made.
Replace both identity and limits services when connecting a backend. A submit adapter must reuse the supplied idempotency key across retries, scope requests to the authenticated account, map safe errors and return server-confirmed status. Numeric values use minor currency units (currently a two-decimal currency fixture); extend the transport with currency precision before supporting other units.
The app's /identity route is an explicitly public demo, not an authenticated
account endpoint. Production requires session/email guards, server authorization,
private document storage, staff review and support integration. See
the UX/measurement contract.
Validation: flutter pub get, flutter analyze, flutter test.
Photo selection uses Flutter's file_selector and image metadata decoding. For native macOS consumers enable the user-selected read-only file entitlement; iOS/Android camera permissions are not required for this file-picker-only flow.