Deploy and run locally
How changes reach the live site, and how to run KarmaCircle on your own computer.
How a change goes live
- There are two copies of the whole system: dev for trying things, and production for real people.
- The website and the API deploy separately, each only when its own code changed.
- The worker runs on Render from a small Docker image.
Run it on your computer
Install Git, Node.js 22, pnpm and PostgreSQL 17 (Go 1.26 too, for the worker).
Set up: clone the code, run pnpm install, and copy the two .env.example files to .env.
Fill the database: pnpm --filter karmacircle-api db:migrate, then db:seed for demo data.
Start: pnpm dev, then open http://localhost:3000.
| Part | Local address |
|---|---|
| Website | http://localhost:3000 |
| API | http://localhost:5050 (docs at /docs) |
| Worker | http://localhost:8080 |
Never point your local setup at the production database.
| Workflow | Branch | Deploys |
|---|---|---|
api-production.yml | main | Production API, with migrations |
api-production-dev.yml | dev | Dev API, with migrations |
web-prodtest.yml | main | Production website |
web-production-dev.yml | dev | Dev website |
worker-wake.yml | main | Nothing; calls the worker's /wake hourly |
ci.yml | pull requests and reuse | Checks only |
- Deploys use
vercel pull,vercel build --prodandvercel deploy --prebuilt --prod; deploys of one workflow run one at a time. - Useful commands:
pnpm lint,pnpm type-check,pnpm build,pnpm test, andgo vet ./...inapps/worker. - Full guide:
docs/LocalDevSetup.md.