From 76c4979f36c1bb6b17e394c011dea91f6bc7f1f7 Mon Sep 17 00:00:00 2001 From: Anna Effort Date: Thu, 20 Aug 2026 10:30:26 -0700 Subject: [PATCH] docs: clarify which dev server serves the app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Available Scripts table described `npm run dev` as "Start development server" with no indication that it starts Vite on :5173 — a server with no BFF in front, where every /api/* call fails. The app you actually visit is the BFF on :3000, started by a different `npm run dev` inside server/. Getting Started already covers this (step 2, plus the note about :5173), but the scripts table is what gets skimmed when looking up how to run the project, and it contradicted that guidance. The table also omitted the BFF dev script and build:watch entirely, leaving no trace of the BFF. Disambiguate both `npm run dev` entries by directory, describe `npm run build` as the step that populates server/public/ for the BFF rather than just "Build for production", and add build:watch. Column widths reflow because the descriptions got longer. Signed-off-by: Anna Effort --- README.md | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index a88acb1..0142f9f 100644 --- a/README.md +++ b/README.md @@ -359,25 +359,31 @@ contextforge-web-ui/ ## Available Scripts -| Script | Description | -| ----------------------- | ---------------------------------------- | -| `npm run dev` | Start development server | -| `npm run build` | Build for production | -| `npm run generate` | Regenerate API types from `openapi.json` | -| `npm run preview` | Preview production build | -| `npm run lint` | Check for linting errors | -| `npm run lint:fix` | Auto-fix linting errors | -| `npm run format` | Format all files with Prettier | -| `npm run format:check` | Check formatting without changes | -| `npm run test` | Run tests in watch mode | -| `npm run test:run` | Run tests once (CI mode) | -| `npm run test:ui` | Run tests with UI | -| `npm run test:coverage` | Generate coverage report | -| `npm run e2e` | Run Playwright E2E tests | -| `npm run e2e:ui` | Playwright UI mode | -| `npm run e2e:debug` | Playwright Inspector | -| `npm run e2e:install` | Install Playwright browsers | -| `npm run e2e:report` | Open last Playwright report | +Run from the repo root unless noted. The app you actually visit is the BFF +on `:3000` — see [Getting Started](#getting-started) for the full three-process +setup. + +| Script | Description | +| ---------------------------- | ----------------------------------------------------------------------------------- | +| `npm run dev` (in `server/`) | **Start the BFF (`:3000`)** — serves the SPA and proxies `/api/*` to the API | +| `npm run dev` | Vite dev server (`:5173`), UI-only — no BFF in front, so `/api/*` calls won't work | +| `npm run build` | Build the SPA into `server/public/`, which the BFF serves (also the local dev loop) | +| `npm run build:watch` | Rebuild on change — the iteration loop when running against the real API | +| `npm run generate` | Regenerate API types from `openapi.json` | +| `npm run preview` | Preview production build | +| `npm run lint` | Check for linting errors | +| `npm run lint:fix` | Auto-fix linting errors | +| `npm run format` | Format all files with Prettier | +| `npm run format:check` | Check formatting without changes | +| `npm run test` | Run tests in watch mode | +| `npm run test:run` | Run tests once (CI mode) | +| `npm run test:ui` | Run tests with UI | +| `npm run test:coverage` | Generate coverage report | +| `npm run e2e` | Run Playwright E2E tests | +| `npm run e2e:ui` | Playwright UI mode | +| `npm run e2e:debug` | Playwright Inspector | +| `npm run e2e:install` | Install Playwright browsers | +| `npm run e2e:report` | Open last Playwright report | ## Internationalization (i18n)