Your phone has been tracking your body for years. It's time to listen
Cadence analyzes your Apple Health data to discover your chronotype - your biological sleep-wake preference - and builds a personalized profile showing when your body is primed to focus, rest, and recover.
🚀 cadence-chronotype.up.railway.app - no setup required!
Upload your Apple Health export and Cadence will:
- Classify your chronotype - Lion, Bear, Wolf, or Dolphin - based on your actual biometric patterns
- Map your 24-hour energy curve from step records
- Analyze your sleep - consistency, duration, bedtime pattern, and wake times
- Detect biphasic sleep - if you're a natural napper, Cadence identifies it and optimizes your nap window
- Generate a personalized profile - recommendations, rulebook, and optimized daily schedule tailored to your rhythm
- Handle low confidence data - if your data is sparse, Cadence gives you a 2-week experiment to establish your rhythm
- Chat with Cadence - ask follow-up questions about your results using an AI assistant trained on your profile.
- No Apple Health? - take the chronotype quiz for a self-reported profile
| Type | Population | Peak Hours | Bedtime |
|---|---|---|---|
| 🦁 Lion | 15% | 5am - 10am | 9-10:30pm |
| 🐻 Bear | 50% | 10am - 2pm | 10:30-11:30pm |
| 🐺 Wolf | 15% | 7pm - 12am | 12-1:30am |
| 🐬 Dolphin | 10% | 10am - 2pm | 12-1am |
- Backend - Python, Flask, SQLAlchemy, SQLite (local) / PostgreSQL (production)
- AI - Groq AI (LLaMA 3.3 70B) for chronotype classification and chat
- Parsing - Iterative XML parsing for large Apple Health exports
- Frontend - Vanilla HTML/CSS/JS, Chart.js, Tailwind CSS
- Fonts - Cormorant Garamond + Inter
git clone https://github.com/t-skayemba/cadence.git
cd cadencepip3 install -r requirements.txtGet a free API key at console.groq.com
Copy the template file
cp .env.example .envOpen .env and replace your_groq_api_key_here with your actual key.
python3 app.pyVisit http://127.0.0.1:5000
- Open the Health app on your iPhone
- Tap your profile picture (top right)
- Scroll down and tap Export All Health Data
- Save the ZIP and upload it to Cadence
Sample exports are included in the test_data/ folder:
| File | Chronotype | Notes |
|---|---|---|
lion_high_confidence.zip |
Lion | 90 days, early riser |
bear_high_confidence.zip |
Bear | 90 days, solar-aligned |
wolf_high_confidence.zip |
Wolf | 90 days, night owl |
bear_biphasic_short_naps.zip |
Bear + Biphasic | 20–35 min naps |
lion_biphasic_long_naps.zip |
Lion + Biphasic | 60–120 min naps |
wolf_biphasic_medium_naps_medium_confidence.zip |
Wolf + Biphasic | 30 days, medium confidence |
bear_medium_confidence.zip |
Bear | 21 days, medium confidence |
low_confidence_sparse.zip |
Unknown | Triggers Mode 2 + quiz supplement |
cadence/
├── app.py # Flask routes
├── parser.py # Apple Health XML parser
├── analyzer.py # Metric computation
├── ai.py # Groq API integration
├── models.py # SQLAlchemy models
├── templates/
│ ├── index.html # Landing page
│ ├── upload.html # Upload page
│ ├── profile.html # Profile dashboard
│ ├── chronotypes.html # Chronotypes explainer
│ ├── quiz.html # Chronotype quiz for non-Apple Health users
│ ├── quiz_supplement.html # Supplement quiz for low confidence profiles
│ └── 404.html # 404 error page
├── static/
│ ├── lion.png
│ ├── bear.png
│ ├── wolf.png
│ └── dolphin.png
├── test_data/ # Sample Apple Health exports
├── requirements.txt
└── .env # API key (not committed)
Built by Tiana Shashi Kayemba
MIT