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
| Command | Description |
|---|
npm run dev:all:fresh | Start emulators + dev server (clears data first) |
npm run dev:start | Start Firebase emulators + seed data (Terminal 1) |
npm run dev | Start Vite dev server (Terminal 2) |
npm run dev:fresh | Emulators with fresh data |
npm run seed:emulators | Seed emulator with test data |
Building
| Command | Description |
|---|
npm run build | Production build |
npm run build:staging | Staging build |
npm run build:production | Production build (explicit) |
npm run build:analyze | Build + open bundle analysis |
npm run preview | Preview production build locally |
Testing
| Command | Description |
|---|
npm run test | Unit tests (watch mode) |
npm run test:run | Unit tests (single run) |
npm run test:coverage | Coverage report |
npm run test:ui | Vitest UI |
npm run test:e2e | E2E tests (Playwright) |
npm run test:e2e:ui | E2E with interactive UI |
npm run test:e2e:headed | E2E with visible browser |
npm run test:e2e:debug | E2E with debugger |
npm run test:e2e:report | Open last E2E report |
npm run test:e2e:visual | Visual regression tests |
npm run test:backend | Backend-specific tests |
npm run test:firestore-rules | Firestore security rules tests |
Linting
| Command | Description |
|---|
npm run lint | Check for issues |
npm run lint:fix | Auto-fix issues |
Deployment
| Command | Description |
|---|
npm run deploy:staging | Deploy changed functions to staging |
npm run deploy:production | Deploy changed functions to production |
npm run deploy:staging:full | Deploy all functions to staging |
npm run deploy:check-triggers | Verify function trigger configuration |
Health Checks
| Command | Description |
|---|
npm run health:emulators | Check emulator health |
npm run health:staging | Check staging environment |
npm run health:production | Check production environment |
npm run health:all | Check all environments |
Ports
| Service | Port | Notes |
|---|
| Vite Dev Server | 3000 | Hardcoded — never change |
| Firebase Emulator UI | 4000 | Dashboard for all emulators |
| Functions Emulator | 5001 | Cloud Functions |
| Firestore Emulator | 8080 | Database |
| Auth Emulator | 9099 | Authentication |
| Storage Emulator | 9199 | File storage |
Firebase Emulator URLs
| Service | URL |
|---|
| Emulator UI | http://localhost:4000 |
| Firestore | http://localhost:4000/firestore |
| Auth | http://localhost:4000/auth |
| Storage | http://localhost:4000/storage |
| Functions logs | http://localhost:4000/functions |
Key Config Files
| File | Purpose |
|---|
vite.config.ts | Build config, aliases, plugins |
tsconfig.json | TypeScript config, path aliases |
eslint.config.js | Linting rules, custom architecture guards |
tailwind.config.ts | Theme, colors, design tokens |
firebase.json | Firebase project config, emulator ports |
firestore.rules | Firestore security rules |
storage.rules | Storage security rules |
.env.local | Local environment variables |
.env.example | Template for environment variables |
Environment Variables
Required in .env.local (see .env.example for full list):
| Variable | Purpose |
|---|
VITE_GEMINI_API_KEY | Google Gemini API key |
VITE_FIREBASE_* | Firebase project config (apiKey, authDomain, etc.) |
VITE_STRIPE_PUBLISHABLE_KEY | Stripe payments |
VITE_POSTMARK_SERVER_TOKEN | Email service |
VITE_HUBSPOT_* | HubSpot CRM integration |
VITE_NOVU_* | Notification service |
VITE_SENTRY_DSN | Error 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