ghstats
Self-hosted dashboard for tracking GitHub repository traffic
ghstats is a lightweight, self-hosted dashboard written in Rust that collects GitHub repository traffic metrics and stores historical data beyond GitHub's default 14-day retention. It runs as a single small container and persists metrics in a local SQLite database for per-repo dashboards and simple API access.
Key Features
- Periodic collection of GitHub traffic metrics (views, uniques, clones) and daily aggregation stored in SQLite
- Per-repository listing and simple dashboard with historical metrics
- Minimal single-container deployment with a small Docker image and optional Docker Compose configuration
- Environment-driven configuration: GitHub token, host/port, filters, custom header links, and API token
- Flexible repo filtering (include/exclude rules, wildcards, meta rules like !fork and !archived)
- Hourly synchronization scheduler and immediate initial sync when database is empty
- Simple JSON API endpoint (/api/repos) protected by an API token for programmatic access
- Option to include private repos when using a token with appropriate scopes
Use Cases
- Preserve and analyze GitHub repository traffic history beyond the platform's 14-day view window
- Build lightweight public or internal dashboards showing repository popularity and trends
- Export or integrate basic repo traffic metrics via the built-in JSON API for reporting or automation
Limitations and Considerations
- Dependent on GitHub API rate limits and token scopes; private repo collection requires broader token permissions
- Uses SQLite and a single-container design, which limits horizontal scalability for very large numbers of repositories
- Data granularity is daily; current-day data is updated by re-fetching but there is no finer time-series resolution
- API surface is minimal (primarily a consolidated /api/repos endpoint) compared to full analytics platforms
ghstats is suitable when you need a simple, low-dependency way to retain and inspect GitHub traffic history. It favors minimal operational complexity over advanced analytics or large-scale multi-node deployments.
Categories:
Tags:
Tech Stack:
Similar Services

Grafana
Observability dashboards and alerting for metrics, logs, and traces
Grafana is an open source observability and data visualization platform for querying, graphing, and alerting on metrics, logs, and traces across many data sources.


Apache Superset
Data exploration, visualization, and dashboarding platform
Apache Superset is an open-source BI platform for SQL-based data exploration, interactive dashboards, and rich visualizations with a no-code chart builder and SQL editor.

Metabase
Open-source business intelligence and embedded analytics platform
Metabase is an open-source BI and embedded analytics tool for querying databases, building dashboards, and sharing reports with permissions, alerts, and embedding.

Appsmith
Open-source low-code platform for internal tools and dashboards
Build and deploy internal tools, admin panels, and dashboards with a low-code UI builder that connects to databases and APIs and supports JavaScript logic and Git workflo...

ToolJet
Low-code platform for building internal apps, dashboards, and workflows
ToolJet is an open-source low-code platform to build and deploy internal tools, dashboards, and workflows with integrations for databases, APIs, and SaaS apps.

Redash
Query, visualize, and share data from multiple data sources
Open source BI tool to connect to many data sources, run SQL/NoSQL queries, build visualizations and dashboards, share insights, and set alerts and scheduled refreshes.
JavaScript
Docker
Rust
CSS