You need Node 22, Docker, and pnpm through Corepack.
corepack enable
pnpm install
cp .env.example .env
docker compose up -d db
pnpm db:migrate
pnpm devdocker compose up -d db starts only Postgres, on 127.0.0.1:54330 so it doesn't collide with
a Postgres you may already run. pnpm dev then starts three things at once:
| What | Where | Notes |
|---|---|---|
| Server | http://localhost:3000 | Restarts when you change apps/server or a package it uses |
| Dashboard | http://localhost:5190 | Vite with hot reload; sends /api and /embed.js to the server |
| Widget | packages/widget/dist |
Rebuilt on change and served by the server as /embed.js |
Work in the dashboard at port 5190. For sample data, put SEED_DEMO_DATA=true in .env and sign
in as demo@kindwall.dev / kindwall-demo-password.
apps/server Fastify server: HTTP routes, auth, files, mail, webhooks
apps/dashboard React app: dashboard, collection pages (/c/…), hosted walls (/w/…)
packages/widget embed.js, the script customers paste into their sites
packages/shared Types, Zod schemas and rules shared by everything above
packages/database Drizzle schema and SQL migrations
packages/config Environment variables, read and checked once
tests/e2e Playwright tests of the whole journey
deploy Dockerfile
tools Release helpers
docs/api.md describes every HTTP endpoint and is the contract between the server and
the dashboard. Shapes and validation live in packages/shared, so both sides use the same code.
Unit and integration tests use a real database, kindwall_test, which you create once:
docker compose exec db createdb -U kindwall kindwall_test
pnpm testPoint them elsewhere with KINDWALL_TEST_DATABASE_URL.
Browser tests drive the built app in Chromium. They create, and recreate on every run, a database
called kindwall_e2e next to the others (override with KINDWALL_E2E_DATABASE_URL):
pnpm --filter @kindwall/e2e exec playwright install chromium # once
pnpm build
pnpm e2eTo run them against a server that's already running, for example the Docker image with an empty
database, set E2E_BASE_URL=http://127.0.0.1:3000.
pnpm verify runs lint, the format check, type checks and tests: the same as CI's first job.
- Edit
packages/database/src/schema.ts. - Run
pnpm db:generateto write a new SQL migration intopackages/database/migrations. - Read the SQL it wrote, then
pnpm db:migrate.
Migrations that have been released are never edited; add a new one instead.
pnpm build
node apps/server/dist/server.mjspnpm build produces packages/widget/dist/embed.js, apps/dashboard/dist and the bundled
server apps/server/dist/server.mjs, which serves the other two. The Docker image is built from
the same steps: docker build -f deploy/Dockerfile -t kindwall .