Build
FitLife Architecture
FitLife uses a product-style architecture: a Next.js frontend, Flask gateway, AI services, and a shared data layer that keeps nutrition, workouts, and coaching connected.
Stack
Next.js 15 + React 19 frontend
Flask API gateway with JWT auth
OCR label extraction pipeline
YOLOv8-based workout analysis
Knowledge-grounded meal coach with chat history
Dashboard flows for scans and workouts
Current API Routes
These are the main live routes exposed by the FitLife gateway and used by the frontend for auth, profile persistence, nutrition scoring, workout analysis, and coach chat.
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Gateway health check |
| GET | /api/v1/health | API health check |
| POST | /api/v1/auth/register | Create a new account |
| POST | /api/v1/auth/login | Get JWT tokens |
| POST | /api/v1/auth/refresh | Refresh access token |
| GET | /api/v1/user | Get current user profile |
| PUT | /api/v1/user/settings | Update user settings |
| DELETE | /api/v1/user | Delete the signed-in account |
| GET | /api/v1/user/scans | Load saved nutrition scan history |
| GET | /api/v1/user/workouts | Load saved workout history |
| GET | /api/v1/dashboard/stats | Dashboard statistics |
| POST | /api/v1/nutri-ai/upload | Upload nutrition label image |
| POST | /api/v1/nutri-ai/analyze | Analyze nutrition data |
| GET | /api/v1/muscle-ai/exercises | List supported workout types |
| POST | /api/v1/muscle-ai/upload | Upload workout video |
| GET | /api/v1/muscle-ai/task/:id | Poll workout task status |
| POST | /api/v1/ana/chat | Chat with FitLife Coach |