Documentation Index
Fetch the complete documentation index at: https://grantmaster.dev/llms.txt
Use this file to discover all available pages before exploring further.
CRUD Interaction Matrix
Decision guide for when to use modal-based vs page-based flows for create, read, update, and delete operations.Decision Matrix
| Factor | Use Modal | Use Full Page |
|---|---|---|
| Form complexity | 1-5 fields, single section | 6+ fields, multi-section, tabs |
| Data dependencies | Self-contained, no sub-entities | Nested entities, file uploads, rich editor |
| Context preservation | User needs to see list behind | User focuses entirely on task |
| URL significance | No need to bookmark/share | Shareable/bookmarkable state needed |
| Workflow | Single-step action | Multi-step wizard |
| Frequency | Repeated quick actions | Infrequent, deliberate actions |
Current Feature Patterns
| Feature | Create | Edit | View | Delete | Pattern |
|---|---|---|---|---|---|
| Expenses | Modal (wizard) | Modal | Modal detail | Confirm dialog | Modal-first |
| Grants (Discovery) | N/A (external) | N/A | Full page | N/A | Page-based |
| Grants (Application) | Full page (wizard) | Full page | Full page | Confirm dialog | Page-based |
| Grants (Post-Award) | N/A | Full page | Full page | N/A | Page-based |
| Projects | Modal → Page | Full page (tabs) | Full page (tabs) | Confirm dialog | Hybrid |
| Users/Team | Modal (invite) | Modal | Modal detail | Confirm dialog | Modal-first |
| Organizations | Wizard (onboarding) | Modal (tabs) | Full page | Confirm dialog | Hybrid |
| Journals | Inline (calendar) | Inline/Modal | Full page (review) | Confirm dialog | Mixed |
| Grantors | Modal (editor) | Modal (editor) | Tab sub-pages | Confirm dialog | Modal-first |
| Relations/Contacts | Modal | Modal | Side panel | Confirm dialog | Modal-first |
| Reports | Full page (builder) | Full page | Full page (PDF) | Confirm dialog | Page-based |
| Compliance | Modal (rule) | Modal | Full page (dashboard) | Confirm dialog | Modal-first |
| Documents | Upload modal | Rename modal | Preview modal | Confirm dialog | Modal-first |
| Settings | Inline/Modal | Inline/Modal | Inline | Confirm dialog | Inline-first |
Recommendations
Keep as-is (patterns match the matrix well)
- Expenses — Quick, repetitive entries; modal makes sense
- Grants (Application/Post-Award) — Complex multi-section forms; page-based is correct
- Reports — Complex builder with rich output; page-based is correct
- Documents — Simple CRUD with preview; modal is correct
- Settings — Inline editing for quick config; appropriate
Already well-structured hybrids
- Projects — Quick create (modal) escalates to full page for detailed editing (tabs). This is a good progressive disclosure pattern.
- Organizations — Onboarding wizard for create, modal tabs for edit. Appropriate given the different contexts.
Guidelines for New Features
- Default to modal for entities with <6 fields and simple relationships
- Escalate to page when the form has tabs, nested entities, or file uploads
- Delete always uses confirm dialog (via
useConfirmDialoghook) - View/detail uses modal for list-context viewing, page for standalone deep-dive
- All modals use
<Modal>from@/components/ui/Modalwith<FormActions>in footer - All full-page forms include
<BackButton>from@/components/ui/BackButton