- 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
34 lines
1.7 KiB
Plaintext
34 lines
1.7 KiB
Plaintext
---
|
||
description: Conventions Flutter/mobile UnionFlow
|
||
globs: unionflow-mobile-apps/**/*.dart
|
||
alwaysApply: false
|
||
---
|
||
|
||
# UnionFlow Mobile (Flutter)
|
||
|
||
## Structure (alignée sur l’inventaire)
|
||
|
||
- **Point d’entrée** : `main.dart` → `AppConfig.initialize()`, `configureDependencies()`, `UnionFlowApp`.
|
||
- **App** : `app/app.dart`, `app/router/app_router.dart`. Routes : `MaterialApp` avec `Map<String, WidgetBuilder>` (`/`, `/login`, `/dashboard`).
|
||
- **Core** : `core/config/environment.dart` (AppConfig, Environment), `core/di/injection.dart`, `injection_container.dart`, `injection.config.dart`, `register_module.dart`, `core/network/api_client.dart`, `core/navigation/main_navigation_layout.dart`, `more_page.dart`.
|
||
- **Features** : `lib/features/<nom>/` avec `data/` (models, repositories, services), `domain/` (quand présent), `presentation/` (bloc, pages, widgets). Pas de sous-dossier `di/` dédié par feature ; DI centralisé dans `core/di/`.
|
||
- **Design system** : `lib/shared/design_system/`, `lib/shared/widgets/`.
|
||
|
||
Référence détaillée : `.specify/memory/inventaire-code.md` (section 4). Ne pas inventer de route, feature ou classe non listée.
|
||
|
||
## Conventions
|
||
|
||
- Bloc pour la gestion d’état.
|
||
- GetIt + Injectable pour l’injection de dépendances (enregistrements dans `injection.config.dart`).
|
||
- Modèles avec `json_serializable` quand nécessaire.
|
||
- Tests : `bloc_test`, `mockito`.
|
||
|
||
## Backend
|
||
|
||
- API : unionflow-server-impl-quarkus. Client HTTP : `ApiClient` (Dio), `baseUrl` via `AppConfig.apiBaseUrl`.
|
||
- Auth : Keycloak OAuth2, JWT via `flutter_secure_storage` (clé `kc_access`), refresh et déconnexion forcée gérés dans `ApiClient`.
|
||
|
||
## Référence
|
||
|
||
Voir `CONSTITUTION.md` section 13 (Mobile Integration) et `.specify/memory/inventaire-code.md` § 4.
|