Pich logoPichdocs
Docs menu: System overview

Architecture

System overview

One Vercel app: the page, four API routes, SERV, GitHub, and the fixtures.

Pich is one Next.js app on Vercel. The page and four API routes ship together; there is no separate backend, database, or queue.

components
Browser (src/app/page.tsx, src/components/pich/workflow.tsx)
   │
   ├─ POST /api/compile     → SERV Reasoning → validateChecklist()
   ├─ POST /api/check       → evaluate() on 8 bundled fixtures
   ├─ POST /api/check-repo  → GitHub (read only) → evaluate()
   └─ POST /api/explain     → evaluate() → SERV Reasoning
ComponentOwnsDoes not own
PageThe 4-step flow, display of checklist, verdicts, evidence, notesAny verdict logic or secrets
SERV ReasoningReading advisory prose into a checklist; wording the client noteThe verdict, file reading, the final checklist (validation can drop items)
validateChecklist()Rejecting non-verbatim quotes, unknown predicates, invalid ranges; polarity correctionDeciding what the advisory means
evaluate()Observing predicates in files and choosing the verdictFetching files, calling SERV
GitHub readerFetching an allowlist of files as text from a public repoInstalling, building, or running anything
Fixtures8 demo apps bundled into the buildReal client data

Source: src/app/api, src/lib.

Edit this page on GitHub