Setup
Prerequisites
- Node.js 22+ (repo is developed on Node 24;
.nvmrcpins 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
| Command | What 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 lint | ESLint across all workspaces |
npm run test | Vitest unit tests (@enode/core) |
npm run typecheck | tsc over the whole monorepo |
Documentation commands
| Command | What it does |
|---|---|
npm run storybook | Storybook dev server (:6006) |
npm run docs:build | Build the full documentation website |
npm run docs:serve | Serve the built docs site (:4000) |
npm run docs:check | Lint + typecheck + docs build (CI gate) |
See Testing for the docs build/check pipeline.