Engineering
The three repos
What lives inside screver-ma-app, screver-ma-ai, and screver-ma-docs.
screver-ma-app
Next.js 15 + Payload 3.77 + Postgres 17. Owns the data, auth, and the reviewer workflow.
src/payload.config.ts— Payload config.src/collections/— Tenants, Launches, Documents, Parameters (the evidence base), AuditEvents (append-only), AgencyProfiles, Users, Media.src/app/(payload)/— the Payload admin and REST/GraphQL routes.src/app/(app)/app— the ported prototype app (served at/app).src/app/wizard-api/route.ts— server-side proxy to the AI service.src/prototype/— the ported prototype:source/(vendored prototype scripts),PrototypeApp.generated.jsx(the concatenated client bundle, produced byscripts/build-prototype.mjs),bridge.ts(window.SCREVER— login + reviewer writes + Wizard ask), andtokens.css(the design system).scripts/seed.ts— the Cygnus / Velora demo seed.
The prototype was ~36 browser scripts sharing one global scope. Rather than rewrite it, the build concatenates them — in the original load order — into one client module; shared module scope reproduces the shared global scope. Two cross-file name collisions were renamed; that's the only edit.
screver-ma-ai
Express + Anthropic SDK. Stateless; owns no database; holds the only Anthropic key.
src/routes/chat.ts—POST /chat: grounds the prompt against the corpus, callsclaude-sonnet-4-6, cites[DOC-n], refuses ungrounded answers, and returns a tool-widget intent.src/corpus/— the bundled grounding corpus and term-overlap retrieval.src/wizard/intent.ts— keyword to tool-widget classifier.src/middleware/auth.ts— service-secret + forwarded-identity guard.
screver-ma-docs
This site — Fumadocs on Next.js. Content in content/docs/**; sidebar order in meta.json.