feat: WebSocket temps réel + Finance Workflow + corrections

- Task #6: WebSocket /ws/dashboard + Kafka events (5 topics)
  * Backend: KafkaEventProducer, KafkaEventConsumer
  * Mobile: WebSocketService (reconnection, heartbeat, typed events)
  * DashboardBloc: Auto-refresh depuis WebSocket events

- Finance Workflow: approbations + budgets (backend + mobile)
  * Backend: entities, services, resources, migrations Flyway V6
  * Mobile: features finance_workflow complète avec BLoC

- Corrections DI: interfaces IRepository partout
  * IProfileRepository, IOrganizationRepository, IMembreRepository
  * GetIt configuré avec @injectable

- Spec-Kit: constitution + templates mis à jour
  * .specify/memory/constitution.md enrichie
  * Templates agent, plan, spec, tasks, checklist

- Nettoyage: fichiers temporaires supprimés

Signed-off-by: lions dev Team
This commit is contained in:
dahoud
2026-03-15 02:12:17 +00:00
parent bbc409de9d
commit e8ad874015
635 changed files with 58160 additions and 20674 deletions

View File

@@ -1,9 +1,10 @@
# UnionFlow Project Constitution
> **Version:** 1.0
> **Date:** 2026-02-27
> **Date:** 2026-03-08
> **Status:** Active
> **Scope:** Backend (unionflow-server-impl-quarkus), API (unionflow-server-api), Mobile (unionflow-mobile-apps)
> **Référence inventaire:** `.specify/memory/inventaire-code.md` — liste exacte des packages, migrations et features (à utiliser pour ne pas halluciner). **En cas de divergence entre ce document et le code source, le code fait foi** ; linventaire et la constitution doivent être mis à jour pour refléter létat réel du dépôt.
---
@@ -579,15 +580,7 @@ List<Membre> findAllWithCotisations();
### 13. Mobile Integration
#### 13.1 Mobile App Configuration
**Flutter Environment:**
```dart
// lib/config/environment.dart
abstract class AppConfig {
static String get apiBaseUrl => const String.fromEnvironment('API_URL');
static String get keycloakUrl => const String.fromEnvironment('KEYCLOAK_URL');
static bool get enableLogging => const String.fromEnvironment('ENV') != 'prod';
}
```
**Flutter Environment:** Configuration centralisée dans `unionflow-mobile-apps/lib/core/config/environment.dart`. `AppConfig.initialize()` appelé dans `main()` ; `Environment` (dev, staging, prod) ; propriétés : `apiBaseUrl`, `keycloakBaseUrl`, `wsBaseUrl`, `enableLogging`, `keycloakRealmUrl`, `keycloakTokenUrl`, `wsDashboardUrl`. Valeurs par défaut selon lenvironnement (dev : localhost:8085 / 8180, prod : api.lions.dev / security.lions.dev).
**Build Command:**
```bash

View File

@@ -3,7 +3,19 @@
function Get-RepoRoot {
# Prefer directory containing .specify (project root for spec-kit)
$current = Resolve-Path (Join-Path $PSScriptRoot "../../..").Path
$scriptDir = $PSScriptRoot
if (-not $scriptDir -and $MyInvocation.ScriptName) {
$scriptDir = Split-Path -Parent $MyInvocation.ScriptName
}
if ($scriptDir) {
try {
$current = (Resolve-Path (Join-Path $scriptDir "../../..")).Path
} catch {
$current = (Get-Location).Path
}
} else {
$current = (Get-Location).Path
}
while ($current) {
if (Test-Path (Join-Path $current ".specify")) {
return $current
@@ -17,7 +29,8 @@ function Get-RepoRoot {
$result = git rev-parse --show-toplevel 2>$null
if ($LASTEXITCODE -eq 0) { return $result }
} catch {}
return (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path
$fallbackDir = if ($scriptDir) { $scriptDir } else { (Get-Location).Path }
return (Resolve-Path (Join-Path $fallbackDir "../..")).Path
}
function Get-CurrentBranch {

View File

@@ -2,6 +2,8 @@
Auto-generated from all feature plans. Last updated: [DATE]
Pour UnionFlow : sappuyer sur `.specify/memory/inventaire-code.md` pour les packages, routes et features existants (ne pas inventer dartefacts non listés).
## Active Technologies
[EXTRACTED FROM ALL PLAN.MD FILES]

View File

@@ -4,7 +4,7 @@
**Created**: [DATE]
**Feature**: [Link to spec.md or relevant documentation]
**Note**: This checklist is generated by the `/speckit.checklist` command based on feature context and requirements.
**Note**: This checklist is generated by the `/speckit.checklist` command based on feature context and requirements. Pour UnionFlow, sappuyer sur `.specify/memory/inventaire-code.md` pour ne pas inventer de composants non existants.
<!--
============================================================================

View File

@@ -1,62 +1,54 @@
# Implementation Plan: [FEATURE]
# Plan d'implémentation : [FONCTIONNALITÉ]
**Branch**: `[###-feature-name]` | **Date**: [DATE] | **Spec**: [link]
**Input**: Feature specification from `/specs/[###-feature-name]/spec.md`
**Branche** : `[###-nom-court]` | **Date** : [DATE] | **Spec** : [lien]
**Entrée** : Spécification dans `/specs/[###-nom-court]/spec.md`
**Note**: This template is filled in by the `/speckit.plan` command. See `.specify/templates/plan-template.md` for the execution workflow.
**Note** : Ce template est rempli par la commande `/speckit.plan`. Voir `.specify/templates/plan-template.md` pour le déroulé.
## Summary
## Résumé
[Extract from feature spec: primary requirement + technical approach from research]
[Extraire de la spec : exigence principale + approche technique issue de la recherche]
## Technical Context
## Contexte technique
<!--
ACTION REQUIRED: Replace the content in this section with the technical details
for the project. The structure here is presented in advisory capacity to guide
the iteration process.
-->
<!-- Remplacer le contenu par les détails techniques du projet -->
**Language/Version**: [e.g., Python 3.11, Swift 5.9, Rust 1.75 or NEEDS CLARIFICATION]
**Primary Dependencies**: [e.g., FastAPI, UIKit, LLVM or NEEDS CLARIFICATION]
**Storage**: [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
**Testing**: [e.g., pytest, XCTest, cargo test or NEEDS CLARIFICATION]
**Target Platform**: [e.g., Linux server, iOS 15+, WASM or NEEDS CLARIFICATION]
**Project Type**: [e.g., library/cli/web-service/mobile-app/compiler/desktop-app or NEEDS CLARIFICATION]
**Performance Goals**: [domain-specific, e.g., 1000 req/s, 10k lines/sec, 60 fps or NEEDS CLARIFICATION]
**Constraints**: [domain-specific, e.g., <200ms p95, <100MB memory, offline-capable or NEEDS CLARIFICATION]
**Scale/Scope**: [domain-specific, e.g., 10k users, 1M LOC, 50 screens or NEEDS CLARIFICATION]
**Langage/Version** : [ex. Java 17, Dart 3, ou À PRÉCISER]
**Dépendances principales** : [ex. Quarkus, Flutter, ou À PRÉCISER]
**Stockage** : [ex. PostgreSQL, CoreData, fichiers ou N/A]
**Tests** : [ex. JUnit, pytest, ou À PRÉCISER]
**Plateforme cible** : [ex. serveur Linux, iOS 15+, ou À PRÉCISER]
**Type de projet** : [ex. lib/cli/service-web/app-mobile ou À PRÉCISER]
**Objectifs de performance** : [ex. 1000 req/s, 60 fps ou À PRÉCISER]
**Contraintes** : [ex. p95 < 200 ms, mémoire < 100 Mo, hors-ligne ou À PRÉCISER]
**Échelle / périmètre** : [ex. 10k utilisateurs, 50 écrans ou À PRÉCISER]
## Constitution Check
## Contrôle constitution
*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
*JALON : Doit être validé avant la phase 0 (recherche). Re-vérifier après la phase 1 (conception).*
[Gates determined based on constitution file]
[Critères déterminés à partir du fichier constitution]
## Project Structure
## Structure du projet
### Documentation (this feature)
### Documentation (cette feature)
```text
specs/[###-feature]/
├── plan.md # This file (/speckit.plan command output)
├── research.md # Phase 0 output (/speckit.plan command)
├── data-model.md # Phase 1 output (/speckit.plan command)
├── quickstart.md # Phase 1 output (/speckit.plan command)
├── contracts/ # Phase 1 output (/speckit.plan command)
└── tasks.md # Phase 2 output (/speckit.tasks command - NOT created by /speckit.plan)
├── plan.md # Ce fichier (sortie /speckit.plan)
├── research.md # Phase 0 (/speckit.plan)
├── data-model.md # Phase 1 (/speckit.plan)
├── quickstart.md # Phase 1 (/speckit.plan)
├── contracts/ # Phase 1 (/speckit.plan)
└── tasks.md # Phase 2 (/speckit.tasks NON créé par /speckit.plan)
```
### Source Code (repository root)
<!--
ACTION REQUIRED: Replace the placeholder tree below with the concrete layout
for this feature. Delete unused options and expand the chosen structure with
real paths (e.g., apps/admin, packages/something). The delivered plan must
not include Option labels.
-->
### Code source (racine du dépôt)
<!-- Remplacer l'arbre ci-dessous par la structure réelle de cette feature. Supprimer les options inutilisées. -->
```text
# [REMOVE IF UNUSED] Option 1: Single project (DEFAULT)
# [SUPPRIMER SI INUTILISÉ] Option 1 : Projet unique (DÉFAUT)
src/
├── models/
├── services/
@@ -68,7 +60,7 @@ tests/
├── integration/
└── unit/
# [REMOVE IF UNUSED] Option 2: Web application (when "frontend" + "backend" detected)
# [SUPPRIMER SI INUTILISÉ] Option 2 : Application web (backend + frontend)
backend/
├── src/
│ ├── models/
@@ -83,22 +75,26 @@ frontend/
│ └── services/
└── tests/
# [REMOVE IF UNUSED] Option 3: Mobile + API (when "iOS/Android" detected)
# [SUPPRIMER SI INUTILISÉ] Option 3 : Mobile + API (iOS/Android)
api/
└── [same as backend above]
└── [idem backend ci-dessus]
ios/ or android/
└── [platform-specific structure: feature modules, UI flows, platform tests]
ios/ ou android/
└── [structure plateforme : modules feature, flux UI, tests]
# [SUPPRIMER SI INUTILISÉ] Option 4 : Monorepo UnionFlow (backend + mobile)
unionflow-server-api/ # DTOs, enums
unionflow-server-impl-quarkus/ # Migrations, services, resources
unionflow-mobile-apps/lib/ # app/, core/, features/<nom>/, shared/
```
**Structure Decision**: [Document the selected structure and reference the real
directories captured above]
**Décision de structure** : [Documenter la structure retenue et les répertoires réels. Pour UnionFlow, sappuyer sur `.specify/memory/inventaire-code.md`.]
## Complexity Tracking
## Suivi des écarts à la constitution
> **Fill ONLY if Constitution Check has violations that must be justified**
> **À remplir UNIQUEMENT si le Contrôle constitution a des violations à justifier**
| Violation | Why Needed | Simpler Alternative Rejected Because |
|-----------|------------|-------------------------------------|
| [e.g., 4th project] | [current need] | [why 3 projects insufficient] |
| [e.g., Repository pattern] | [specific problem] | [why direct DB access insufficient] |
| Écart | Pourquoi nécessaire | Alternative plus simple refusée car |
|-------|---------------------|-------------------------------------|
| [ex. 4e projet] | [besoin actuel] | [pourquoi 3 projets ne suffisent pas] |
| [ex. pattern Repository] | [problème précis] | [pourquoi l'accès direct DB ne suffit pas] |

View File

@@ -1,115 +1,103 @@
# Feature Specification: [FEATURE NAME]
# Spécification de fonctionnalité : [NOM DE LA FONCTIONNALITÉ]
**Feature Branch**: `[###-feature-name]`
**Created**: [DATE]
**Status**: Draft
**Input**: User description: "$ARGUMENTS"
**Branche feature** : `[###-nom-court]`
**Créé le** : [DATE]
**Statut** : Brouillon
**Entrée** : Description utilisateur : « $ARGUMENTS »
## User Scenarios & Testing *(mandatory)*
Pour UnionFlow : ne pas inventer de packages, routes ou features non listés dans `.specify/memory/inventaire-code.md`.
## Scénarios utilisateur et tests *(obligatoire)*
<!--
IMPORTANT: User stories should be PRIORITIZED as user journeys ordered by importance.
Each user story/journey must be INDEPENDENTLY TESTABLE - meaning if you implement just ONE of them,
you should still have a viable MVP (Minimum Viable Product) that delivers value.
Assign priorities (P1, P2, P3, etc.) to each story, where P1 is the most critical.
Think of each story as a standalone slice of functionality that can be:
- Developed independently
- Tested independently
- Deployed independently
- Demonstrated to users independently
Les user stories doivent être PRIORISÉES par ordre d'importance.
Chaque user story doit être TESTABLE INDÉPENDAMMENT : en n'implémentant qu'une seule,
on doit avoir un MVP (Minimum Viable Product) qui apporte de la valeur.
Priorités : P1, P2, P3, etc. (P1 = le plus critique).
Chaque story = slice autonome : développable, testable, déployable, démontrable seule.
-->
### User Story 1 - [Brief Title] (Priority: P1)
### User Story 1 - [Titre court] (Priorité : P1)
[Describe this user journey in plain language]
[Décrire ce parcours utilisateur en langage simple]
**Why this priority**: [Explain the value and why it has this priority level]
**Pourquoi cette priorité** : [Valeur et justification]
**Independent Test**: [Describe how this can be tested independently - e.g., "Can be fully tested by [specific action] and delivers [specific value]"]
**Test indépendant** : [Comment tester cette story seule — ex. « Testable par [action] et livre [valeur] »]
**Acceptance Scenarios**:
**Scénarios d'acceptation** :
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
2. **Given** [initial state], **When** [action], **Then** [expected outcome]
1. **Étant donné** [état initial], **quand** [action], **alors** [résultat attendu]
2. **Étant donné** [état initial], **quand** [action], **alors** [résultat attendu]
---
### User Story 2 - [Brief Title] (Priority: P2)
### User Story 2 - [Titre court] (Priorité : P2)
[Describe this user journey in plain language]
[Décrire ce parcours utilisateur en langage simple]
**Why this priority**: [Explain the value and why it has this priority level]
**Pourquoi cette priorité** : [Valeur et justification]
**Independent Test**: [Describe how this can be tested independently]
**Test indépendant** : [Comment tester cette story seule]
**Acceptance Scenarios**:
**Scénarios d'acceptation** :
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
1. **Étant donné** [état initial], **quand** [action], **alors** [résultat attendu]
---
### User Story 3 - [Brief Title] (Priority: P3)
### User Story 3 - [Titre court] (Priorité : P3)
[Describe this user journey in plain language]
[Décrire ce parcours utilisateur en langage simple]
**Why this priority**: [Explain the value and why it has this priority level]
**Pourquoi cette priorité** : [Valeur et justification]
**Independent Test**: [Describe how this can be tested independently]
**Test indépendant** : [Comment tester cette story seule]
**Acceptance Scenarios**:
**Scénarios d'acceptation** :
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
1. **Étant donné** [état initial], **quand** [action], **alors** [résultat attendu]
---
[Add more user stories as needed, each with an assigned priority]
[Ajouter d'autres user stories si besoin, chacune avec une priorité]
### Edge Cases
### Cas limites
<!--
ACTION REQUIRED: The content in this section represents placeholders.
Fill them out with the right edge cases.
-->
<!-- Remplir avec les vrais cas limites -->
- What happens when [boundary condition]?
- How does system handle [error scenario]?
- Que se passe-t-il quand [condition limite] ?
- Comment le système gère-t-il [scénario d'erreur] ?
## Requirements *(mandatory)*
## Exigences *(obligatoire)*
<!--
ACTION REQUIRED: The content in this section represents placeholders.
Fill them out with the right functional requirements.
-->
<!-- Remplir avec les exigences fonctionnelles réelles -->
### Functional Requirements
### Exigences fonctionnelles
- **FR-001**: System MUST [specific capability, e.g., "allow users to create accounts"]
- **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
- **FR-003**: Users MUST be able to [key interaction, e.g., "reset their password"]
- **FR-004**: System MUST [data requirement, e.g., "persist user preferences"]
- **FR-005**: System MUST [behavior, e.g., "log all security events"]
- **EF-001** : Le système DOIT [capacité, ex. « permettre aux utilisateurs de créer un compte »]
- **EF-002** : Le système DOIT [capacité, ex. « valider les adresses e-mail »]
- **EF-003** : Les utilisateurs DOIVENT pouvoir [interaction clé, ex. « réinitialiser leur mot de passe »]
- **EF-004** : Le système DOIT [exigence données, ex. « persister les préférences utilisateur »]
- **EF-005** : Le système DOIT [comportement, ex. « journaliser tous les événements de sécurité »]
*Example of marking unclear requirements:*
*Exemple de marquage d'exigences floues :*
- **FR-006**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified - email/password, SSO, OAuth?]
- **FR-007**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]
- **EF-006** : Le système DOIT authentifier les utilisateurs via [À PRÉCISER : méthode non précisée — email/mot de passe, SSO, OAuth ?]
- **EF-007** : Le système DOIT conserver les données utilisateur pendant [À PRÉCISER : durée de rétention non précisée]
### Key Entities *(include if feature involves data)*
### Entités clés *(si la feature concerne des données)*
- **[Entity 1]**: [What it represents, key attributes without implementation]
- **[Entity 2]**: [What it represents, relationships to other entities]
- **[Entité 1]** : [Ce qu'elle représente, attributs clés sans détail d'implémentation]
- **[Entité 2]** : [Ce qu'elle représente, relations avec les autres entités]
## Success Criteria *(mandatory)*
## Critères de succès *(obligatoire)*
<!--
ACTION REQUIRED: Define measurable success criteria.
These must be technology-agnostic and measurable.
-->
<!-- Définir des critères mesurables, indépendants de la technologie -->
### Measurable Outcomes
### Résultats mesurables
- **SC-001**: [Measurable metric, e.g., "Users can complete account creation in under 2 minutes"]
- **SC-002**: [Measurable metric, e.g., "System handles 1000 concurrent users without degradation"]
- **SC-003**: [User satisfaction metric, e.g., "90% of users successfully complete primary task on first attempt"]
- **SC-004**: [Business metric, e.g., "Reduce support tickets related to [X] by 50%"]
- **CS-001** : [Métrique mesurable, ex. « Les utilisateurs peuvent créer un compte en moins de 2 minutes »]
- **CS-002** : [Métrique mesurable, ex. « Le système supporte 1000 utilisateurs concurrents sans dégradation »]
- **CS-003** : [Métrique satisfaction, ex. « 90 % des utilisateurs réussissent la tâche principale du premier coup »]
- **CS-004** : [Métrique métier, ex. « Réduire de 50 % les tickets support liés à [X] »]

View File

@@ -1,251 +1,238 @@
---
description: "Task list template for feature implementation"
description: "Modèle de liste de tâches pour l'implémentation d'une fonctionnalité"
---
# Tasks: [FEATURE NAME]
# Tâches : [NOM DE LA FONCTIONNALITÉ]
**Input**: Design documents from `/specs/[###-feature-name]/`
**Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
**Entrée** : Documents de conception dans `/specs/[###-nom-court]/`
**Prérequis** : plan.md (obligatoire), spec.md (obligatoire pour les user stories), research.md, data-model.md, contracts/
**Tests**: The examples below include test tasks. Tests are OPTIONAL - only include them if explicitly requested in the feature specification.
**Tests** : Les exemples ci-dessous incluent des tâches de test. Les tests sont OPTIONNELS — ne les inclure que si la spécification de la feature le demande explicitement.
**Organization**: Tasks are grouped by user story to enable independent implementation and testing of each story.
**Organisation** : Les tâches sont regroupées par user story pour permettre une implémentation et des tests indépendants par story.
## Format: `[ID] [P?] [Story] Description`
## Format : `[ID] [P?] [Story] Description`
- **[P]**: Can run in parallel (different files, no dependencies)
- **[Story]**: Which user story this task belongs to (e.g., US1, US2, US3)
- Include exact file paths in descriptions
- **[P]** : Peut s'exécuter en parallèle (fichiers différents, pas de dépendances)
- **[Story]** : À quelle user story la tâche appartient (ex. US1, US2, US3)
- Inclure les chemins de fichiers exacts dans les descriptions
## Path Conventions
## Conventions de chemins
- **Single project**: `src/`, `tests/` at repository root
- **Web app**: `backend/src/`, `frontend/src/`
- **Mobile**: `api/src/`, `ios/src/` or `android/src/`
- Paths shown below assume single project - adjust based on plan.md structure
- **Projet unique** : `src/`, `tests/` à la racine du dépôt
- **Application web** : `backend/src/`, `frontend/src/`
- **Mobile** : `api/src/`, `ios/src/` ou `android/src/`
- **UnionFlow (monorepo)** : Backend = `unionflow-server-api/`, `unionflow-server-impl-quarkus/` ; Mobile = `unionflow-mobile-apps/lib/` (core/, features/, app/, shared/). Tâches mobile : chemins relatifs à `unionflow-mobile-apps/lib/` (ex. `features/epargne/presentation/pages/epargne_page.dart`).
- Adapter les chemins ci-dessous selon la structure dans plan.md
<!--
============================================================================
IMPORTANT: The tasks below are SAMPLE TASKS for illustration purposes only.
IMPORTANT : Les tâches ci-dessous sont des EXEMPLES à titre indicatif.
The /speckit.tasks command MUST replace these with actual tasks based on:
- User stories from spec.md (with their priorities P1, P2, P3...)
- Feature requirements from plan.md
- Entities from data-model.md
- Endpoints from contracts/
La commande /speckit.tasks DOIT les remplacer par les vraies tâches basées sur :
- Les user stories de spec.md (et leurs priorités P1, P2, P3...)
- Les exigences du plan.md
- Les entités de data-model.md
- Les endpoints de contracts/
Tasks MUST be organized by user story so each story can be:
- Implemented independently
- Tested independently
- Delivered as an MVP increment
Les tâches DOIVENT être organisées par user story pour que chaque story soit :
- Implémentable indépendamment
- Testable indépendamment
- Livrable en incrément MVP
DO NOT keep these sample tasks in the generated tasks.md file.
NE PAS conserver ces tâches exemples dans le fichier tasks.md généré.
============================================================================
-->
## Phase 1: Setup (Shared Infrastructure)
## Phase 1 : Mise en place (infrastructure partagée)
**Purpose**: Project initialization and basic structure
**Objectif** : Initialisation et structure de base
- [ ] T001 Create project structure per implementation plan
- [ ] T002 Initialize [language] project with [framework] dependencies
- [ ] T003 [P] Configure linting and formatting tools
- [ ] T001 Créer la structure du projet selon le plan d'implémentation
- [ ] T002 Initialiser le projet [langage] avec les dépendances [framework]
- [ ] T003 [P] Configurer le lint et le formatage
---
## Phase 2: Foundational (Blocking Prerequisites)
## Phase 2 : Fondations (prérequis bloquants)
**Purpose**: Core infrastructure that MUST be complete before ANY user story can be implemented
**Objectif** : Infrastructure indispensable avant TOUTE implémentation de user story
**⚠️ CRITICAL**: No user story work can begin until this phase is complete
**⚠️ CRITIQUE** : Aucune user story ne peut commencer avant la fin de cette phase
Examples of foundational tasks (adjust based on your project):
Exemples de tâches fondations (adapter au projet) :
- [ ] T004 Setup database schema and migrations framework
- [ ] T005 [P] Implement authentication/authorization framework
- [ ] T006 [P] Setup API routing and middleware structure
- [ ] T007 Create base models/entities that all stories depend on
- [ ] T008 Configure error handling and logging infrastructure
- [ ] T009 Setup environment configuration management
- [ ] T004 Mettre en place le schéma BDD et le framework de migrations
- [ ] T005 [P] Implémenter le cadre d'authentification / autorisation
- [ ] T006 [P] Mettre en place le routage API et la structure middleware
- [ ] T007 Créer les modèles/entités de base dont dépendent toutes les stories
- [ ] T008 Configurer la gestion des erreurs et les logs
- [ ] T009 Mettre en place la gestion de la configuration d'environnement
**Checkpoint**: Foundation ready - user story implementation can now begin in parallel
**Jalon** : Fondations prêtes — l'implémentation des user stories peut commencer
---
## Phase 3: User Story 1 - [Title] (Priority: P1) 🎯 MVP
## Phase 3 : User Story 1 - [Titre] (Priorité : P1) 🎯 MVP
**Goal**: [Brief description of what this story delivers]
**Objectif** : [Brève description de ce que livre cette story]
**Independent Test**: [How to verify this story works on its own]
**Test indépendant** : [Comment vérifier que cette story fonctionne seule]
### Tests for User Story 1 (OPTIONAL - only if tests requested) ⚠️
### Tests pour User Story 1 (OPTIONNEL — seulement si tests demandés) ⚠️
> **NOTE: Write these tests FIRST, ensure they FAIL before implementation**
> **NOTE : Écrire ces tests EN PREMIER, s'assurer qu'ils ÉCHOUENT avant l'implémentation**
- [ ] T010 [P] [US1] Contract test for [endpoint] in tests/contract/test_[name].py
- [ ] T011 [P] [US1] Integration test for [user journey] in tests/integration/test_[name].py
- [ ] T010 [P] [US1] Test de contrat pour [endpoint] dans tests/contract/test_[nom].py
- [ ] T011 [P] [US1] Test d'intégration pour [parcours] dans tests/integration/test_[nom].py
### Implementation for User Story 1
### Implémentation pour User Story 1
- [ ] T012 [P] [US1] Create [Entity1] model in src/models/[entity1].py
- [ ] T013 [P] [US1] Create [Entity2] model in src/models/[entity2].py
- [ ] T014 [US1] Implement [Service] in src/services/[service].py (depends on T012, T013)
- [ ] T015 [US1] Implement [endpoint/feature] in src/[location]/[file].py
- [ ] T016 [US1] Add validation and error handling
- [ ] T017 [US1] Add logging for user story 1 operations
- [ ] T012 [P] [US1] Créer le modèle [Entité1] dans src/models/[entite1].py
- [ ] T013 [P] [US1] Créer le modèle [Entité2] dans src/models/[entite2].py
- [ ] T014 [US1] Implémenter [Service] dans src/services/[service].py (dépend de T012, T013)
- [ ] T015 [US1] Implémenter [endpoint/feature] dans src/[emplacement]/[fichier].py
- [ ] T016 [US1] Ajouter la validation et la gestion des erreurs
- [ ] T017 [US1] Ajouter les logs pour les opérations de la user story 1
**Checkpoint**: At this point, User Story 1 should be fully functional and testable independently
**Jalon** : À ce stade, User Story 1 doit être entièrement fonctionnelle et testable seule
---
## Phase 4: User Story 2 - [Title] (Priority: P2)
## Phase 4 : User Story 2 - [Titre] (Priorité : P2)
**Goal**: [Brief description of what this story delivers]
**Objectif** : [Brève description]
**Independent Test**: [How to verify this story works on its own]
**Test indépendant** : [Comment vérifier]
### Tests for User Story 2 (OPTIONAL - only if tests requested) ⚠️
### Tests pour User Story 2 (OPTIONNEL) ⚠️
- [ ] T018 [P] [US2] Contract test for [endpoint] in tests/contract/test_[name].py
- [ ] T019 [P] [US2] Integration test for [user journey] in tests/integration/test_[name].py
- [ ] T018 [P] [US2] Test de contrat pour [endpoint] dans tests/contract/test_[nom].py
- [ ] T019 [P] [US2] Test d'intégration pour [parcours] dans tests/integration/test_[nom].py
### Implementation for User Story 2
### Implémentation pour User Story 2
- [ ] T020 [P] [US2] Create [Entity] model in src/models/[entity].py
- [ ] T021 [US2] Implement [Service] in src/services/[service].py
- [ ] T022 [US2] Implement [endpoint/feature] in src/[location]/[file].py
- [ ] T023 [US2] Integrate with User Story 1 components (if needed)
- [ ] T020 [P] [US2] Créer le modèle [Entité] dans src/models/[entite].py
- [ ] T021 [US2] Implémenter [Service] dans src/services/[service].py
- [ ] T022 [US2] Implémenter [endpoint/feature] dans src/[emplacement]/[fichier].py
- [ ] T023 [US2] Intégrer avec les composants de User Story 1 (si besoin)
**Checkpoint**: At this point, User Stories 1 AND 2 should both work independently
**Jalon** : User Stories 1 et 2 doivent toutes deux fonctionner indépendamment
---
## Phase 5: User Story 3 - [Title] (Priority: P3)
## Phase 5 : User Story 3 - [Titre] (Priorité : P3)
**Goal**: [Brief description of what this story delivers]
**Objectif** : [Brève description]
**Independent Test**: [How to verify this story works on its own]
**Test indépendant** : [Comment vérifier]
### Tests for User Story 3 (OPTIONAL - only if tests requested) ⚠️
### Tests pour User Story 3 (OPTIONNEL) ⚠️
- [ ] T024 [P] [US3] Contract test for [endpoint] in tests/contract/test_[name].py
- [ ] T025 [P] [US3] Integration test for [user journey] in tests/integration/test_[name].py
- [ ] T024 [P] [US3] Test de contrat pour [endpoint] dans tests/contract/test_[nom].py
- [ ] T025 [P] [US3] Test d'intégration pour [parcours] dans tests/integration/test_[nom].py
### Implementation for User Story 3
### Implémentation pour User Story 3
- [ ] T026 [P] [US3] Create [Entity] model in src/models/[entity].py
- [ ] T027 [US3] Implement [Service] in src/services/[service].py
- [ ] T028 [US3] Implement [endpoint/feature] in src/[location]/[file].py
- [ ] T026 [P] [US3] Créer le modèle [Entité] dans src/models/[entite].py
- [ ] T027 [US3] Implémenter [Service] dans src/services/[service].py
- [ ] T028 [US3] Implémenter [endpoint/feature] dans src/[emplacement]/[fichier].py
**Checkpoint**: All user stories should now be independently functional
**Jalon** : Toutes les user stories doivent être fonctionnelles indépendamment
---
[Add more user story phases as needed, following the same pattern]
[Ajouter d'autres phases user story si besoin, même pattern]
---
## Phase N: Polish & Cross-Cutting Concerns
## Phase N : Finition et transversal
**Purpose**: Improvements that affect multiple user stories
**Objectif** : Améliorations qui concernent plusieurs user stories
- [ ] TXXX [P] Documentation updates in docs/
- [ ] TXXX Code cleanup and refactoring
- [ ] TXXX Performance optimization across all stories
- [ ] TXXX [P] Additional unit tests (if requested) in tests/unit/
- [ ] TXXX Security hardening
- [ ] TXXX Run quickstart.md validation
- [ ] TXXX [P] Mise à jour de la documentation dans docs/
- [ ] TXXX Nettoyage et refactoring du code
- [ ] TXXX Optimisation des performances sur l'ensemble des stories
- [ ] TXXX [P] Tests unitaires supplémentaires (si demandés) dans tests/unit/
- [ ] TXXX Renforcement de la sécurité
- [ ] TXXX Exécuter la validation quickstart.md
---
## Dependencies & Execution Order
## Dépendances et ordre d'exécution
### Phase Dependencies
### pendances entre phases
- **Setup (Phase 1)**: No dependencies - can start immediately
- **Foundational (Phase 2)**: Depends on Setup completion - BLOCKS all user stories
- **User Stories (Phase 3+)**: All depend on Foundational phase completion
- User stories can then proceed in parallel (if staffed)
- Or sequentially in priority order (P1 → P2 → P3)
- **Polish (Final Phase)**: Depends on all desired user stories being complete
- **Phase 1 (Mise en place)** : Aucune — peut démarrer tout de suite
- **Phase 2 (Fondations)** : Dépend de la Phase 1 — BLOQUE toutes les user stories
- **Phases 3+ (User stories)** : Dépendent de la fin de la Phase 2
- Les user stories peuvent ensuite avancer en parallèle (si plusieurs personnes)
- Ou dans l'ordre des priorités (P1 → P2 → P3)
- **Phase N (Finition)** : Dépend de la fin des user stories souhaitées
### User Story Dependencies
### Dépendances entre user stories
- **User Story 1 (P1)**: Can start after Foundational (Phase 2) - No dependencies on other stories
- **User Story 2 (P2)**: Can start after Foundational (Phase 2) - May integrate with US1 but should be independently testable
- **User Story 3 (P3)**: Can start after Foundational (Phase 2) - May integrate with US1/US2 but should be independently testable
- **User Story 1 (P1)** : Peut démarrer après la Phase 2 — pas de dépendance à d'autres stories
- **User Story 2 (P2)** : Peut démarrer après la Phase 2 — peut s'appuyer sur US1 mais doit rester testable seule
- **User Story 3 (P3)** : Peut démarrer après la Phase 2 — peut s'appuyer sur US1/US2 mais doit rester testable seule
### Within Each User Story
### Au sein de chaque user story
- Tests (if included) MUST be written and FAIL before implementation
- Models before services
- Services before endpoints
- Core implementation before integration
- Story complete before moving to next priority
- Les tests (si inclus) DOIVENT être écrits et ÉCHOUER avant l'implémentation
- Modèles avant services
- Services avant endpoints
- Implémentation cœur avant intégration
- Finir une story avant de passer à la suivante
### Parallel Opportunities
### Parallélisation possible
- All Setup tasks marked [P] can run in parallel
- All Foundational tasks marked [P] can run in parallel (within Phase 2)
- Once Foundational phase completes, all user stories can start in parallel (if team capacity allows)
- All tests for a user story marked [P] can run in parallel
- Models within a story marked [P] can run in parallel
- Different user stories can be worked on in parallel by different team members
- Toutes les tâches de mise en place marquées [P] peuvent s'exécuter en parallèle
- Toutes les tâches fondations marquées [P] peuvent s'exécuter en parallèle (dans la Phase 2)
- Une fois la Phase 2 terminée, toutes les user stories peuvent démarrer en parallèle (si capacité équipe)
- Les tests d'une story marqués [P] peuvent s'exécuter en parallèle
- Les modèles d'une story marqués [P] peuvent s'exécuter en parallèle
- Différentes user stories peuvent être traitées en parallèle par différentes personnes
---
## Parallel Example: User Story 1
## Stratégie d'implémentation
```bash
# Launch all tests for User Story 1 together (if tests requested):
Task: "Contract test for [endpoint] in tests/contract/test_[name].py"
Task: "Integration test for [user journey] in tests/integration/test_[name].py"
### MVP d'abord (User Story 1 uniquement)
# Launch all models for User Story 1 together:
Task: "Create [Entity1] model in src/models/[entity1].py"
Task: "Create [Entity2] model in src/models/[entity2].py"
```
1. Terminer Phase 1 : Mise en place
2. Terminer Phase 2 : Fondations (CRITIQUE — bloque tout)
3. Terminer Phase 3 : User Story 1
4. **STOP et VALIDER** : Tester User Story 1 seule
5. Déployer / démo si prêt
---
### Livraison incrémentale
## Implementation Strategy
1. Mise en place + Fondations → base prête
2. Ajouter User Story 1 → tester seule → déployer/démo (MVP)
3. Ajouter User Story 2 → tester seule → déployer/démo
4. Ajouter User Story 3 → tester seule → déployer/démo
5. Chaque story ajoute de la valeur sans casser les précédentes
### MVP First (User Story 1 Only)
### Équipe en parallèle
1. Complete Phase 1: Setup
2. Complete Phase 2: Foundational (CRITICAL - blocks all stories)
3. Complete Phase 3: User Story 1
4. **STOP and VALIDATE**: Test User Story 1 independently
5. Deploy/demo if ready
Avec plusieurs développeurs :
### Incremental Delivery
1. Complete Setup + Foundational → Foundation ready
2. Add User Story 1 → Test independently → Deploy/Demo (MVP!)
3. Add User Story 2 → Test independently → Deploy/Demo
4. Add User Story 3 → Test independently → Deploy/Demo
5. Each story adds value without breaking previous stories
### Parallel Team Strategy
With multiple developers:
1. Team completes Setup + Foundational together
2. Once Foundational is done:
- Developer A: User Story 1
- Developer B: User Story 2
- Developer C: User Story 3
3. Stories complete and integrate independently
1. L'équipe termine ensemble Mise en place + Fondations
2. Une fois les fondations faites :
- Dev A : User Story 1
- Dev B : User Story 2
- Dev C : User Story 3
3. Les stories se terminent et s'intègrent indépendamment
---
## Notes
- [P] tasks = different files, no dependencies
- [Story] label maps task to specific user story for traceability
- Each user story should be independently completable and testable
- Verify tests fail before implementing
- Commit after each task or logical group
- Stop at any checkpoint to validate story independently
- Avoid: vague tasks, same file conflicts, cross-story dependencies that break independence
- Tâches [P] = fichiers différents, pas de dépendances
- Le libellé [Story] relie la tâche à une user story pour la traçabilité
- Chaque user story doit être complétable et testable indépendamment
- Vérifier que les tests échouent avant d'implémenter
- Commiter après chaque tâche ou groupe logique
- S'arrêter à chaque jalon pour valider la story seule
- À éviter : tâches floues, conflits sur le même fichier, dépendances entre stories qui cassent l'indépendance