CodeVetter · Repo Unpack · System map
keystonejs/keystone
The repository packages a configurable backend framework alongside authentication, document editing, Cloudinary integration, examples, and a documentation website. Core separates configuration/schema construction, Prisma-backed execution, Express/Apollo transport, and a generated Next.js Admin UI. Package publication and static website deployment have separate GitHub Actions workflows.
- The private monorepo pins pnpm 11.21.0; its workspace includes packages, examples, documentation, multiple test workspaces, and prisma-utils, with shared dependency versions in the catalog.
- The keystone executable imports @keystone-6/core/scripts; main() passes process.cwd() and CLI arguments to cli(), which dispatches dev, build, start, postinstall, and telemetry.
- Core's public index exports config, list, group, action, and GraphQL schema builders; its package exposes separate context, session, fields, testing, and Admin UI entrypoints.
- createContextSystem() initializes lists and Admin metadata, builds public/internal schemas, creates or accepts a Prisma client, and exposes connect()/disconnect(); connect() invokes db.onConnect after $connect().
- createExpressServer() owns the HTTP server and Apollo transport; Admin UI middleware is attached separately after Next preparation, allowing UI-disabled deployments.
- config() accepts PostgreSQL, SQLite, or MySQL; applications supply prismaClientOptions(), while schema/client/type paths and Prisma extension callbacks are normalized centrally.
- Root build uses Preconstruct, lint uses oxlint, types use tsc, document tests use Vitest, and tests2 uses node:test; prisma-utils separately verifies generated filter material.
- Packages publish through Changesets after pnpm build; the docs build validates links and generates llms material, while production website CI enables STATIC_EXPORT and deploys docs/out to GitHub Pages.