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.

Tooling Quick Reference

Single-page reference for all development tooling, commands, ports, and configuration.

CLI Commands

Development

CommandDescription
npm run dev:all:freshStart emulators + dev server (clears data first)
npm run dev:startStart Firebase emulators + seed data (Terminal 1)
npm run devStart Vite dev server (Terminal 2)
npm run dev:freshEmulators with fresh data
npm run seed:emulatorsSeed emulator with test data

Building

CommandDescription
npm run buildProduction build
npm run build:stagingStaging build
npm run build:productionProduction build (explicit)
npm run build:analyzeBuild + open bundle analysis
npm run previewPreview production build locally

Testing

CommandDescription
npm run testUnit tests (watch mode)
npm run test:runUnit tests (single run)
npm run test:coverageCoverage report
npm run test:uiVitest UI
npm run test:e2eE2E tests (Playwright)
npm run test:e2e:uiE2E with interactive UI
npm run test:e2e:headedE2E with visible browser
npm run test:e2e:debugE2E with debugger
npm run test:e2e:reportOpen last E2E report
npm run test:e2e:visualVisual regression tests
npm run test:backendBackend-specific tests
npm run test:firestore-rulesFirestore security rules tests

Linting

CommandDescription
npm run lintCheck for issues
npm run lint:fixAuto-fix issues

Deployment

CommandDescription
npm run deploy:stagingDeploy changed functions to staging
npm run deploy:productionDeploy changed functions to production
npm run deploy:staging:fullDeploy all functions to staging
npm run deploy:check-triggersVerify function trigger configuration

Health Checks

CommandDescription
npm run health:emulatorsCheck emulator health
npm run health:stagingCheck staging environment
npm run health:productionCheck production environment
npm run health:allCheck all environments

Ports

ServicePortNotes
Vite Dev Server3000Hardcoded — never change
Firebase Emulator UI4000Dashboard for all emulators
Functions Emulator5001Cloud Functions
Firestore Emulator8080Database
Auth Emulator9099Authentication
Storage Emulator9199File storage

Firebase Emulator URLs

ServiceURL
Emulator UIhttp://localhost:4000
Firestorehttp://localhost:4000/firestore
Authhttp://localhost:4000/auth
Storagehttp://localhost:4000/storage
Functions logshttp://localhost:4000/functions

Key Config Files

FilePurpose
vite.config.tsBuild config, aliases, plugins
tsconfig.jsonTypeScript config, path aliases
eslint.config.jsLinting rules, custom architecture guards
tailwind.config.tsTheme, colors, design tokens
firebase.jsonFirebase project config, emulator ports
firestore.rulesFirestore security rules
storage.rulesStorage security rules
.env.localLocal environment variables
.env.exampleTemplate for environment variables

Environment Variables

Required in .env.local (see .env.example for full list):
VariablePurpose
VITE_GEMINI_API_KEYGoogle Gemini API key
VITE_FIREBASE_*Firebase project config (apiKey, authDomain, etc.)
VITE_STRIPE_PUBLISHABLE_KEYStripe payments
VITE_POSTMARK_SERVER_TOKENEmail service
VITE_HUBSPOT_*HubSpot CRM integration
VITE_NOVU_*Notification service
VITE_SENTRY_DSNError monitoring

Useful One-Liners

# Run a specific test file
npx vitest run src/features/expenses/services/ExpenseService.test.ts

# Run tests matching a pattern
npx vitest run --grep "should create"

# Run a specific E2E test
npx playwright test tests/e2e/admin.spec.ts

# Clear emulator data and restart fresh
npm run dev:all:fresh

# Check what's running on a port
lsof -i :3000

# Generate architecture guard payload
npm run architecture:runtime-guards:generate

# Seed specific data
npm run seed:emulators     # Full seed
npm run seed:widgets       # Widget data only
npm run seed:contacts      # Contact data only
npm run seed:journals      # Journal data only

Workspace Structure

grantmaster/                # Root
├── src/                    # Main React app (Vite)
├── functions/              # Firebase Cloud Functions
├── packages/
│   ├── shared/             # Shared types and contracts
│   └── domain-schema/      # Domain Zod schemas
├── portal/                 # External portal app
├── apps/                   # Additional apps
├── tests/                  # E2E tests (Playwright)
├── scripts/                # Dev scripts, seeds, migrations
└── docs/                   # Documentation