Frontend¶
An SPA under dashboard/, built with React 18 + TypeScript + Vite, on top
of Ant Design.
Commands¶
cd dashboard
npm ci
npm run dev # dev server — http://localhost:5173
npm run build # tsc && vite build
npm run preview # preview the production build locally
npm run lint # eslint .
npm run lint:fix # eslint --fix .
npm run prettier # format check
npm run prettier:fix # auto-fix formatting
npm run typecheck # tsc --noEmit
npm test # node:test
Configuration¶
VITE_API_BASE_URL: sets the backend address. Left empty in a Docker deployment; the SPA reaches the backend through the nginx proxy on the same origin..env.exampleis tracked as a template; the real.envis not committed to Git.
Build output¶
npm run build runs tsc type checking first (a type error stops the
build), then Vite produces the production bundle in dist/. This bundle
is served by nginx inside the Docker image (see Deployment).
Bundle size
Some chunks exceed 500 kB (Ant Design plus icon sets). This is not a build error; Vite only prints an informational warning.