Live · 2026 · Health data

Insulin dashboard

A self-hosted insulin and glucose dashboard for managing type 1 diabetes.

Dashboard: current glucose, time in range, average, GMI, insulin per day, and a 6-hour trend chart with pump dose markers
figure 01: dashboard with trend chart, dose markers and current value · demo mode, synthetic data
summary

01 / problem

Managing type 1 diabetes meant juggling Dexcom, Glooko, and Nightscout in separate apps, none of which showed dose math next to the trend.

02 / approach

One Python API on Postgres ingests Dexcom CGM readings every minute and Glooko pump data, deduplicates across writers, and serves a single dashboard, a Garmin widget, and three LED clocks.

03 / result

One screen with trend charts at multiple zooms, dose calculation with correction targets, insulin on board, and daily totals, running every day since launch, hardened with CSRF guards, audit logging, and a pytest regression suite.

architecture

Dexcom and Glooko → API → Postgres → dashboard, watch, clocks

Dexcom APICGM readings every minute
Glookopump doses, basal states, automation modes
Python APIingest, dedup across writers, nightly backfill, dose math
Postgresreadings, doses, audit log
Dashboardtrend charts, dose calculator, insights
Garmin watchConnect IQ glance and widget
LED clocksthree clocks on the LAN
timeline, newest first
  1. Sep 15 Estimated insulin on board shown under the current reading
  2. Aug 29 Old v1 and v2 screens retired, the Stitch design is the only UI
  3. Aug 22 Glooko pump data live: doses, basal states, automation modes
  4. Aug 1 Dedup across writers on glucose readings (re-run Aug 6)
  5. Jul 31 Public demo mode on synthetic data
  6. Jul 24 pytest regression suite, phase 1
  7. Jul 19 Redesigned in Stitch (v3)
  8. Jul 15 Security pass: login throttle, session revocation, headers, least-privilege DB role
  9. Jul 14 Insights view replaces the Nightscout iframe
  10. Jul 13 Dexcom production API connected
  11. Jul 10 Dose calculator with correction targets
  12. Jul 6 First deploy
gallery · demo mode, synthetic data
what i'd do differently
I'd build the dedup before adding a second writer, not after. Duplicate readings showed up in July, I cleaned them out on Aug 1, and they were back by Aug 6. I'd also start the test suite on day one. It landed 18 days after the first deploy, after the security pass instead of before it.