← All work
active · 1 min read

Gitea Insights

Native analytics page inside Gitea: Go collector, TypeScript SPA, and DORA-style metrics for org health, CI cycle times, and contributor activity without leaving the platform.

GoTypeScriptEChartsDevOps
Status
active
Active since
June 2026
Last updated
June 2026
Changes shipped
7

Live analytics surface; DORA-style metrics computed from real org activity.

Engineering metrics usually live in a separate dashboard nobody opens. Gitea Insights puts them where the work happens: a native analytics page inside the forge itself, backed by a Go collector and a TypeScript SPA.

How it works

There is no separate database. A scheduled Go collector polls the forge’s REST API, computes every metric (cycle time, review latency, contributor activity) and writes the results as precomputed JSON “fact packs” into a repository the forge already gates to signed-in users. The page itself is a static single-page app served from the forge’s own asset path, added as a real nav item. It fetches those packs same-origin with the session cookie and renders the charts entirely client-side, so the interactivity is in the browser and the backend is just a cron job.

Key decisions

  • Native page, not a link to a separate tool: the metrics live one click from the code they describe, on the same domain behind the same login, because a dashboard you have to leave to find is a dashboard nobody opens.
  • Precomputed packs, no new datastore: at this scale the full history is a few megabytes of JSON, so a periodic recompute beats standing up and securing a metrics database for v1.
  • Read-only API access over the database: consuming the documented API rather than the forge’s internal schema means a stable contract that upgrades won’t silently break.
  • All-or-nothing publication: a run publishes a complete set or none; partial data with a stale indicator is more honest than silently distorted aggregates that look current.

Recent changes

  • Spa git cutover
  • Add spa gitea chrome
  • Rearchitect to postgres grafana
  • Fix runner board collector snapshot
  • Adopt gitops ci gitea stats
  • Add gitea runner monitor