TechnotechGit/dexcom-viewer

A web viewer for Dexcom share data, with prediction built in

0

stars

1

commits

TypeScript

primary language

Apr 26, 2026

updated

README

Dexcom Viewer

Dexcom Viewer Demo

A real-time glucose monitoring dashboard that fetches data from the Dexcom Share API, visualizes glucose trends, and provides short-term predictions using Python ML models.

Features

  • Fetches glucose readings from Dexcom Share (US & EU servers)
  • Real-time glucose value display with 60-minute and 24-hour trend graphs
  • Data visualization using Nivo line charts
  • Local SQLite database for glucose data persistence
  • Short-term glucose predictions via Python models (DARTS/TTM)
  • Responsive design with Tailwind CSS
  • Built with Bun for fast backend execution

Tech Stack

LayerTechnology
FrontendReact 18, TypeScript, Vite
StylingTailwind CSS
ChartsNivo (D3-based)
BackendBun (server.js)
DatabaseSQLite (better-sqlite3)
Python MLDARTS/TTM prediction models
APIDexcom Share API

Getting Started

Prerequisites

  • Bun (recommended for full setup)
  • Python 3.10 (for prediction models)
  • Dexcom Share account credentials

Installation

  1. Clone the repository and install dependencies:
bun i
  1. Set up the Python environment for prediction models:
# Create and activate a Python virtual environment
python -m venv python_env
source python_env/bin/activate  # On Windows: python_env\Scripts\activate

# Install Python dependencies
pip install -r requirements.txt
  1. Configure environment variables (see below).

Configuration

This project uses a .env file for configuration. A .env.example file is provided for reference.

Running the Application

Development Mode

Run the Vite development server:

bun run dev

This starts the frontend on http://localhost:5173.

Backend Server

In a separate terminal, start the Bun backend server:

bun run server

This starts the backend on http://localhost:5000 with the following API endpoints:

MethodEndpointDescription
POST/api/save-dataSave glucose entries to SQLite
GET/api/get-data?startTime=&endTime=&minMmol=&maxMmol=Retrieve filtered glucose entries
GET/api/get-predictionsGet ML-based glucose predictions

Build for Production

bun run build

Preview Production Build

bun run preview

Project Structure

dexcom-viewer/
├── backend/
│   ├── db.js              # SQLite database operations
│   ├── predict_darts.js   # DARTS prediction model wrapper
│   ├── predict_ttm.js     # TTM prediction model wrapper
│   └── server.js          # Bun HTTP server
├── public/
│   ├── manifest.webmanifest
│   └── icon_base.png
├── python_env/            # Python virtual environment
├── src/
│   ├── components/
│   │   ├── Graph/
│   │   │   └── Graph.tsx  # Nivo line chart component
│   │   ├── Header.tsx
│   │   └── Loading.tsx
│   ├── system/
│   │   └── databaseHandler.ts  # Frontend DB interaction
│   ├── App.tsx            # Main application component
│   └── index.css
├── .env                   # Environment variables (not committed)
├── bunfig.toml            # Bun configuration
├── package.json
├── tailwind.config.js
├── tsconfig.json
└── vite.config.ts

License

MIT

Contributors

TechnotechGit

1 commits

TechnotechGit/dexcom-viewer

A web viewer for Dexcom share data, with prediction built in

0

stars

1

commits

TypeScript

primary language

Apr 26, 2026

updated

README

Dexcom Viewer

Dexcom Viewer Demo

A real-time glucose monitoring dashboard that fetches data from the Dexcom Share API, visualizes glucose trends, and provides short-term predictions using Python ML models.

Features

  • Fetches glucose readings from Dexcom Share (US & EU servers)
  • Real-time glucose value display with 60-minute and 24-hour trend graphs
  • Data visualization using Nivo line charts
  • Local SQLite database for glucose data persistence
  • Short-term glucose predictions via Python models (DARTS/TTM)
  • Responsive design with Tailwind CSS
  • Built with Bun for fast backend execution

Tech Stack

LayerTechnology
FrontendReact 18, TypeScript, Vite
StylingTailwind CSS
ChartsNivo (D3-based)
BackendBun (server.js)
DatabaseSQLite (better-sqlite3)
Python MLDARTS/TTM prediction models
APIDexcom Share API

Getting Started

Prerequisites

  • Bun (recommended for full setup)
  • Python 3.10 (for prediction models)
  • Dexcom Share account credentials

Installation

  1. Clone the repository and install dependencies:
bun i
  1. Set up the Python environment for prediction models:
# Create and activate a Python virtual environment
python -m venv python_env
source python_env/bin/activate  # On Windows: python_env\Scripts\activate

# Install Python dependencies
pip install -r requirements.txt
  1. Configure environment variables (see below).

Configuration

This project uses a .env file for configuration. A .env.example file is provided for reference.

Running the Application

Development Mode

Run the Vite development server:

bun run dev

This starts the frontend on http://localhost:5173.

Backend Server

In a separate terminal, start the Bun backend server:

bun run server

This starts the backend on http://localhost:5000 with the following API endpoints:

MethodEndpointDescription
POST/api/save-dataSave glucose entries to SQLite
GET/api/get-data?startTime=&endTime=&minMmol=&maxMmol=Retrieve filtered glucose entries
GET/api/get-predictionsGet ML-based glucose predictions

Build for Production

bun run build

Preview Production Build

bun run preview

Project Structure

dexcom-viewer/
├── backend/
│   ├── db.js              # SQLite database operations
│   ├── predict_darts.js   # DARTS prediction model wrapper
│   ├── predict_ttm.js     # TTM prediction model wrapper
│   └── server.js          # Bun HTTP server
├── public/
│   ├── manifest.webmanifest
│   └── icon_base.png
├── python_env/            # Python virtual environment
├── src/
│   ├── components/
│   │   ├── Graph/
│   │   │   └── Graph.tsx  # Nivo line chart component
│   │   ├── Header.tsx
│   │   └── Loading.tsx
│   ├── system/
│   │   └── databaseHandler.ts  # Frontend DB interaction
│   ├── App.tsx            # Main application component
│   └── index.css
├── .env                   # Environment variables (not committed)
├── bunfig.toml            # Bun configuration
├── package.json
├── tailwind.config.js
├── tsconfig.json
└── vite.config.ts

License

MIT

Contributors

TechnotechGit

1 commits

Languages

TypeScript

58.1%

JavaScript

37.3%

CSS

3.3%

HTML

1.3%