release: v1.0.0 — Production
- FastAPI lifespan (deprecation fix, 0 warnings)
- 28 tests (vues, filtres, tris, APIs, CSRF, CORS, DB)
- CI/CD Gitea Actions (.gitea/workflows/ci.yml)
- Version 1.0.0: main.py, api.py, health endpoint
- CHANGELOG.md v1.0.0
- ARCHITECTURE.md: 12 tables, routes complètes
- ROADMAP: all versions ✅
This commit is contained in:
+88
-59
@@ -1,72 +1,101 @@
|
||||
# Architecture FlowDeck
|
||||
# Architecture FlowDeck v1.0.0
|
||||
|
||||
## Schéma
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────────────┐
|
||||
│ Browser │
|
||||
│ HTMX + Alpine.js + SortableJS │
|
||||
└──────────────┬───────────────────────────────┘
|
||||
┌──────────────────────────────────────────────────────────┐
|
||||
│ Browser │
|
||||
│ HTMX + Alpine.js + SortableJS + CSS Notion (31 KB) │
|
||||
└──────────────┬──────────────────────────────────────────┘
|
||||
│ HTTP (Jinja2 HTML / JSON API)
|
||||
┌──────────────▼───────────────────────────────┐
|
||||
│ FastAPI (Python) │
|
||||
│ ┌──────────┬──────────┬──────────┐ │
|
||||
│ │ dashboard│ board │ notes │ api │
|
||||
│ └────┬─────┴────┬─────┴──────────┴────┬─────┘
|
||||
│ │ │ │
|
||||
│ ┌────▼──────────▼─────────────────────▼─────┐
|
||||
│ │ GiteaClient (httpx async) │
|
||||
│ │ repos, issues, labels, milestones │
|
||||
│ └──────────────────┬────────────────────────┘
|
||||
│ │
|
||||
│ ┌──────────────────▼────────────────────────┐
|
||||
│ │ SQLite (WAL mode) │
|
||||
│ │ boards, cards, notes, col_mapping │
|
||||
│ └───────────────────────────────────────────┘
|
||||
└──────────────────────┬────────────────────────┘
|
||||
┌──────────────▼──────────────────────────────────────────┐
|
||||
│ FastAPI (Python) — lifespan │
|
||||
│ ┌──────────┬──────────┬──────────┬──────────┐ │
|
||||
│ │ dashboard│ board │ notes │ api │ │
|
||||
│ │ │ 5 vues │ │ CRUD │ │
|
||||
│ │ │ filtres │ │ issues │ │
|
||||
│ │ │ tri │ │ checklists│ │
|
||||
│ │ │ props │ │ │ │
|
||||
│ └────┬─────┴────┬─────┴──────────┴────┬─────┘ │
|
||||
│ │ │ │ │
|
||||
│ ┌────▼──────────▼─────────────────────▼─────┐ │
|
||||
│ │ GiteaClient (httpx async) │ │
|
||||
│ └──────────────────┬────────────────────────┘ │
|
||||
│ │ │
|
||||
│ ┌──────────────────▼────────────────────────┐ │
|
||||
│ │ SQLite (WAL mode) │ │
|
||||
│ │ boards, cards, notes, col_mapping │ │
|
||||
│ │ checklists, checklist_items │ │
|
||||
│ │ project_properties, property_values │ │
|
||||
│ │ ai_keywords │ │
|
||||
│ │ users, user_tokens │ │
|
||||
│ └───────────────────────────────────────────┘ │
|
||||
└──────────────────────┬───────────────────────────────────┘
|
||||
│ HTTPS
|
||||
┌──────────────────────▼────────────────────────┐
|
||||
│ Gitea API REST v1 │
|
||||
│ git.dracodev.net │
|
||||
└───────────────────────────────────────────────┘
|
||||
┌──────────────────────▼───────────────────────────────────┐
|
||||
│ Gitea API REST v1 │
|
||||
│ git.dracodev.net │
|
||||
└──────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Flux de données
|
||||
|
||||
1. **Dashboard** : appelle `/api/v1/user/repos` + `/api/v1/user/orgs` Gitea → affiche liste projets
|
||||
2. **Board** : appelle `/api/v1/repos/{owner}/{repo}/issues` → mappe sur colonnes via BDD locale
|
||||
3. **Drag & drop** : SortableJS → `POST /api/move` → mise à jour SQLite + sync Gitea (labels/close)
|
||||
4. **Notes** : stockées en SQLite local (non sync Gitea)
|
||||
1. **Dashboard** → `/api/v1/user/repos` Gitea → liste projets avec sidebar
|
||||
2. **Board** → `/api/v1/repos/{o}/{r}/issues` → cartes mappées sur colonnes
|
||||
3. **5 vues** → `/board/{o}/{r}/view/{kanban|table|status|teamload|detailed}` — fragments HTMX
|
||||
4. **Filtres** → `status=todo,progress&filter=assignee:X&sort=status:asc`
|
||||
5. **Drag & drop** → SortableJS → `POST /api/move` → BDD + Gitea labels
|
||||
6. **Propriétés custom** → `project_properties` + `property_values` tables
|
||||
7. **AI Keywords** → auto-extraction depuis labels + body → `ai_keywords` table
|
||||
8. **Sync** → `POST /board/api/sync/{o}/{r}` → fetch + update + extract
|
||||
|
||||
## Tables DB (12)
|
||||
|
||||
| Table | Rôle |
|
||||
|-------|------|
|
||||
| `boards` | Config Kanban par projet |
|
||||
| `cards` | Position issues dans colonnes |
|
||||
| `col_mapping` | Colonne → label Gitea |
|
||||
| `notes` | Notes markdown |
|
||||
| `checklists` | Checklists par issue |
|
||||
| `checklist_items` | Items de checklist |
|
||||
| `users` | Utilisateurs locaux |
|
||||
| `user_tokens` | Tokens Gitea OAuth |
|
||||
| `project_properties` | Propriétés custom par projet |
|
||||
| `property_values` | Valeurs par issue |
|
||||
| `ai_keywords` | Mots-clés auto-extraits |
|
||||
|
||||
## Routes (v1.0.0)
|
||||
|
||||
```
|
||||
GET / → Dashboard
|
||||
GET /board/{owner}/{repo} → Board Kanban
|
||||
GET /board/{owner}/{repo}/view/{view} → Fragment vue
|
||||
GET /board/api/properties/{o}/{r} → Liste propriétés
|
||||
POST /board/api/properties/{o}/{r} → Créer propriété
|
||||
DEL /board/api/properties/{o}/{r} → Supprimer propriété
|
||||
POST /board/api/properties/{o}/{r}/values → Set valeur propriété
|
||||
GET /board/api/ai-keywords/{o}/{r} → Liste keywords
|
||||
POST /board/api/ai-keywords/{o}/{r}/extract → Extraire keywords
|
||||
POST /board/api/sync/{o}/{r} → Sync complète
|
||||
|
||||
GET /api/health → Health check
|
||||
GET /api/stats → Statistiques
|
||||
GET /api/projects → Projets JSON
|
||||
POST /api/move → Déplacer carte
|
||||
GET /api/issues/{o}/{r}/{id} → Issue detail (JSON)
|
||||
GET /api/issues/{o}/{r}/{id}?format=html → Issue detail (HTML modal)
|
||||
POST /api/issues/{o}/{r} → Créer issue
|
||||
PATCH /api/issues/{o}/{r}/{id} → Update issue
|
||||
POST /api/checklists/{o}/{r}/{id} → Créer checklist
|
||||
POST /api/checklist-items/... → Ajouter item
|
||||
PATCH /api/checklist-items/{id} → Toggle item
|
||||
```
|
||||
|
||||
## Décisions techniques
|
||||
|
||||
- **SQLite (pas PostgreSQL)** : KISS. Un fichier, pas de serveur. Migration future triviale via Alembic si besoin.
|
||||
- **HTMX + Alpine.js (pas React)** : Léger, progressif. Pas de build step.
|
||||
- **Cache Gitea in-memory** : TTL configurable, pas de Redis. Suffisant pour <100 repos.
|
||||
- **Pas d'auth OAuth en v0.2** : token global Gitea. OAuth par utilisateur prévu v0.3.
|
||||
- **Pas de webhooks** : polling implicite au refresh. Webhooks prévus v0.4.
|
||||
|
||||
## Base de données
|
||||
|
||||
```
|
||||
boards → config Kanban par projet (colonnes, WIP)
|
||||
cards → position des issues dans les colonnes
|
||||
notes → notes markdown par projet
|
||||
col_mapping → mapping colonne→label Gitea (sync bidirectionnelle)
|
||||
```
|
||||
|
||||
## Routes
|
||||
|
||||
```
|
||||
GET / → Dashboard projets
|
||||
GET /board/{owner}/{repo} → Board Kanban
|
||||
GET /notes/{owner}/{repo} → Notes markdown
|
||||
POST /notes/{owner}/{repo} → Sauvegarder notes
|
||||
GET /api/health → Health check
|
||||
GET /api/stats → Statistiques
|
||||
GET /api/projects → Projets (JSON)
|
||||
POST /api/move → Déplacer carte
|
||||
POST /api/col-mapping → Config mapping colonne→label
|
||||
GET /api/board-config/{o}/{r} → Config board
|
||||
POST /api/board-config/{o}/{r} → MàJ config board
|
||||
```
|
||||
- **SQLite**: KISS, un fichier, pas de serveur
|
||||
- **HTMX + Alpine.js**: Léger, pas de build step, fragments HTML
|
||||
- **CSS custom**: Design system Notion, pas de framework CSS
|
||||
- **SortableJS**: Drag & drop natif, pas de React dnd
|
||||
- **Jinja2 server-side**: Templates côté serveur, HTMX pour interactivité
|
||||
|
||||
Reference in New Issue
Block a user