Architecture
How the monorepo fits together.
A pnpm + Turborepo monorepo, TypeScript-first (Python only for ML where needed).
| Package | Responsibility |
|---|---|
@matchwire/schema | Canonical Zod contracts + boundary projectors |
@matchwire/db | Postgres + pgvector + Drizzle data layer |
@matchwire/rag | Chunking, embeddings, vector/hybrid search, eval |
@matchwire/agent | Agent harness (AI SDK) + model routing |
@matchwire/mcp | MCP server (the agent-to-agent surface) |
@matchwire/prompts | Prompt templates |
@matchwire/jobs | Durable background jobs (Graphile Worker) |
@matchwire/cache | Upstash Redis cache + rate limiting |
@matchwire/storage | S3-compatible object storage (MinIO self-host) — unwired: zero consumers (ADR-0050) |
@matchwire/observability | Langfuse / OpenTelemetry tracing |
@matchwire/evals | Prompt / RAG evaluation gates |
@matchwire/vc | Stateless verifiable-credential engine (SD-JWT VC / VC-JWT) |
packages/ee | Enterprise Edition seam (commercial — not AGPL) |
apps/web | React Router 7 frontend |
apps/backend | Agent-core HTTP service (typed REST + MCP) |
apps/docs | Documentation site (Fumadocs) |
apps/web-e2e | Playwright end-to-end suite for apps/web |
Decisions are recorded as ADRs in docs/decisions/.