Skip to Content
Workspace

Contributor guide

Everything a developer needs to change Workspace with confidence, from the system's shape down to the tables and the first pull request.

This section is for developers who want to work on Workspace itself: fix a bug, add a feature, or understand why something is built the way it is. Read it in order the first time; afterwards each page stands on its own.

The system in one paragraph

Workspace is one company per installation. A Next.js 15 web app (the UI and a backend-for-frontend) sits in front of one Node 22 server process that hosts nine modules: gateway, identity, platform, chat, work, home, employee, ai and search. Each module owns a folder, a Postgres schema and login role, its migrations and an HTTP API. Modules never import each other's code: they call each other's API in memory, as the caller, or react to events delivered from a transactional outbox. Caddy, the app container and Postgres are the whole deployment.

Browserstaff, PWAYour server · docker composeCaddy:80 · :443 · TLSapp container · one imagewebNext.js BFF · :3000sessions in PostgresserverNode 22 · :4000gateway + 8 modulesone processPostgreSQL 16one databasea schema and a loginrole per moduleS3 (SeaweedFS)signed URLs · profile s3default: the server's diskLiveKitprofile meet · videopagesws · files · mcpin memoryWebRTC media, straight to LiveKitAlso straight to :4000:wos_ API keys, OAuth,hooks, the runner,/api/ai/local*, /api/docs
Three containers: Caddy, the app (web and server) and Postgres.

Reading order

The non-negotiables

Every pull request is read against these. They are also in AGENTS.md, which coding agents read first.

  1. Every feature works without AI. Generative endpoints answer 503 ai_not_configured and the UI hides them.
  2. No SaaS concepts. No billing, plans, trials, seat limits or platform admin.
  3. One workspace. No workspace column, row-level security or workspace id anywhere; a second company is a second installation (ADR-0023).
  4. Fast and light. Route JavaScript budgets are gated in CI; heavy client code loads on demand.
  5. Chat and tasks are the product. Docs, whiteboards, calendar, time and AI can be left out with DISABLED_FEATURES, and every screen must still make sense without them (ADR-0026).

Running it from source

You need Node.js 22, pnpm 10 (corepack enable) and Docker with Compose v2.

pnpm install
cp .env.example .env
pnpm infra:up                         # Postgres, S3 (SeaweedFS), LiveKit
pnpm build:packages                   # once per clone, and after changing backend/packages
pnpm migrate
pnpm dev:server                       # every backend module in one process, :4000
pnpm --filter @workspace/web dev      # http://localhost:3000, in a second terminal

Create the company at /setup, then fill it with realistic data (people, departments, projects, tasks, documents, meetings, chat and eight weeks of AI history):

SEED_OWNER_EMAIL=<owner e-mail> SEED_OWNER_PASSWORD=<owner password> pnpm seed:demo

Where the full reference lives

The pages here orient you and show how the parts fit. The repository is the source of truth and goes deeper: system design, database (one page per schema, every table), events and the generated event catalog, and the architecture decision records. When a page here and the code disagree, the code is right and the page has a bug: please open an issue.

On this page