Skip to content

Local development ​

Frontend ​

sh
cd front
npm install
npm run dev

The Vite script listens on port 6002. Set VITE_API_BASE_URL to the backend API base URL before running workflows that require network data.

Checks ​

sh
npm run lint
npm run test
npm run build

Run these from front/. The frontend test command uses tsx and runs src/**/*.test.ts. Current source includes a calculation test file in front/src/utils/__tests__/.

Documentation site ​

From the repository root:

sh
npm run docs:dev
npm run docs:build
npm run docs:preview

VitePress uses docs/ as its content root and docs/.vitepress/config.ts for site configuration.

Working safely ​

  • Keep actual secrets out of VITE_* variables and browser bundles.
  • Use frontend TypeScript types as the client-side contract only; confirm behavior with backend source before changing server assumptions.
  • Add regression tests for calculation changes.