docs: replace ASCII architecture diagram with Mermaid in roadmap

This commit is contained in:
2026-07-31 08:42:04 -04:00
parent 6e779ba695
commit 5ace38bd67
+57 -43
View File
@@ -159,49 +159,63 @@
## 📐 Architecture Actuelle
```
┌─────────────────────────────────────────────────────────┐
│ FRONTEND (SPA) │
│ Vanilla JS + Tailwind CSS + Chart.js + SortableJS │
│ Canvas Gauges • Dark Mode • Mobile-First │
└─────────────────┬───────────────────────────────────────┘
│ REST API (JWT)
┌─────────────────▼───────────────────────────────────────┐
│ BACKEND (FastAPI) │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────────┐ │
│ │ Auth │ │Challenges│ │ Health │ │ Analytics │ │
│ │ /api/auth│ │/api/chal-│ │ /api/ │ │ /api/ │ │
│ │ │ │ lenges │ │ health* │ │ analytics │ │
│ └──────────┘ └──────────┘ └──────────┘ └────────────┘ │
│ ┌──────────────────────────────────────────────────────┐│
│ │ Health Connect API ││
│ │ /api/health-connect/sync • /sync-raw • Raw Storage ││
│ └──────────────────────────────────────────────────────┘│
│ ┌──────────────────────────────────────────────────────┐│
│ │ Service Layer ││
│ │ AuthService • AggregationService • HealthProvider ││
│ └──────────────────────────────────────────────────────┘│
└─────────────────┬───────────────────────────────────────┘
│ SQLAlchemy ORM
┌─────────────────▼───────────────────────────────────────┐
│ DATABASE (PostgreSQL / SQLite) │
│ │
│ 6 Core Tables │ 3 HC Aggregated │ 15 HC Raw Tables │
│ users │ sync_logs │ hc_raw_steps │
│ challenges │ daily_metrics │ hc_raw_heart_* │
│ tracking │ exercise_sessions│ hc_raw_sleep_* │
│ daily_health_* │ │ hc_raw_spo2... │
│ daily_context │ │ (15 total) │
│ workout_sess. │ │ │
└─────────────────┬───────────────────────────────────────┘
│
┌─────────────────▼───────────────────────────────────────┐
│ ANDROID COMPANION APP │
│ Health Connect API → Raw Records → POST /sync-raw │
│ Kotlin • Retrofit • Jetpack • Health Connect SDK │
│ Auto-sync • Sync History • Connection Test │
└─────────────────────────────────────────────────────────┘
```mermaid
graph TB
subgraph FRONTEND["🖥️ FRONTEND (SPA)"]
direction LR
FE_TECH["Vanilla JS · Tailwind CSS · Chart.js · SortableJS<br/>Canvas Gauges · Dark Mode · Mobile-First"]
end
subgraph BACKEND["⚙️ BACKEND (FastAPI)"]
direction TB
subgraph ROUTES["Routes API"]
AUTH["🔐 Auth<br/>/api/auth"]
CHAL["🎯 Challenges<br/>/api/challenges"]
HEALTH["❤️ Health<br/>/api/health*"]
ANALYTICS["📊 Analytics<br/>/api/analytics"]
HC_API["📱 Health Connect<br/>/api/health-connect/sync-raw"]
end
subgraph SERVICES["Service Layer"]
AUTH_SVC["AuthService"]
AGG_SVC["AggregationService"]
HP["HealthProvider"]
end
ROUTES --> SERVICES
end
subgraph DB["🗄️ DATABASE (PostgreSQL / SQLite)"]
direction LR
subgraph CORE["6 Core Tables"]
CORE_T["users · challenges · tracking<br/>daily_health_metrics<br/>daily_context · workout_sessions"]
end
subgraph HC_AGG["3 HC Aggregated"]
HC_T["sync_logs · daily_metrics<br/>exercise_sessions"]
end
subgraph HC_RAW["15 HC Raw Tables"]
RAW_T["hc_raw_steps · heart_rate · sleep_*<br/>spo2 · weight · calories · distance<br/>exercise · nutrition · hydration · hrv"]
end
end
subgraph ANDROID["📱 ANDROID COMPANION"]
ANDROID_TECH["Kotlin · Retrofit · Health Connect SDK<br/>Auto-sync · Sync History · Connection Test"]
end
FRONTEND -->|"REST API (JWT)"| BACKEND
BACKEND -->|"SQLAlchemy ORM"| DB
ANDROID -->|"POST /sync-raw"| HC_API
ANDROID -.->|"Health Connect API"| HC["🏥 Android Health Connect"]
HC -->|"Raw Records"| ANDROID
style FRONTEND fill:#1e293b,stroke:#38bdf8,color:#e2e8f0
style BACKEND fill:#1e293b,stroke:#10b981,color:#e2e8f0
style DB fill:#1e293b,stroke:#f59e0b,color:#e2e8f0
style ANDROID fill:#1e293b,stroke:#a78bfa,color:#e2e8f0
style HC fill:#1e293b,stroke:#ef4444,color:#e2e8f0
style ROUTES fill:#0f172a,color:#e2e8f0
style SERVICES fill:#0f172a,color:#e2e8f0
style CORE fill:#0f172a,color:#e2e8f0
style HC_AGG fill:#0f172a,color:#e2e8f0
style HC_RAW fill:#0f172a,color:#e2e8f0
```
---