Skip to main content

Setup

Prerequisites

  • Node.js 22+ (repo is developed on Node 24; .nvmrc pins 22 for CI/deploy).
  • npm with workspaces (the lockfile is package-lock.json).

Install

npm install

A single root install hoists dependencies for every workspace and the documentation tooling.

Develop

The repo is a monorepo; pick an app:

npm run dev tracking # @enode/tracking → http://localhost:3000
npm run dev portal # @enode/portal → http://localhost:3001
npm run help # list all commands

In dev, next.config.ts proxies /api/* to https://developapi.enode.ai so the browser sees same-origin requests (no CORS). The tracking app also raises --max-http-header-size for an endpoint with oversized headers.

Each app opens on a login gate. Authenticate with backend credentials to reach the main feature.

Repo-wide commands

CommandWhat it does
npm run dev <app>Dev server for tracking (:3000) or portal (:3001)
npm run build <app>Production build → static export in the app's out/
npm run run <app>Serve the built out/
npm run lintESLint across all workspaces
npm run testVitest unit tests (@enode/core)
npm run typechecktsc over the whole monorepo

Documentation commands

CommandWhat it does
npm run storybookStorybook dev server (:6006)
npm run docs:buildBuild the full documentation website
npm run docs:serveServe the built docs site (:4000)
npm run docs:checkLint + typecheck + docs build (CI gate)

See Testing for the docs build/check pipeline.