Skip to content

CGM/CKM continuous glucose and ketone monitor integration #9

@elkimek

Description

@elkimek

Summary

Import and visualize continuous glucose monitor (CGM) and continuous ketone monitor (CKM) data alongside blood work for a complete metabolic picture.

Why This Matters

CGM and CKM data bridges the gap between quarterly lab snapshots and real-time metabolic health. Correlating glucose/ketone trends with lab biomarkers (HbA1c, insulin, HOMA-IR, triglycerides) gives a much deeper picture than either dataset alone.

CGM Landscape

Devices: Dexcom, Abbott FreeStyle Libre, Medtronic, Ultrahuman (Lingo), Levels, Stelo
Data points: Glucose readings every 1-15 minutes, 24/7

Open-source ecosystem (mature):

  • Nightscout — the gold standard. Open-source CGM-in-the-cloud platform with 39k+ community. REST API for reading glucose data. Supports nearly all commercial CGM sensors
  • Glucose360 — open-source Python platform for CGM data analysis with event-based integration
  • AGATA — automated glucose data analysis toolbox
  • cgmquantify — 28 clinically validated glucose metrics

CKM Landscape

Devices: SiBio KS1, Abbott (dual CGM/CKM in development), Readout Health
Data points: Ketone readings every 5 minutes via BLE

Status: Much earlier than CGM. No established open-source ecosystem yet. SiBio app supports data export. No public APIs documented. Clinical trials and early adopter market in 2025-2026.

Integration Approaches

  1. Nightscout API — most practical starting point. Read CGM data from user's Nightscout instance via REST API. Massive existing user base
  2. File import — accept CSV/JSON exports from CGM/CKM apps (Dexcom Clarity, LibreView, SiBio, etc.)
  3. Direct device APIs — where available (Dexcom has a developer API, others are more restricted)

Visualization Ideas

  • Glucose/ketone overlay on existing biomarker charts (e.g., show glucose curve alongside HbA1c trend)
  • Daily glucose variability metrics (time in range, CV, GMI) as calculated markers
  • Meal response correlation with diet context card data
  • Ketone levels correlated with exercise context and fasting patterns
  • Alert when CGM trends diverge from lab glucose/HbA1c (sensor accuracy check)

Open Questions

  • Data volume: CGM produces ~288 readings/day vs quarterly lab snapshots. localStorage may not suffice — IndexedDB or data summarization needed
  • Granularity: show raw readings, hourly averages, or daily summaries on charts?
  • Nightscout auth: how to handle API tokens from a browser (CORS?)
  • CKM data formats are not yet standardized

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions