docs: replace ASCII architecture diagram with Mermaid in roadmap
This commit is contained in:
+57
-43
@@ -159,49 +159,63 @@
|
|||||||
|
|
||||||
## 📐 Architecture Actuelle
|
## 📐 Architecture Actuelle
|
||||||
|
|
||||||
```
|
```mermaid
|
||||||
┌─────────────────────────────────────────────────────────┐
|
graph TB
|
||||||
│ FRONTEND (SPA) │
|
subgraph FRONTEND["🖥️ FRONTEND (SPA)"]
|
||||||
│ Vanilla JS + Tailwind CSS + Chart.js + SortableJS │
|
direction LR
|
||||||
│ Canvas Gauges • Dark Mode • Mobile-First │
|
FE_TECH["Vanilla JS · Tailwind CSS · Chart.js · SortableJS<br/>Canvas Gauges · Dark Mode · Mobile-First"]
|
||||||
└─────────────────┬───────────────────────────────────────┘
|
end
|
||||||
│ REST API (JWT)
|
|
||||||
┌─────────────────▼───────────────────────────────────────┐
|
subgraph BACKEND["⚙️ BACKEND (FastAPI)"]
|
||||||
│ BACKEND (FastAPI) │
|
direction TB
|
||||||
│ │
|
subgraph ROUTES["Routes API"]
|
||||||
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────────┐ │
|
AUTH["🔐 Auth<br/>/api/auth"]
|
||||||
│ │ Auth │ │Challenges│ │ Health │ │ Analytics │ │
|
CHAL["🎯 Challenges<br/>/api/challenges"]
|
||||||
│ │ /api/auth│ │/api/chal-│ │ /api/ │ │ /api/ │ │
|
HEALTH["❤️ Health<br/>/api/health*"]
|
||||||
│ │ │ │ lenges │ │ health* │ │ analytics │ │
|
ANALYTICS["📊 Analytics<br/>/api/analytics"]
|
||||||
│ └──────────┘ └──────────┘ └──────────┘ └────────────┘ │
|
HC_API["📱 Health Connect<br/>/api/health-connect/sync-raw"]
|
||||||
│ ┌──────────────────────────────────────────────────────┐│
|
end
|
||||||
│ │ Health Connect API ││
|
subgraph SERVICES["Service Layer"]
|
||||||
│ │ /api/health-connect/sync • /sync-raw • Raw Storage ││
|
AUTH_SVC["AuthService"]
|
||||||
│ └──────────────────────────────────────────────────────┘│
|
AGG_SVC["AggregationService"]
|
||||||
│ ┌──────────────────────────────────────────────────────┐│
|
HP["HealthProvider"]
|
||||||
│ │ Service Layer ││
|
end
|
||||||
│ │ AuthService • AggregationService • HealthProvider ││
|
ROUTES --> SERVICES
|
||||||
│ └──────────────────────────────────────────────────────┘│
|
end
|
||||||
└─────────────────┬───────────────────────────────────────┘
|
|
||||||
│ SQLAlchemy ORM
|
subgraph DB["🗄️ DATABASE (PostgreSQL / SQLite)"]
|
||||||
┌─────────────────▼───────────────────────────────────────┐
|
direction LR
|
||||||
│ DATABASE (PostgreSQL / SQLite) │
|
subgraph CORE["6 Core Tables"]
|
||||||
│ │
|
CORE_T["users · challenges · tracking<br/>daily_health_metrics<br/>daily_context · workout_sessions"]
|
||||||
│ 6 Core Tables │ 3 HC Aggregated │ 15 HC Raw Tables │
|
end
|
||||||
│ users │ sync_logs │ hc_raw_steps │
|
subgraph HC_AGG["3 HC Aggregated"]
|
||||||
│ challenges │ daily_metrics │ hc_raw_heart_* │
|
HC_T["sync_logs · daily_metrics<br/>exercise_sessions"]
|
||||||
│ tracking │ exercise_sessions│ hc_raw_sleep_* │
|
end
|
||||||
│ daily_health_* │ │ hc_raw_spo2... │
|
subgraph HC_RAW["15 HC Raw Tables"]
|
||||||
│ daily_context │ │ (15 total) │
|
RAW_T["hc_raw_steps · heart_rate · sleep_*<br/>spo2 · weight · calories · distance<br/>exercise · nutrition · hydration · hrv"]
|
||||||
│ workout_sess. │ │ │
|
end
|
||||||
└─────────────────┬───────────────────────────────────────┘
|
end
|
||||||
│
|
|
||||||
┌─────────────────▼───────────────────────────────────────┐
|
subgraph ANDROID["📱 ANDROID COMPANION"]
|
||||||
│ ANDROID COMPANION APP │
|
ANDROID_TECH["Kotlin · Retrofit · Health Connect SDK<br/>Auto-sync · Sync History · Connection Test"]
|
||||||
│ Health Connect API → Raw Records → POST /sync-raw │
|
end
|
||||||
│ Kotlin • Retrofit • Jetpack • Health Connect SDK │
|
|
||||||
│ Auto-sync • Sync History • Connection Test │
|
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
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user