Skip to content

Operations

Local stack commands

CommandPurpose
pnpm supabase:startstart local Supabase
pnpm supabase:stopstop local Supabase
pnpm supabase:restartrestart local Supabase
pnpm supabase:statusinspect running services
pnpm supabase:migrateapply migrations
pnpm seed:userscreate demo users and profiles
pnpm seed:ticketscreate demo tickets

Suggested rebuild flow

  1. pnpm install
  2. pnpm setup:env
  3. pnpm supabase:start
  4. pnpm supabase:migrate
  5. pnpm seed:users
  6. pnpm seed:tickets
  7. pnpm dev:stack

Smoke checks

  • API health returns { "ok": true }
  • classifier health is reachable
  • ticket submission works from the web app
  • a new ticket appears in the correct queue or triage path
  • notifications appear and can be marked read
  • stats pages load without backend errors

Demo and seed utilities

The stats router includes admin-only utilities intended for local demos:

  • reseed realistic tickets
  • reseed quick actions
  • clear tickets
  • clear notifications
  • expose current classifier URL and model id

These are useful for repeatable demos but should be treated as local or controlled-environment tools, not general production operations.

Operational invariants

  • The classifier service may fail, but ticket creation should still succeed.
  • Routing decisions must remain inspectable through stored confidence, reason, and audit data.
  • Human overrides should stay measurable through routing_overridden.
  • Agents should not lose situational awareness when live updates arrive out of band.

Docs maintenance

Update these docs when any of the following changes:

  • route inventory in apps/api/src/index.ts
  • routing thresholds or routing logic
  • Supabase migrations affecting ticket, notification, quick action, or profile shape
  • React route structure in apps/web/src/app/router.tsx
  • local development commands in the root package.json

Built from the current monorepo implementation.