Prerequisites#
- Node 24+ (
enginesinpackage.json;.nvmrcpins the version). - Dependencies installed —
test -d node_modules || npm install. - An
.env— copy.env.exampleif it's missing. The one value that matters for a working app isNEXT_PUBLIC_ROBOSYSTEMS_API_URL(defaulthttp://localhost:8000). - The backend API running. This app is a client; without the API, pages render but every authenticated route fails. Start it with
/devin therobosystemsrepo (Docker stack, API on:8000). Point at a deployed API instead by settingNEXT_PUBLIC_ROBOSYSTEMS_API_URL— but noteNEXT_PUBLIC_*is read at build/start, so changing it needs a server restart, not just a page reload.
Start#
npm run devServes on http://localhost:3000 (the port is pinned in the script, not left to Next's fallback scan — a stale process on 3000 makes the start fail rather than silently move to 3001).
Run it as a background command rather than appending & — a foreground dev server blocks until killed. Then wait for the "Ready" line before hitting the app.
Next 16 uses Turbopack for next dev. If you hit a bundler-specific failure (a plugin or loader that hasn't caught up), fall back with:
npm run dev:webpackThat's a diagnostic, not a default — if webpack fixes it, the bug is worth reporting rather than working around permanently.
Verify#
curl -sf http://localhost:3000/api/utilities/health && echo OKThis is the same endpoint the deploy pipeline health-checks. It reports that the Next server is up — it does not check the RoboSystems API. Confirm that separately:
curl -sf http://localhost:8000/v1/status && echo API OKRelated services#
| Service | Port | Notes |
|---|---|---|
| robosystems-app | 3000 | this app |
| roboledger-app | 3001 | sibling frontend, SSO cross-navigation |
| roboinvestor-app | 3002 | sibling frontend, SSO cross-navigation |
| RoboSystems API | 8000 | started by /dev in the robosystems repo |
The NEXT_PUBLIC_ROBO*_APP_URL variables drive cross-app links; a link that 404s locally usually means the sibling app just isn't running, not that the link is wrong.
Alternatively the backend repo can run this app in Docker under its apps profile (robosystems-app container, same port 3000) — useful for testing the container image, but slower to iterate than npm run dev and it will collide on port 3000 with a local dev server.
When it doesn't come up#
- Port 3000 in use → find and stop the stale process (
lsof -ti:3000); don't just move ports, since the Turnstile and SSO URLs assume 3000. - Module not found after a
@robosystems/coreor@robosystems/clientbump →npm install, and checkvitest.config.tsaliases if it's only tests that break. - CAPTCHA blocking a form →
.env.exampledocuments Cloudflare's test keys;1x00000000000000000000AAalways passes, or leaveNEXT_PUBLIC_TURNSTILE_SITE_KEYempty to disable. - Auth loops or 401s on every page → the API isn't running, or
NEXT_PUBLIC_ROBOSYSTEMS_API_URLpoints somewhere else. Check it before debugging the app. - Styles missing for a shared component →
@robosystems/coremust be in the Tailwindcontentglobs (node_modules/@robosystems/core/**/*.js); a rework oftailwind.config.tsthat drops it silently unstyles core components.