Getting started
Get the school website running on your machine, prerequisites, install, a .env, and the dev server on :5173.
Getting the school website running is a ten-minute job once you know the two things the README won't tell you: this project runs on pnpm (not npm), and it needs a global CLI that isn't in package.json. Get those right and everything else is the usual install, .env, dev rhythm.
Before you start, hold one mental model in your head: the repo root is really two projects in one folder. The thing you boot here is the website frontend: React Router v7 in SSR mode, served by Vite on port 5173. The Sanity Studio lives in sanity/ with its own lockfile and its own dev server, and you start it separately. This page gets the frontend up; the Studio gets one step at the end and its own Setup page.
Don't trust the committed README
The repo's README.md is the stock "Welcome to React Router!" template. It tells you to run npm install / npm run dev and never mentions pnpm, the Studio, or the codegen CLI. Treat package.json and this handbook as the source of truth, and use pnpm, never npm/yarn/bun.
Step 1: Check your toolchain
| Tool | Target | Why this version |
|---|---|---|
| Node.js | 22 | Dockerfile uses node:22-alpine on every stage. There is no engines field. |
| pnpm | 11.12.0 | package.json packageManager is pnpm@11.12.0. Enable it through Corepack so you match the lockfile. |
chowbea-axios | A global install | The api:* scripts call chowbea-axios, and that package is not in dependencies or devDependencies. You do not need it to boot. The generated client is committed. |
The install commands below were read from package.json on 11 November 2026. They were not executed in that pass.
corepack enable
corepack prepare pnpm@11.12.0 --activateIf you hit native-module or Vite errors, check Node first
Because nothing in the repo enforces a Node version, the most common "works on my machine" gap is a mismatched Node. Align to 22 to match the Docker image before you debug anything deeper.
Step 2: Install the global codegen CLI
This is the step everyone misses. The site's typed API client is generated by a CLI called chowbea-axios, and that CLI is installed globally: it is not in package.json and won't appear in node_modules/.bin after pnpm install.
Install it once, globally:
pnpm add -g chowbea-axiosSkip this and every api:* script breaks
Without the global CLI, every pnpm api:* script (except the offline api:generate:fetch fallback) fails with command not found. You don't need to run codegen to boot the site, the generated files are committed, but the scripts are dead until this is installed. The full workflow lives in The API Client.
Step 3: Install frontend dependencies
From the repo root, the standard install pulls every frontend dependency:
pnpm installThis also runs the prepare script (husky) to wire up git hooks. Heads up: the only hook is a no-op, it echoes and exits, so it won't format or lint for you on commit. That's covered in Troubleshooting & Gotchas.
The Studio is not part of this install
pnpm-workspace.yaml has no packages: key, so sanity/ is excluded from the root workspace and carries its own pnpm-lock.yaml. Running pnpm install here installs the frontend only: you cannot reach the Studio with pnpm --filter. Step 6 installs it separately.
Step 4: Create your .env
Copy the committed .env.example to .env (or .env.local, if you keep secrets out of a file you might commit). Vite exposes VITE_* variables to the browser. SANITY_WRITE_TOKEN has no VITE_ prefix. The form route reads it on the server.
Start from .env.example
The repo ships .env.example at the root and sanity/.env.example for the Studio. .env and .env.local stay gitignored. Do not invent a token. Use placeholders until you have a development key.
Names in the root example: VITE_SANITY_PROJECT_ID, VITE_SANITY_DATASET, VITE_SANITY_API_VERSION, VITE_SANITY_STUDIO_URL, SANITY_WRITE_TOKEN, VITE_EDUCATION_HUB_URL, VITE_API_URL, VITE_NAALYA_API_KEY.
For a local API and Hub:
VITE_API_URL=http://localhost:8000
VITE_EDUCATION_HUB_URL=http://localhost:3000
VITE_SANITY_DATASET=development
VITE_NAALYA_API_KEY=your-local-publishable-keyVITE_NAALYA_API_KEY is a publishable API key from your local Hub. Sign in to the Hub as someone with the Software Developer role, open Development → API Keys (see Developer settings), create a Publishable key, and add http://localhost:5173 under Allowed origins. Without a key, the chat widget does not appear (widget.tsx) and the enquiry forms cannot post. See API tokens and Run the platform locally.
SANITY_WRITE_TOKEN is different. The form route reads it on the server from process.env (app/routes/api/form-submission.ts), and Vite does not load .env files into process.env. Putting it in .env is not enough. Export it in the same shell before you start the dev server:
export SANITY_WRITE_TOKEN=your-dev-write-token
pnpm devWithout it, a form submission logs SANITY_WRITE_TOKEN is not set; cannot store form submission. You only need it when you are testing form storage.
Copy the Sanity project id from sanity/sanity.config.ts or from .env.example. The Studio hardcodes dataset: "development". Match it. Do not point a local experiment at a production dataset.
VITE_API_URL is the host for enquiry posts and the public chat. It is also the Axios baseURL. The codegen watch URL in api.config.toml is a separate setting (api_endpoint). On the audited commit that value is https://tunnel.chowbea.com/docs/swagger/json. That tunnel is not the production host named in the API Railway config. See Environments.
The Dockerfile also declares build args that are not all in .env.example, including VITE_BASE_API_URL, VITE_BASE_URL, and the PostHog and GA4 names. A missing VITE_* becomes undefined. There is no env schema.
Step 5: Start the dev server
With dependencies and .env in place, you're ready to boot:
pnpm devThis runs react-router dev --host. Open http://localhost:5173 in your browser. That is the Vite default, and vite.config.ts doesn't override it. The --host flag also exposes the server on your LAN IP (0.0.0.0), handy for testing on a phone.
That's the site running. The other script you'll reach for is pnpm dev:all, which runs the API watcher and Vite together so the client regenerates whenever the backend spec changes, but you only need it when you're touching the API, so it's parked in The API Client.
A fresh clone boots without running codegen
The generated API files under app/services/api/_generated/ are committed, so the app type-checks and runs immediately. You only run pnpm api:fetch when the backend spec actually changes, not to get started.
Step 6: Run the Sanity Studio (separately)
The Studio is the second project in the folder, and because it's outside the workspace you install and run it from inside sanity/ with its own commands:
cd sanity
pnpm install # uses the Studio's own lockfile
pnpm dev # runs `sanity dev` on http://localhost:3333The Studio opens on http://localhost:3333 and connects to the same hdefozzv / development project your frontend reads. You don't need it running to develop most pages, but you do need it to edit content, and to create any singleton documents (like the homepage) that the frontend expects to exist.
Full Studio configuration, the Google Drive asset source, and the tooling differences (the Studio uses Prettier + ESLint, not Biome) all live in Sanity Setup.
You're running: now what?
A quick recap of the four things that actually matter on day one:
pnpm 11.12.0, not npm
packageManager is set. The README's npm instructions are wrong.
The global CLI
chowbea-axios is not a dependency. Install it only when you regenerate the client.
Copy .env.example
The template is committed. Keep real tokens out of git.
Two projects, two servers
Frontend on :5173, Studio on :3333, started separately.
Where to go next
How It's Built
The big-picture architecture before you dive into code.
The API Client
The chowbea-axios codegen workflow, in depth.
The Stack
Every dependency, every env var, and why each was chosen.
Project Structure
How the codebase is organized and the conventions to follow.
Sanity Setup
Configure and run the Studio in full.
Troubleshooting & Gotchas
The traps a new developer is most likely to hit.