Loading repository data…
Loading repository data…
En-Min / repository
Full-stack Fitbit raw data dashboard with Python/FastAPI backend and React/TypeScript frontend
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A full-stack health data visualization dashboard for Fitbit devices. View all your raw Fitbit data that the official app doesn't show — per-second heart rate, detailed sleep stages, HRV analysis, and custom metric correlations.
| Page | Description |
|---|---|
| Overview | Daily health snapshot with 11 metric cards and status coloring |
| Heart Rate | Intraday timeline, resting HR trend, zone analysis, HRV tracking |
| Sleep | Sleep score trend, 30-second hypnogram, stage breakdown, vitals panel |
| Activity | Steps trend, hourly heatmap, activity minutes, VO2 Max, exercise log |
| Correlations | Scatter plots with trend lines, compare any two metrics |
| Settings | Upload exports, OAuth connect, manual sync trigger |
| Layer | Technology |
|---|---|
| Backend | Python 3.11, FastAPI, SQLAlchemy, SQLite |
| Frontend | React 19, TypeScript, Vite, Recharts |
| Auth | OAuth2 Authorization Code Grant |
git clone https://github.com/En-Min/fitbit-dashboard.git
cd fitbit-dashboard
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cd frontend
npm install
http://localhost:8000/api/auth/callbackexport FITBIT_CLIENT_ID=your_client_id
export FITBIT_CLIENT_SECRET=your_client_secret
Backend (terminal 1):
cd backend
source venv/bin/activate
uvicorn app.main:app --reload --port 8000
Frontend (terminal 2):
cd frontend
npm run dev
Open http://localhost:5173 in your browser.
Note: Fitbit's API has rate limits (~150 requests/hour). For large historical imports, use the export method.
├── backend/
│ ├── app/
│ │ ├── main.py # FastAPI app
│ │ ├── models.py # SQLAlchemy models (17 tables)
│ │ ├── database.py # DB connection
│ │ ├── config.py # Settings
│ │ ├── routers/
│ │ │ ├── data.py # Data endpoints + correlations
│ │ │ ├── auth.py # OAuth2 flow
│ │ │ └── upload.py # ZIP upload
│ │ ├── parsers/
│ │ │ └── export_parser.py # Google Takeout parser
│ │ └── services/
│ │ └── fitbit_sync.py # API sync service
│ └── tests/ # 136 tests
├── frontend/
│ ├── src/
│ │ ├── pages/ # 6 dashboard pages
│ │ ├── components/ # Reusable components
│ │ ├── api/client.ts # API client
│ │ └── types/index.ts # TypeScript interfaces
│ └── tests/ # 19 tests
└── docs/plans/ # Design documents
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health | Health check |
| GET | /api/metrics | List available metrics with date ranges |
| GET | /api/data/overview | Daily summary for a date |
| GET | /api/data/heart-rate/intraday | Per-second HR for a day |
| GET | /api/data/heart-rate/daily | Daily HR summaries |
| GET | /api/data/sleep | Sleep logs |
| GET | /api/data/sleep/stages/{id} | 30-second sleep stages |
| GET | /api/data/spo2 | SpO2 readings |
| GET | /api/data/hrv | HRV data |
| GET | /api/data/activity | Daily activity |
| GET | /api/data/correlations | Correlation analysis |
| POST | /api/upload | Upload export ZIP |
| GET | /api/auth/fitbit | Start OAuth flow |
| GET | /api/auth/status | Check auth status |
| POST | /api/sync | Trigger data sync |
Backend:
cd backend
source venv/bin/activate
pytest -v
Frontend:
cd frontend
npm test
MIT