App user flows
All built flows on this page are MERGED, NOT DEPLOYED; the app pack separately identifies the older staging baseline and wave-1-only routes. Current role configuration after Ron’s fix remains NOT VERIFIED. E:evidence.md:13-16,69-72 These are Binary Networks platform flows, including S.E.T questionnaires.
Roles and permission checks
| Person | Built permission scope |
|---|---|
| Staff admin | Client read/write/delete, user read/write, questionnaire write, response review, restore and view-as; platform:standards only survives the additional platform-organization gate. |
| Staff analyst | Client read/write, user read, response review and restore. No questionnaire builder or Standards Library permission. |
| Staff viewer | clients:read only. |
| Customer admin | portal:read, portal:write and portal:team for their admitted client. |
| Customer member | Role slug customer: portal:read and portal:write. |
| Customer viewer | portal:read only. |
| WorkOS default member | No permissions; this is not the customer role. |
Source: A:packages/shared/src/index.ts:90-126; platform permission filtering A:apps/api/src/auth/auth.guard.ts:222-244. WorkOS owns the actual role configuration; this is the reviewed code mapping. NOT VERIFIED — post-fix live role drift and MFA enforcement. Verify the next boot role comparison and hosted login for each role.
Every protected route must declare permissions. Missing declarations deny access. Unsafe methods require the configured web origin; view-as is read-only even for an admin. A:apps/api/src/auth/auth.guard.ts:256-289
Sign-in and MFA
The login and callback are implemented in A:apps/api/src/auth/auth.controller.ts:45-115. Actual WorkOS MFA settings are NOT VERIFIED. Staff MFA reset requires the staff user-management route and identity-confirmation input; customer team management has no MFA-reset route. A:packages/shared/src/index.ts:222-227,269-272 A:apps/api/src/users/portal-team.controller.ts:144-148
Users, roles and clients
Staff user reads need users:read; writes need users:write. Customer team reads need portal:read; team writes need portal:team and session-derived client scope. Client writes and deletes use different permissions. A:apps/api/src/users/users.controller.ts:118-251 A:apps/api/src/users/portal-team.controller.ts:29-148 A:apps/api/src/clients/clients.controller.ts:40-95
S.E.T questionnaires
Build/assign requires questionnaires:write; reading templates/copies requires clients:read. Answer/submit requires portal:write and active client admission. Review/return/accept uses responses:review; snapshot restore uses questionnaires:restore. Viewers can read only the routes their read permission allows. A:apps/api/src/questionnaires/questionnaires.controller.ts:37-147 A:apps/api/src/questionnaires/responses.controller.ts:74-148,290-407 A:apps/api/src/questionnaires/restore-points.controller.ts:116-129,187-200,231-242
See lifecycle for stale held edits, revision conflicts, notes, history and removed/type-changed questions.
Standards Library and PDF preview
The controller requires platform:standards. Only PDF gets inline disposition; other formats download. Preview framing is restricted to the web origin. Customers cannot access this library. A:apps/api/src/standards/standards.controller.ts:54-55,64-192 A:apps/api/src/app.ts:37-77
AI expert
APPROVED, IN BUILD, not built in the supplied app branch. Authorized platform staff open a standard square, ask against its prepared text, receive verified quotes plus labelled interpretation or an abstention. The permission is platform:standards; the square must be active. The AI data-flow diagram shows its boundaries. A:.set/work/P2.22.md:51-85,150-183
Notifications
The implemented questionnaire alert endpoints require questionnaires:write; this is not a general notification system available to every role. Alert-read and reminder tables back the feature. A:apps/api/src/questionnaires/alerts.controller.ts:16-35 A:apps/api/drizzle/tenant/0014_questionnaire_flow.sql:1-36
Differences from the locked flow specifications
Read the requirements in admin flows and customer flows. They describe a broader MVP/target surface. They are not staging evidence.
| Specification description | Current verified difference |
|---|---|
| Customer username/password sign-in page and Compliance dashboard landing | Hosted AuthKit is the implemented sign-in. Navigation has built and Soon entries; do not treat the full specification menu as implemented. Sources: local locked customer page, Logging in; A:apps/api/src/auth/auth.controller.ts:45-115; A:apps/web/src/nav.ts:61-132. |
| Questionnaire Completed / re-edit language | Code distinguishes Draft, Submitted and Accepted. Customer cannot reopen Accepted; staff must Return it. A:apps/api/src/questionnaires/responses.service.ts:507-571,1062-1090. |
| Broad AI-assisted generation and analytics | The reviewed AI expert is still approved design; no merged expert implementation or deployed evaluation is evidenced. A:.set/work/P2.22.md:3-10. |
| Customer standards reference versus staff Standards Library | These are different surfaces. The implemented platform library is permission-gated to platform staff, not customer uploads. A:apps/api/src/standards/standards.controller.ts:54-55; A:.set/work/decisions-2026-10-26.md:5. |