Skip to content

NodeJS in the Frontend

Node.js is used as the runtime for development tooling, package management and local builds for the frontend application. The project uses Node to run Vite, linters, test runners and TypeScript compilation.

Key uses

  • Development server: vite is run from the dev script in app/frontend/package.json and requires Node.js to execute.
  • Build: production bundling and TypeScript build (tsc -b && vite build) are executed via Node.
  • Tests and tooling: vitest for unit tests, eslint for linting and supporting dev dependencies are installed through npm/yarn.

Useful scripts (from app/frontend/package.json)

  • dev — start Vite dev server (fast HMR).
  • build — run TypeScript build and then produce production assets with Vite.
  • test / test:browser — run unit tests (and browser tests when configured).
  • lint — run ESLint across the frontend source.

Local environment

  • Node version: the project doesn’t pin a Node version in the repo; use a modern LTS (>= 18) matching the versions of the libraries in package.json.
  • Install dependencies from within app/frontend with your package manager of choice (npm/yarn/pnpm).

Where to look in the repo

  • app/frontend/package.json — scripts and dependencies.
  • app/frontend/vite.config.ts and app/frontend/tsconfig*.json — build configuration.

Notes

  • Environment variables for runtime are provided by Vite rather than Node-specific .env handling. See app/frontend/src/config.tsx for how VITE_API_URL is consumed in the app.