Local development

Run wrkin.space locally with Docker, Postgres, MinIO, and the collab server.

Last updated June 7, 2026

Prerequisites

  • Node.js (LTS)
  • pnpm
  • Docker (for Postgres and MinIO)

Quick setup

From the repository root:

pnpm setup

This creates .env, installs dependencies, starts Docker services, pushes the schema, and optionally seeds demo data.

Run the app

In one terminal:

pnpm dev

In another terminal (required for collaborative Docs):

pnpm collab:dev

Open http://localhost:5173.

Environment

Copy variables from .env.example. At minimum you need:

VariablePurpose
DATABASE_URLPostgres connection string
BETTER_AUTH_SECRETSession signing (32+ chars in production)
S3_*MinIO or S3-compatible storage for uploads
PUBLIC_COLLAB_WS_URLWebSocket URL for Docs collab (ws://localhost:1234 locally)

Optional:

VariablePurpose
COLLAB_JWT_SECRETCollab token signing; defaults to BETTER_AUTH_SECRET in dev
HOCUSPOCUS_PORTCollab server port (default 1234)
ORIGINPublic app URL (http://localhost:5173 locally — required for auth/email links)

Outbound email (RESEND_API_KEY or SMTP) is not required for local signup but password reset will not send mail until configured. See Production deployment.

Useful commands

CommandDescription
pnpm db:startStart Postgres + MinIO
pnpm db:pushSync schema locally
pnpm db:seedLoad demo teams, wrkspaces, and data
pnpm checkType-check the app

Demo data

Run pnpm db:seed to wipe seed-owned data and recreate a demo environment:

  • 3 teams — Acme Labs (primary), Northwind Studio, Bridge Collective
  • 9 wrkspaces — simple (pilot), medium (product-beta), full showcase (platform-alpha) on Acme; light wrkspaces on other teams
  • 10 users — password password123 for all
EmailTeams (slug)
test@wrkin.localacme-labs (owner), bridge
alex@wrkin.localacme-labs, northwind (owner)
jordan@wrkin.localacme-labs, northwind, bridge (owner)
sam@wrkin.localacme-labs
taylor@wrkin.localacme-labs
morgan@wrkin.localnorthwind
riley@wrkin.localnorthwind
casey@wrkin.localnorthwind, bridge
jamie@wrkin.localbridge
quinn@wrkin.localbridge

Primary paths after seed:

  • Team: /teams/acme-labs
  • Showcase wrkspace: /teams/acme-labs/wrkspaces/platform-alpha (every enabled module type with sample data)

Re-run pnpm db:seed anytime to reset seed-owned data. Do not run the seed script against production databases.

Next steps