CodeVetter · Repo Unpack · System map
redwoodjs/redwood
The repository contains framework packages, generated application templates, integration fixtures, task tooling, and a separate Docusaurus documentation application. Application runtime boundaries divide browser rendering from API execution, with Prisma clients owned by applications. Fastify hosts ordinary functions and a dedicated GraphQL Yoga integration, while a separate handler adapts Yoga to Lambda events. Root scripts coordinate package builds and tests through Nx; package manifests define the published entrypoints.
- The root is a private Yarn 4.6.0 workspace covering framework packages, adapters, authentication providers, CLI packages, and mailer components; create-redwood-rsc-app is explicitly excluded from that workspace list.
- Root build, test, test-ci, and test:types scripts dispatch Nx targets; tsconfig.json references internal, structure, API, server, auth, web, router, testing, prerender, GraphQL, forms, and codemod projects.
- The CLI publishes rw and redwood binaries from dist/index.js; source startup resolves --cwd, RWJS_CWD, or the nearest redwood.toml before loading application environment files.
- The browser entrypoint imports application root and routes through ~redwood aliases, then selects hydrateRoot for existing markup or createRoot for an empty redwood-app element.
- createServer constructs Fastify, creates request-scoped context, registers the generic API adapter, and separately imports compiled GraphQL options to register a Yoga server.
- createGraphQLYoga owns schema assembly and an ordered Envelop plugin chain covering authentication, context, directives, Armor, operation filtering, trusted documents, errors, readiness, and logging.
- Database clients are application-owned: the todo fixture constructs PrismaClient in src/lib/db.js and its service performs queries and mutations against db.todo.
- The server executable defaults NODE_ENV to production and provides combined, api-only, and web-only modes; the Lambda GraphQL wrapper instead translates API Gateway events into yoga.fetch requests.
- The router publishes ESM and CommonJS exports plus react-server conditionals for RSC routing; its dependencies pin a React 19 release candidate.
- Documentation is a separate Docusaurus application with build, serve, start, and deploy scripts; its maintenance instructions identify docs/docs as the editable source.