Personal health dashboard frontend. Displays data from Maekbak API.
| Resource | URL |
|---|---|
| Site | https://cowens.com/myvitals |
| Backend API | https://api.maekbak.cowens.com |
| Page | Description |
|---|---|
| Dashboard | Overview with key metrics |
| Profile | Chuck's health profile |
| Telemetry | Detailed metrics, charts, GKI entry |
| Supplements | Current supplement stack |
| Protocols | Nutrition protocols |
| Goals | Health & martial arts goals |
| Timeline | Weight loss journey milestones |
| Philosophy | Motivational quotes |
C:\Users\cowens\Desktop\myvitals\/var/www/cowens.com/myvitals/myvitals/
βββ index.html # Dashboard
βββ css/
β βββ styles.css
βββ js/
β βββ api.js # MaekbakAPI client
β βββ app.js # Main application
β βββ weight-data.js # Weight data store
β βββ bodycomp-data.js # Body composition
β βββ health-data.js # Recovery/sleep
β βββ sleep-data.js # Sleep details
β βββ training-data.js # Strain data
β βββ waist-data.js # Waist measurements
β βββ gki-data.js # GKI readings
β βββ quotes-data.js # Motivational quotes
βββ pages/
β βββ profile.html
β βββ telemetry.html # GKI entry form here
β βββ supplements.html
β βββ protocols.html
β βββ goals/
β βββ timeline.html
β βββ philosophy.html
β βββ menu.html
βββ images/
All data loads from Maekbak API via js/api.js:
const MaekbakAPI = {
baseUrl: 'https://api.maekbak.cowens.com/api/v1',
userId: '36b97660-94b9-4c1e-a564-a6f4bec00474',
async getLatestMetrics() { ... },
async getWeightHistory(days) { ... },
async getRecoveryHistory(days) { ... },
async getSleepHistory(days) { ... },
async getStrainHistory(days) { ... },
async getGKIHistory(days) { ... },
async createGKIReading(glucose, ketones, measuredAt) { ... },
// ... more endpoints
};
| Store | API Endpoint | Description |
|---|---|---|
weightData |
/metrics/weight |
Weight history |
bodyCompData |
Shares weightData.readings |
Body composition |
healthData |
/metrics/recovery + /metrics/sleep |
Recovery/sleep |
sleepData |
/metrics/sleep |
Sleep details |
trainingData |
/metrics/strain |
Strain data |
waistData |
/waist |
Waist measurements |
gkiData |
/metrics/gki |
GKI readings |
quotesData |
/quotes |
Motivational quotes |
The telemetry page has a GKI entry form with:
| GKI | Zone | Color |
|---|---|---|
| < 3 | Deep/Therapeutic | Green |
| 3-6 | Moderate (Fat Burning) | Gold |
| 6-9 | Low Ketosis | Orange |
| > 9 | Not in Ketosis | Red |
Currently myVitals has a hardcoded user ID and no authentication. This roadmap outlines the path to a proper multi-user system and mobile app.
Priority: High (prerequisite for everything else)
New Endpoints:
| Endpoint | Method | Description |
|---|---|---|
/auth/register |
POST | Create new user account |
/auth/login |
POST | Authenticate, return JWT token |
/auth/me |
GET | Verify token, return user info |
/auth/refresh |
POST | Refresh expiring token |
/auth/logout |
POST | Invalidate token |
Database Changes:
ALTER TABLE user_profiles ADD COLUMN email VARCHAR(255) UNIQUE;
ALTER TABLE user_profiles ADD COLUMN password_hash VARCHAR(255);
ALTER TABLE user_profiles ADD COLUMN created_at TIMESTAMP DEFAULT NOW();
ALTER TABLE user_profiles ADD COLUMN last_login TIMESTAMP;
API Changes:
python-jose for JWT handlingpasslib with bcrypt for password hashing/api/v1/users/{id}/ endpoints require valid tokenPriority: High
New Pages:
login.html - Login formregister.html - Registration form (optional, can be admin-only)JavaScript Changes:
Authorization: Bearer <token>)Flow:
User visits myVitals
β
No token? β Redirect to login
β
Login β Store token β Load dashboard
β
API calls include token β Maekbak validates
Priority: Medium (after web auth works)
Stack:
Screens:
| Screen | Description |
|---|---|
| Login | Email/password auth |
| Dashboard | Key metrics overview |
| Weight | Weight tracking + chart |
| Recovery | HRV, RHR, sleep score |
| GKI | Manual entry + history |
| Profile | User settings |
Features:
Priority: Low
Once Maekbak auth is solid, other apps can use it:
Phase 1 (API Auth)
β
Phase 2 (Web Auth) βββ Can happen in parallel after Phase 1
β
Phase 3 (Mobile App)
β
Phase 4 (Centralized Auth)