Vercel
Abacus is designed to run on Vercel with a Postgres database. This guide covers production deployment and automated syncing.
Deployment
- Deploy via the button in the README or connect your fork to Vercel
- Add a Postgres database via the Vercel Marketplace:
- Go to Storage tab in your Vercel project
- Click Connect Database → Neon Postgres
- Follow the prompts to create or link a database
- This automatically sets
POSTGRES_URLin your environment
- Set environment variables (see Environment Variables)
- Deploy - migrations run automatically on build
Automated Syncing
Abacus uses Vercel cron jobs to keep data current. These run automatically once deployed.
Cron Schedule
| Endpoint | Schedule | Purpose |
|---|---|---|
/api/cron/sync-anthropic | Daily at 6 AM UTC | Sync recent Claude Code usage |
/api/cron/sync-cursor | Hourly | Sync recent Cursor usage |
/api/cron/backfill-anthropic | Every 6 hours | Backfill historical Claude Code data |
/api/cron/backfill-cursor | Every 6 hours | Backfill historical Cursor data |
/api/cron/backfill-github | Every 6 hours | Backfill GitHub commits (90 days) |
/api/cron/sync-github-mappings | Daily | Sync GitHub user mappings |
Cron Authentication
All cron endpoints require CRON_SECRET. Vercel automatically includes this in cron requests.
# Generate a secure secretopenssl rand -hex 32Manual Triggering
Trigger cron jobs manually for testing:
curl -X POST https://your-app.vercel.app/api/cron/sync-anthropic \ -H "Authorization: Bearer $CRON_SECRET"Or use the CLI:
pnpm cli sync anthropic --days 7Vercel Configuration
Cron jobs are defined in vercel.json:
{ "crons": [ { "path": "/api/cron/sync-anthropic", "schedule": "0 6 * * *" }, { "path": "/api/cron/sync-cursor", "schedule": "0 * * * *" } ]}Monitoring
Vercel Dashboard
Check the Vercel dashboard for:
- Cron execution history
- Success/failure rates
- Execution duration
Abacus Status Page
The /status page shows:
- Last sync time for each provider
- Backfill progress
- Any sync errors
Database
Abacus works with:
- Vercel Postgres (recommended)
- Neon (compatible)
Migrations run automatically on vercel build. For manual migrations:
pnpm cli db:migrate