A local-first dashboard for tracking development metrics from GitHub repositories. Visualize commits, pull requests, reviews, and contributor activity across your repos.
I built devmetrics because I needed a lightweight way to understand engineering activity across GitHub repositories. The goal isn’t a single “productivity score,” but a clear set of signals (PR flow, review load, contribution trends) that are easy to scan and discuss with my teams.
I tried several existing tools, but I kept running into tradeoffs: decent data but missing key metrics, poor UX, JSON data only with no visualizations, or Java-based tools that required installing a local JDK which I wasn't keen on. So, I decided to just build my own tool.
devmetrics focuses on metrics that are straightforward to fetch from the GitHub API and presents them in a clean dashboard you can run locally. It has been immediately useful for me, and I hope may be useful for others.
- Commit Tracking: View commit counts, additions/deletions per contributor
- PR Analytics: Track opened, merged PRs and merge rates
- Review Metrics: See who's doing code reviews and approvals
- Activity Charts: Visualize contribution patterns over time
- Multi-repo Support: Track multiple repositories in one dashboard
- Incremental Sync: Only fetch new data after initial sync
- Filter & Explore: Filter by date range or specific repositories
- Local Storage: All data stored locally in SQLite - your data stays on your machine
git clone https://github.com/jayhung/devmetrics.git
cd devmetricsyarn installCopy the example environment file:
cp .env.local.example .env.localEdit .env.local and add your GitHub Personal Access Token:
GITHUB_TOKEN=ghp_your_token_here- Go to GitHub Settings > Tokens
- Click "Generate new token" → "Generate new token (classic)"
- Give it a descriptive name (e.g., "devmetrics dashboard")
- Select the
reposcope (full access to repositories) - Click Generate token and copy it
Note: The
reposcope is required to access commit history and PR data. For public repos only, thepublic_reposcope is sufficient.
yarn devOpen http://localhost:4000 in your browser.
Navigate to /config and enter repositories in the format owner/repo. Examples:
facebook/reactvercel/next.jsyour-org/your-private-repo
Click the Sync Data button on the dashboard to fetch the latest data from GitHub. The first sync may take a while depending on repository size and history.
Subsequent syncs are incremental - only new commits and PRs since the last sync are fetched.
- Repository filter: Select specific repos to view
- Date range: Filter metrics to a specific time period
- Filters are persisted in local storage
The app respects GitHub API rate limits (5,000 requests/hour for authenticated users). The sync process:
- Shows current rate limit status before syncing
- Pauses if rate limit is too low
- Displays helpful messages if you hit the limit
devmetrics/
├── src/
│ ├── app/ # Next.js app router pages
│ │ ├── api/ # API routes (metrics, repos, sync)
│ │ ├── config/ # Configuration page
│ │ └── page.tsx # Main dashboard
│ ├── components/ # React components
│ │ ├── charts/ # Visualization components
│ │ └── ui/ # Reusable UI components
│ └── lib/ # Core logic
│ ├── db.ts # SQLite database operations
│ ├── github.ts # GitHub API client
│ └── metrics.ts # Metrics calculations
├── data/ # SQLite database (gitignored)
└── .env.local # Environment variables (gitignored)
- Verify your
GITHUB_TOKENis correct in.env.local - Make sure the token hasn't expired
- Check the token has the
reposcope
- Wait for the rate limit to reset (shown in error message)
- For large syncs, consider syncing repos one at a time
- Verify the repository exists and you have access to it
- For private repos, ensure your token has the
reposcope - Check the owner/repo format is correct
Delete the database to start fresh:
rm -rf data/*.db*yarn dev # Start dev server (port 4000)
yarn build # Production build
yarn lint # Run ESLint- Framework: Next.js 16 with App Router
- Language: TypeScript
- Database: SQLite via better-sqlite3
- UI: Tailwind CSS + Radix UI
- Charts: Recharts
- GitHub API: @octokit/rest
See CHANGELOG.md for version history and release notes.
MIT
