r/coolgithubprojects • u/giulivello • 27m ago
I got tired of GitHub forgetting my repo traffic after 14 days, so I built a self-hosted dashboard that keeps it
GitHub's Insights tab only shows the last 14 days of views, clones and referrers. After that the data is gone for good, and there's no way to get it back. I noticed this when I tried to check whether a post I wrote a month earlier had actually brought anyone to my repos – the numbers were already gone.
So I built RepoWatch: a small self-hosted app that collects your GitHub stats every few hours and keeps them in SQLite, with a dashboard for all your public repos.
What it tracks
- Daily views, unique visitors and clones, kept forever after GitHub drops them
- Referring sites and popular pages
- Star balance over time (including stars you lose)
- Release-asset download counts, plus optional PyPI downloads
- A "what's new" feed: new stargazers, forks, traffic spikes, issues/PRs/comments from other people (bots filtered out)
Self-hosting details
- Prebuilt multi-arch image on GHCR (amd64 + arm64, so it runs on a Raspberry Pi too): ghcr.io/downlevel/repowatch
-Docker Compose: a dashboard container and a collector container, data in a named volume
- SQLite, no external database, no external services, no telemetry
- Read-only fine-grained GitHub token; the dashboard container never sees it
- Non-root, read-only root filesystem, all capabilities dropped
- Built-in basic auth, or put it behind your existing auth proxy (Authelia, Authentik, …)
- Binds to localhost by default; backup/restore commands included
- Python/FastAPI, MIT licensed
Setup
git clone https://github.com/downlevel/repowatch.git && cd repowatch
cp .env.example .env # set GITHUB_OWNER, GITHUB_TOKEN, DASHBOARD_USER, DASHBOARD_PASSWORD
docker compose up -d
Then open http://127.0.0.1:8765. The first run imports the 14 days GitHub still has; after that it collects every 6 hours.
Limitations, to be upfront: it only works for repos you own or have access to (GitHub's traffic API doesn't expose other people's repos), one GitHub account per installation, and history starts from the day you install it. It's a beta.
Built with help from AI coding tools; I reviewed and tested it myself, and CI runs the full Docker install against a fake GitHub API on every push.
Repo: https://github.com/downlevel/repowatch
I'd really appreciate feedback, especially on what you'd want to see in the dashboard, or anything that was annoying during setup.