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.
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite |
| Styling | Tailwind CSS |
| Charts | Nivo (D3-based) |
| Backend | Bun (server.js) |
| Database | SQLite (better-sqlite3) |
| Python ML | DARTS/TTM prediction models |
| API | Dexcom Share API |
bun i
# 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
This project uses a .env file for configuration. A .env.example file is provided for reference.
Run the Vite development server:
bun run dev
This starts the frontend on http://localhost:5173.
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:
| Method | Endpoint | Description |
|---|---|---|
POST | /api/save-data | Save glucose entries to SQLite |
GET | /api/get-data?startTime=&endTime=&minMmol=&maxMmol= | Retrieve filtered glucose entries |
GET | /api/get-predictions | Get ML-based glucose predictions |
bun run build
bun run preview
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
MIT
1 commits
TypeScript
58.1%
JavaScript
37.3%
CSS
3.3%
HTML
1.3%
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.
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite |
| Styling | Tailwind CSS |
| Charts | Nivo (D3-based) |
| Backend | Bun (server.js) |
| Database | SQLite (better-sqlite3) |
| Python ML | DARTS/TTM prediction models |
| API | Dexcom Share API |
bun i
# 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
This project uses a .env file for configuration. A .env.example file is provided for reference.
Run the Vite development server:
bun run dev
This starts the frontend on http://localhost:5173.
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:
| Method | Endpoint | Description |
|---|---|---|
POST | /api/save-data | Save glucose entries to SQLite |
GET | /api/get-data?startTime=&endTime=&minMmol=&maxMmol= | Retrieve filtered glucose entries |
GET | /api/get-predictions | Get ML-based glucose predictions |
bun run build
bun run preview
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
MIT
1 commits
TypeScript
58.1%
JavaScript
37.3%
CSS
3.3%
HTML
1.3%