Skip to content
Website

Local Setup

This guide is for contributors developing Patchwork locally.

  • src/app/ — Next.js App Router pages and /api/* route handlers
  • src/components/ — UI components (PatchworkApp.tsx, CommandPalette.tsx, SystemConfigView.tsx, SetupWizard.tsx)
  • src/db/ — Drizzle PostgreSQL connection and src/db/schema.ts
  • src/lib/ — Domain logic (rbac.ts, settings.ts, commands/, setup.ts, search.ts, realtime.ts)
  • scripts/ — Cross-platform Node.js CLI scripts (setup.mjs, seed.mjs, docs/)
  • docs-site/ — Separate Astro Starlight documentation package
  • tests/ & e2e/ — Vitest integration tests and Playwright E2E tests
Terminal window
npm install
npm --prefix docs-site install
Copy-Item .env.example .env
npm run db:reset:test
npm run seed -- --size small
npm run dev
Terminal window
npm run lint
npm run typecheck
npm run test
npm run build
npm run docs:check
npm run docs:build

For the full end-to-end suite (including MinIO, PostgreSQL reset, Playwright E2E, and smoke checks), run npm run verify.

http://localhost:3000 serves the seeded workspace and all unit, E2E, and docs checks pass on both Windows and Linux.