English

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:

bash
npm install

This installs both workspaces, app and server.

Start the development servers

bash
npm run dev

This runs three things:

  1. npm run tokens compiles the design tokens into design-system/dev/tokens.css.
  2. The server starts with tsx watch src/index.ts on port 1234. It restarts when a server file changes.
  3. 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.

bash
ARCHIPELEGO_SERVER=http://192.168.1.20:1234 npm run dev -w app

Join 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

bash
npm run build
npm start

The 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

bash
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.json

The docs site

The documentation site has its own package. It is not part of the root workspaces.

bash
cd docs-site
npm install
npm run build

The 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_KEY in the environment before you start the server.
  • Run ant auth login once, so the Anthropic SDK finds your profile. Set ARCHIPELEGO_PLATFORM_AI=on if 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.