safeeyes
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder
翻訳待ち
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Personal health tracker. Collects daily metrics from a wearable, stores them in Supabase, and delivers insights via Telegram:
Migrated from Oura Ring to Fitbit Air. The Fitbit Web API shut down on 2 November 2026; its replacement is the Google Health API. Collection into
fitbit_logsandfitbit_workoutsis live. The Oura side is dormant: its data is kept as history, its scheduled workflows are disabled. Scoring and alerts are paused until enough Fitbit history accumulates for personal baselines. Seeplan.mdanddocs/fitbit-migration/.
| Layer | Service |
|---|---|
| Data sources | Google Health API (active), Oura Ring API v2 (dormant) |
| Database | Supabase (PostgreSQL) |
| Bot hosting | Render.com |
| Automation | GitHub Actions |
| AI analysis | OpenAI GPT |
| Delivery | Telegram Bot API |
Oura API → GitHub Actions → Supabase (health_logs) → alert_checker.py → Telegram
Google Health API → GitHub Actions → Supabase (fitbit_logs) → send_telegram_message.py (weekly)
Telegram → Render (bot.py) → Supabase (user registration)
Browser → login.html (Telegram Widget) → Render /auth/telegram → JWT (APP_SECRET)
Browser → dashboard.js → Render /api/logs, /api/weekly → Supabase → JSON
Data is collected daily via scheduled GitHub Actions workflows. Per-user credentials — the Oura token and the Google refresh token — live in Supabase, not in code or environment files.
The dashboard authenticates users via Telegram Login Widget. The backend (Render/Flask) issues its own JWT signed with APP_SECRET and acts as a proxy to Supabase using the service_role key. The frontend never accesses Supabase directly.
Worth knowing before touching the collector:
users/me/dataSourceFamilies/google-wearables, phone step counts are mixed into the series.steps, distance, heart-rate, …) must be read via :dailyRollUp, not :list.Available at: https://demonk03.github.io/health-tracker/
/start — onboarding
/register <oura_access_token> — connect your Oura account
/status — view latest metrics
/stop — disconnect
| Workflow | Schedule | What it does |
|---|---|---|
| Update data | Daily 07:00 UTC | Fetches Oura data for all users |
| Update Fitbit data | Daily 09:00 UTC | Fetches Google Health data, refetches the last 7 days |
| Alert check | Daily 07:30 UTC | Checks for metric deviations, sends Telegram alerts |
| Weekly report | Sunday 21:00 UTC | Sends AI-generated weekly digest |
Fitbit collection runs later in the day on purpose: Google backfills overnight HRV, temperature and respiratory rate only by midday.
See docs/internal.md for the Oura side and docs/fitbit-migration/00-google-health-setup.md for Google Health.