This guide walks you through setting up CLAHub for local development.
- Node.js 20 or later
- npm (included with Node.js)
- Git
- A GitHub account with permission to create GitHub Apps and OAuth Apps
git clone https://github.com/clahub/clahub.git
cd clahubnpm cicp .env.local.example .env.localOpen .env.local and fill in the required values. See the Configuration Guide for a full reference of every variable and a step-by-step GitHub App setup walkthrough.
At minimum you need:
NEXTAUTH_SECRET— runopenssl rand -base64 32to generate oneGITHUB_APP_ID,GITHUB_APP_PRIVATE_KEY,GITHUB_WEBHOOK_SECRETGITHUB_OWNER_CLIENT_ID,GITHUB_OWNER_CLIENT_SECRETGITHUB_CONTRIBUTOR_CLIENT_ID,GITHUB_CONTRIBUTOR_CLIENT_SECRET
npx prisma db pushThis creates the SQLite database file and applies the schema. The command is idempotent — safe to run multiple times.
npm run devThe app is now running at http://localhost:3000.
| Script | Command | Description |
|---|---|---|
dev |
npm run dev |
Start the Next.js development server |
build |
npm run build |
Create an optimized production build |
start |
npm run start |
Start the production server |
test |
npm test |
Run unit tests with Vitest |
test:watch |
npm run test:watch |
Run tests in watch mode |
test:e2e |
npm run test:e2e |
Run end-to-end tests with Playwright |
lint |
npm run lint |
Lint the codebase with ESLint |
format |
npm run format |
Format code with Prettier |
db:push |
npm run db:push |
Push the Prisma schema to the database |
db:seed |
npm run db:seed |
Seed the database with sample data |
db:studio |
npm run db:studio |
Open Prisma Studio (visual database browser) |
- Configuration Guide — full environment variable reference and GitHub App setup
- Deployment Guide — deploy to Docker, Vercel, Railway, Fly.io, or bare metal
- Upgrading Guide — update to new versions safely