Documentation Index
Fetch the complete documentation index at: https://grantmaster.dev/llms.txt
Use this file to discover all available pages before exploring further.
Mobile Surface System
This document defines the shared mobile UI surfaces for GrantMaster so auth, list, detail, and create flows present one consistent operating language.Principles
- One surface pattern per job: list, detail, and form flows should not invent their own layout shells.
- Headers carry context: every screen uses a strong title and an optional subtitle that explains the operational purpose.
- Cards define sections: content lives in framed cards with consistent spacing, typography, and stacking.
- Status is explicit: progress, success, warning, and failure states use the same notice treatment.
- Actions stay predictable: primary actions live at the end of the flow and related quick actions group together.
Shared Primitives
Collection flows
Use collection surfaces for tab-level lists and libraries.CollectionSurface.tsxCollectionScreenCollectionCardCollectionActionRowCollectionEmptyStateCollectionLoadingState
- contacts, documents, expenses, grantors, journals tab screens
- any browse/select surface with repeated cards
Detail flows
Use detail surfaces for record inspection, summary, and operational history.DetailSurface.tsxDetailScreenDetailCardDetailFieldDetailLoadingState
- contact, document, expense, and journal detail routes
- future project, grantor, and approval detail routes
- first card explains the record itself
- later cards capture history, attachments, or related actions
- labels use compact uppercase-style treatment through
DetailField
Form flows
Use form surfaces for create, upload, and update flows.FormSurface.tsxFormScreenFormCardFormStatusNoticeOptionPills
- new contact
- log interaction
- upload document
- new expense
- new journal entry
- auth and account flows that should follow the same mobile operating language
- screen subtitle explains what the submission affects
- each
FormCardgroups one logical step - async progress and analysis feedback use
FormStatusNotice - compact selections use
OptionPillsinstead of hand-rolled chips
Auth flows
Use auth surfaces for sign-in, account creation, and password recovery.AuthScreens.tsxLoginScreenSurfaceSignupScreenSurfaceForgotPasswordScreenSurface
- login
- signup
- forgot-password
- auth remains on
FormScreenandFormCardso it shares the same spacing, typography, and notice language as other mobile workflows - secondary navigation uses lightweight text actions instead of inventing separate footer shells
- route files own the async auth logic and navigation, while the shared auth surfaces own presentation
Workflow shells
Use workflow screen surfaces for stateful create or upload routes whose route modules should not own layout decisions.WorkflowScreens.tsxContactCreateScreenSurfaceContactInteractionScreenSurfaceDocumentUploadScreenSurfaceExpenseCaptureScreenSurfaceJournalEntryScreenSurface
- new contact
- log interaction
- upload document
- new expense
- new journal entry
- route files own capture, mutation, and navigation state
- shared workflow surfaces own titles, subtitles, notices, and section order
- regression coverage should target the shared workflow surfaces instead of brittle stateful route modules
Migration Rules
- Do not compose new mobile screens from raw
Screen+SectionHeader+ ad hoc cards when a shared surface exists. - Prefer
CollectionActionRowover local flex rows for clustered actions. - Prefer
DetailFieldover inline label/value text pairs. - Prefer
FormCardover raw cards for form sections. - Prefer
FormStatusNoticeover one-off tinted text blocks.
Next Targets
- future edit flows should be built directly on
FormScreenor extracted screen-surface components before route logic grows - richer approval and review flows once they exist in mobile
- image-based mobile visual coverage on top of the current text snapshot lane
Verification
- shared surface snapshots live in
mobileSurfaceSystem.test.tsx - route-level snapshots live in
mobileRouteScreens.test.tsx - auth surface snapshots live in
authSurfaceSystem.test.tsx - workflow surface snapshots live in
workflowSurfaceSystem.test.tsx - run
npm --workspace @grantmaster/mobile run test:surfacesto verify the shared surface and mobile route baselines - run
npm --workspace functions run generate:router-typeswhenever backend router contracts change