Skip to main content

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

Purpose: Decision rules for when to use modal-based vs page-based flows for Create/Read/Update/Delete operations.

Decision Matrix

Criteria→ Modal→ Page / Wizard
Field count≤ 5 fields> 5 fields
Sub-entitiesNoneHas nested items (budget lines, team members)
Workflow stepsSingle stepMulti-step wizard
Context retentionUser needs to see list behindUser focuses on creation
Data complexitySimple flat recordComplex relationships or uploads

Current Application

FeatureActionRationale
ExpensesAdd/Edit expense≤ 5 fields, quick entry, list context needed
ContactsAdd/Edit contactSmall form, list visible behind
JournalsQuick time entryFew fields, rapid data entry
ProjectsQuick add projectInitial creation is simple
ComplianceAdd policySmall form

Page-Based (correct usage)

FeatureActionRationale
Grant ApplicationFull applicationMulti-step wizard, complex sub-entities
Project SetupDetailed setupNested budget lines, team members
OnboardingOrg setup wizardMulti-step, focused flow
Grant DiscoveryDetail viewRead-heavy, full-page context needed
SettingsAll settings tabsMultiple sections, focused editing

Wizard-Based (correct usage)

FeatureActionRationale
Organization CreationOnboarding wizard4+ steps, progressive disclosure
Expense WizardGuided expense entryStep-by-step with receipt upload
ClassificationOrg classificationMulti-step decision tree

Rules for New Features

  1. Default to modal for simple CRUD (≤ 5 fields, no sub-entities)
  2. Use page when the form exceeds 5 fields or has nested collections
  3. Use wizard when there are 3+ sequential steps with validation between them
  4. Never mix — a single entity type should use one pattern consistently
  5. Confirmation modals are always modal (via useConfirmDialog)
  6. Detail/read views are always page-based

Anti-Patterns

  • Opening a full page for a 3-field form (use modal)
  • Cramming 10+ fields into a modal (use page)
  • Using different patterns for create vs edit of the same entity
  • Skipping confirmation dialogs for destructive actions