Get Maintainer Brief backend running in 5 minutes.
- Node.js 18+
- Supabase account (free tier works)
- Redis (local or cloud)
- GitHub Personal Access Token
- OpenAI API key
cd maintainer-brief-backend
npm installcp .env.example .envEdit .env with your credentials:
Required:
# Supabase (from dashboard)
SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_ANON_KEY=eyJhbGc...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGc...
DATABASE_URL=postgresql://postgres:password@db.xxxxx.supabase.co:5432/postgres
# Redis (local: redis://localhost:6379)
REDIS_URL=redis://localhost:6379
# OpenAI
OPENAI_API_KEY=sk-your-key-here
# GitHub OAuth (create app at github.com/settings/developers)
GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret
GITHUB_CALLBACK_URL=http://localhost:3000/github/callback
# Security (generate: openssl rand -hex 32)
ENCRYPTION_KEY=your-64-char-hex-key-here
# Frontend
FRONTEND_URL=http://localhost:5173npm run build
npm run migrateThis creates all tables in your Supabase database.
Terminal 1 - API Server:
npm run devTerminal 2 - Worker:
npm run workerTerminal 3 (optional) - Scheduler:
npm run schedulercurl http://localhost:3000/healthExpected:
{
"status": "ok",
"timestamp": "2025-12-16T...",
"database": "connected",
"redis": "connected"
}- Get Supabase JWT: Sign up a test user in Supabase Auth dashboard
- Connect GitHub:
POST /github/connectwith your token - Add a repo:
POST /repos - Trigger analysis:
POST /repos/:id/analyze - Watch it work:
GET /jobs/:id
See API_EXAMPLES.md for detailed curl commands.
- Install Redis:
brew install redis(Mac) orapt install redis(Ubuntu) - Start Redis:
redis-server
- Check
DATABASE_URLformat - Verify Supabase project is active
- Check firewall/network settings
- Verify API key is valid
- Check account has credits
- Ensure key starts with
sk-
- Use authenticated token (5000 req/hr vs 60)
- Implement caching (future enhancement)
Watch logs:
# API logs
npm run dev
# Worker logs in real-time
npm run worker | bunyan # if you have bunyan CLIRun tests:
npm testFormat code:
npm run formatCheck types:
npm run buildSee DEPLOYMENT.md for Railway, Docker, and production setup.
- Check
README.mdfor detailed documentation - See
API_EXAMPLES.mdfor API usage - Read
DEPLOYMENT.mdfor production setup - Review
CONTRIBUTING.mdfor development guidelines
Estimated time to first analysis: 5 minutes setup + 2-5 minutes per repo analysis