A one-time copy of openhands/sdk-dashboard, retargeted to track the OpenHands/OpenHands GitHub repository and the openhands-ai PyPI package.
- GitHub repository metrics for
OpenHands/OpenHands - PyPI download metrics for
openhands-ai - Daily historical snapshots stored in Postgres
- Daily dependent-repository counts based on GitHub code search
- Automated Neon backup artifacts via GitHub Actions
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS + shadcn/ui
- Database: Postgres (Neon recommended) + Drizzle ORM
- Charts: Recharts
- Deployment: Vercel
npm ci
cp .env.example .env.local
npm run devOpen http://localhost:3000 to view the app.
Create a .env.local file for local development:
DATABASE_URL=
GITHUB_TOKEN=
CRON_SECRET=| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Required for snapshots/backups | Postgres connection string. Neon is the recommended provider. |
GITHUB_TOKEN |
Optional but recommended | Raises GitHub API limits for repo metrics and code search. |
CRON_SECRET |
Required for cron/manual snapshot triggers | Bearer token used by /api/cron/collect. |
This project uses Drizzle ORM with Postgres. Neon is the intended hosted database.
npm run db:pushThat creates the dashboard tables for the tracked repository and its daily snapshots.
Additional database commands:
npm run db:generate
npm run db:migrate
npm run db:push
npm run db:studioThe dashboard collects one snapshot per day using POST /api/cron/collect.
- Schedule:
0 6 * * * - Configured in:
vercel.json - Behavior: creates one snapshot per day and skips if a snapshot already exists
Manual trigger:
curl -X POST http://localhost:3000/api/cron/collect \
-H "Authorization: Bearer $CRON_SECRET"This repository includes a lightweight Neon/Postgres backup flow:
scripts/backup-neon.shcreates a compressedpg_dumpbackupscripts/restore-neon.shrestores a backup into a Postgres database.github/workflows/neon-backup.ymlruns the backup on a schedule and on manual dispatch- GitHub Actions uploads each backup as an artifact
Install the PostgreSQL client tools (pg_dump / pg_restore), then run:
DATABASE_URL=postgresql://... npm run backup:neonBy default the backup is written to backups/openhands-dashboard-<timestamp>.dump.
DATABASE_URL=postgresql://... npm run restore:neon -- backups/openhands-dashboard-<timestamp>.dumpAdd the following repository secret before enabling scheduled backups:
DATABASE_URL— the Neon production database URL
The workflow installs postgresql-client, runs scripts/backup-neon.sh, and uploads the resulting dump as a workflow artifact.
- Import the repository into Vercel.
- Set
DATABASE_URL,GITHUB_TOKEN, andCRON_SECRETin Vercel project settings. - Run
npm run db:pushagainst the production database. - Deploy.
After setup:
- Home page links point to
OpenHands/OpenHandsandopenhands-ai /api/cron/collectcreates or skips a snapshot successfully- Historical charts render once at least two snapshots exist
npm run backup:neonproduces a.dumpfile locally- GitHub Actions backup artifacts are generated when the backup workflow runs