frontend phase 5 & backend phase 12

This commit is contained in:
hamid
2026-07-09 03:05:14 +03:30
parent 465f75c29e
commit dc64472631
98 changed files with 11847 additions and 136 deletions
@@ -0,0 +1,27 @@
/**
* When true, the verification domain is served by the in-memory mock (apis/mockApi.ts) behind the
* VerificationApi seam. The b6 routes exist server-side, but — like `catalog` — the mock lets the full
* nurse flow (checklist → identity run → credential upload → under-review → admin-approval → verified
* badge + publish gate) demo standalone before the backend is reachable in this environment. Flip to
* false to hit the live endpoints — no hook/component changes (see
* dev/shared-working-context/reports/mocks-registry.md).
*/
export const USE_VERIFICATION_MOCK = true;
/**
* The checklist is **moderately fresh** — submitting a step changes it, and every mutation invalidates
* it, so a short staleTime avoids a refetch when B3 and B6 mount from the same cached query.
*/
export const VERIFICATION_STATUS_STALE_TIME = 30_000;
/** The public trust badge changes only on a step decision / suspension / expiry — keep it warm longer. */
export const TRUST_BADGE_STALE_TIME = 5 * 60_000; // 5 min
export const TRUST_BADGE_GC_TIME = 30 * 60_000; // 30 min
/** Client-side document guardrails (mirrors the b6 `IObjectStorage` limits). jpg/png/pdf, 5 MB cap. */
export const ACCEPTED_DOCUMENT_TYPES: readonly string[] = ['image/jpeg', 'image/png', 'application/pdf'] as const;
export const ACCEPTED_IMAGE_TYPES: readonly string[] = ['image/jpeg', 'image/png'] as const;
export const MAX_DOCUMENT_SIZE_BYTES = 5 * 1024 * 1024; // 5 MB
/** The national-ID is a 10-digit code with an official checksum — validated before the KYC run. */
export const NATIONAL_ID_LENGTH = 10;