DDARE Docs
Tutorials

Frontend Quick Start

Run the frontend locally: install, set two env vars, and start the dev server.

In about two minutes you will have the frontend running on http://localhost:5173 against a local backend. To deploy to a server, see docs/how-to/deploy.md.

Prerequisites

  • Node.js 22+. The full npm run build also builds the docs site, which needs 22.
  • A running DARE backend on http://localhost:8000 (see dare-backend). To run the whole platform at once, follow the backend's getting started tutorial.

1. Clone the repo

git clone https://github.com/cmudco/dare-frontend.git
cd dare-frontend

2. Install dependencies

npm install

npm ci also works and installs exactly what package-lock.json pins.

3. Configure the environment

The defaults point at a backend on http://localhost:8000.

cp .env.example .env

If your backend runs elsewhere, set VITE_DJANGO_BACKEND_URL in .env; REST and Socket.IO both use it. docs/reference/configuration.md lists every variable.

4. Start the dev server

npm run dev

Verify

Open http://localhost:5173 and sign in. The page hot-reloads when you save a file.

Scripts

CommandWhat it does
npm run devVite dev server on port 5173
npm run app:buildtsc -b and vite build into dist/; the real type check
npm run buildapp:build, then builds docs-site/ and copies it into dist/docs and dist/_next
npm run previewServe the built dist/ locally
npm run lintESLint over the repo, failing on any warning
npm run docs:syncCopy these docs and ../dare-backend/docs into docs-site/content/docs
node scripts/test-ensemble-state.mjsThe ensemble reducer test (node:test)

Do not run npm run format: it rewrites every file in the repo. Format the files you changed with npx prettier --write <files>.

Troubleshooting

  • The UI loads but shows empty state or auth errors. The backend is not reachable. Check it answers on http://localhost:8000 and that VITE_DJANGO_BACKEND_URL points at it.
  • Chat never streams. Check the /socket.io/ request to the backend in the browser's network panel. A failed handshake or a CORS rejection leaves the Vite log looking clean.
  • /docs returns the app instead of the docs. The dev server serves the docs from docs-site/out, which exists only after npm run build (or npm run docs:build).

On this page