ghstats

ghstats

Self-hosted dashboard for tracking GitHub repository traffic

171stars
5forks
Last commit: 11mo ago
Repo age: 2y old

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:

Share:

Similar Services

Grafana

Grafana

Observability dashboards and alerting for metrics, logs, and traces

71.7k
13.4k
Last commit: 18h ago

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

Alternative to:
Grafana Cloud
Grafana Cloud
+19
Apache Superset

Apache Superset

Data exploration, visualization, and dashboarding platform

70.1k
16.5k
Last commit: 19h ago

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.

Alternative to:
Apache Superset (Managed Cloud)
Apache Superset (Managed Cloud)
+18
Metabase

Metabase

Open-source business intelligence and embedded analytics platform

45.6k
6.2k
Last commit: 18h ago

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

Alternative to:
Metabase Cloud
Metabase Cloud
+19
Appsmith

Appsmith

Open-source low-code platform for internal tools and dashboards

38.9k
4.4k
Last commit: 2d ago

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...

Alternative to:
Retool
Retool
+14
ToolJet

ToolJet

Low-code platform for building internal apps, dashboards, and workflows

37.2k
4.9k
Last commit: 1d ago

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.

Alternative to:
Retool
Retool
+19
Redash

Redash

Query, visualize, and share data from multiple data sources

28.2k
4.5k
Last commit: 13d ago

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.

Alternative to:
Redash
Redash
+19