Developer guide Overview
Running locally
Commands, ports and AI credentials for development.
On this page
You need Node 24 and npm. The container image uses Node 24 too.
Install
From the repository root:
npm installThis installs both workspaces, app and server.
Start the development servers
npm run devThis runs three things:
npm run tokenscompiles the design tokens intodesign-system/dev/tokens.css.- The server starts with
tsx watch src/index.tson port1234. It restarts when a server file changes. - The app starts with Vite on port
5173, with hot reload.
Open http://localhost:5173. Vite proxies /api and /yjs to the server, so the app behaves as it does in production.
| Port | What runs there |
|---|---|
5173 |
The Vite dev server for the app. |
1234 |
The Archipelego server: sync, API and, after a build, the app. |
4173 |
The design system showcase, when you run it. See Design system workflow. |
Point the proxy at another server
Set ARCHIPELEGO_SERVER before you start the app to proxy to a server elsewhere. The default is http://localhost:1234.
ARCHIPELEGO_SERVER=http://192.168.1.20:1234 npm run dev -w appJoin from other devices
Vite listens on all interfaces (host: true in app/vite.config.ts). Open the LAN address that Vite prints on a tablet, a phone or the wall display. Everyone on the same canvas link joins the same room.
Build and run like production
npm run build
npm startThe server then serves the built app and the API together on port 1234. Set PORT to change it. See the admin guide for every environment variable.
Other useful commands
npm run typecheck # tsc for the app and the server
npm run tokens # recompile design-system/dev/tokens.css
npm run library # rebuild server/library/agentic-insurer.json
npm run llm-catalog # rebuild server/llm/catalog.jsonThe docs site
The documentation site has its own package. It is not part of the root workspaces.
cd docs-site
npm install
npm run buildThe output goes to docs-site/dist. The server serves it at /docs/, and /docs redirects there. The Vite dev server on port 5173 passes /docs to the server too. Set ARCHIPELEGO_DOCS to serve a site from another folder.
Set DOCS_BASE to build for another base path; the default is /docs/. The Archipelego server serves the site only at /docs/. Read docs-site/TRANSLATING.md before you add or translate pages.
AI credentials for development
Explain and the Architect need at least one AI provider. You have three options:
- Set
ANTHROPIC_API_KEYin the environment before you start the server. - Run
ant auth loginonce, so the Anthropic SDK finds your profile. SetARCHIPELEGO_PLATFORM_AI=onif the server does not detect it. - Bring your own key in the app: open Save & export, then AI models and keys, and paste a key for any provider.
Without any key, set ARCHIPELEGO_AI_MOCK=on or ARCHIPELEGO_AI_MOCK=always. The offline simulator then answers @architect and drafts features from the canvas itself. Explain still needs a provider. See Testing.
The router logic is in LLM router.