Architecture

How the monorepo fits together.

A pnpm + Turborepo monorepo, TypeScript-first (Python only for ML where needed).

PackageResponsibility
@matchwire/schemaCanonical Zod contracts + boundary projectors
@matchwire/dbPostgres + pgvector + Drizzle data layer
@matchwire/ragChunking, embeddings, vector/hybrid search, eval
@matchwire/agentAgent harness (AI SDK) + model routing
@matchwire/mcpMCP server (the agent-to-agent surface)
@matchwire/promptsPrompt templates
@matchwire/jobsDurable background jobs (Graphile Worker)
@matchwire/cacheUpstash Redis cache + rate limiting
@matchwire/storageS3-compatible object storage (MinIO self-host) — unwired: zero consumers (ADR-0050)
@matchwire/observabilityLangfuse / OpenTelemetry tracing
@matchwire/evalsPrompt / RAG evaluation gates
@matchwire/vcStateless verifiable-credential engine (SD-JWT VC / VC-JWT)
packages/eeEnterprise Edition seam (commercial — not AGPL)
apps/webReact Router 7 frontend
apps/backendAgent-core HTTP service (typed REST + MCP)
apps/docsDocumentation site (Fumadocs)
apps/web-e2ePlaywright end-to-end suite for apps/web

Decisions are recorded as ADRs in docs/decisions/.