The repository is configured as an npm workspaces monorepo. The root package.json declares two workspace packages:
Running npm install at the repo root hoists shared dependencies and installs both packages in a single pass.
astro-app
The Astro frontend. Responsible for all public pages, the authenticated portal, block rendering, and Cloudflare edge integration.
Key dependencies
studio
Sanity Studio v5. Responsible for content editing, schema definition, and Visual Editing presentation.
Key dependencies
Root workspace
The root package.json is not a publishable package. It owns shared developer tooling and orchestrates both child packages.
Root scripts
How packages relate
studio defines the content schema. astro-app consumes it at build time via GROQ queries.
astro-app embeds stega metadata in rendered strings so Sanity Studio’s Presentation tool can map visible elements back to their schema fields.
- The root workspace orchestrates both:
npm run dev starts both dev servers via concurrently, and npm run test builds astro-app before running Playwright.
npm workspace command patterns
Run a script in a specific package:
Install a dependency into a specific package:
Never run npm install inside a child package directory. Always run it from the repo root so the workspace hoisting stays consistent and both lockfiles remain in sync.