Files
glucose-dashboard/README.md
T
willemjanandClaude Sonnet 5 3ef9a7666a add reporting foundation: multipage nav, auth gate, date-range fetch
First increment of the clinical reporting feature (see
docs/requirements-reporting.md and docs/design-reporting.md): moves the
existing live view to pages/1_Live.py, adds a password gate since the
dashboard URL will be shared with the diabetes team, adds
fetch_entries_range/fetch_treatments_range for multi-day report queries,
and adds reporting.py with the core clinical calculations (GMI, %CV,
5-band time-in-range, hypo/hyper event detection per the Battelino et al.
2019 persistence rule). No report pages wired up yet — that's next.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-26 20:00:48 +02:00

43 lines
1.3 KiB
Markdown

# glucose-dashboard
Dashboard van glucosedata, live opgehaald uit een [Nightscout](https://nightscout.github.io/)-instantie.
Meerdere pagina's (zie zijbalk): een rollend live-overzicht en een set
klinische rapportagepagina's (zie `docs/requirements-reporting.md` en
`docs/design-reporting.md`).
## Instellen
1. Zorg voor een draaiende Nightscout-instantie en een API-token (Admin Tools
> Manage Tokens in Nightscout — geef het token minimaal `readable`-rechten)
of het klassieke API secret.
2. Kopieer `.env.example` naar `.env` en vul `NIGHTSCOUT_URL`, één van de
twee auth-opties, en `DASHBOARD_PASSWORD_HASH` in (zie het voorbeeldbestand
voor hoe je die hash genereert — de dashboard-URL wordt gedeeld met het
diabetesteam, dus elke pagina zit achter een wachtwoord). `app.py` laadt
`.env` zelf in (via `python-dotenv`), dus dit werkt hetzelfde onder
PowerShell, cmd of bash — je hoeft de variabelen niet zelf in je shell te
zetten.
3. Lokaal draaien:
```powershell
uv venv
uv pip install -r requirements.txt --python .venv
.venv\Scripts\streamlit run app.py
```
4. Met Docker Compose:
```bash
docker compose up -d
```
`docker-compose.yml` leest `.env` via `env_file` — dat bestand wordt niet
meegecommit (zie `.gitignore`).
## Tests en lint
```bash
pytest tests/ -v
ruff check .
```