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

@@ -232,6 +232,14 @@ class AppLogger {
}
}
/// Callback optionnel pour envoyer les erreurs au monitoring (Sentry / Firebase Crashlytics).
/// À enregistrer au démarrage de l'app quand le SDK est intégré.
static void Function(String message, dynamic error, StackTrace? stackTrace, {bool isFatal})? onMonitoringReport;
/// Callback optionnel pour envoyer les événements analytics (Firebase Analytics / Mixpanel).
/// À enregistrer au démarrage de l'app quand le SDK est intégré.
static void Function(String action, Map<String, dynamic>? data)? onAnalyticsEvent;
/// Envoyer les erreurs à un service de monitoring
static void _sendToMonitoring(
String message,
@@ -239,23 +247,38 @@ class AppLogger {
StackTrace? stackTrace, {
bool isFatal = false,
}) {
// Stub — implémenter avec Sentry ou Firebase Crashlytics quand intégré
// Exemple avec Sentry:
// Sentry.captureException(
// error,
// stackTrace: stackTrace,
// hint: Hint.withMap({'message': message}),
// );
if (onMonitoringReport != null) {
try {
onMonitoringReport!(message, error, stackTrace, isFatal: isFatal);
} catch (e, st) {
if (kDebugMode) {
debugPrint('AppLogger: échec envoi monitoring: $e');
debugPrint('$st');
}
}
return;
}
if (kDebugMode && (error != null || stackTrace != null)) {
debugPrint('AppLogger: monitoring non configuré (enregistrer onMonitoringReport pour Sentry/Crashlytics)');
}
}
/// Envoyer les événements à un service d'analytics
static void _sendToAnalytics(String action, Map<String, dynamic>? data) {
// Stub — implémenter avec Firebase Analytics ou Mixpanel quand intégré
// Exemple avec Firebase Analytics:
// FirebaseAnalytics.instance.logEvent(
// name: action,
// parameters: data,
// );
if (onAnalyticsEvent != null) {
try {
onAnalyticsEvent!(action, data);
} catch (e, st) {
if (kDebugMode) {
debugPrint('AppLogger: échec envoi analytics: $e');
debugPrint('$st');
}
}
return;
}
if (kDebugMode) {
debugPrint('AppLogger: analytics non configuré (enregistrer onAnalyticsEvent pour Firebase/Mixpanel)');
}
}
/// Divider pour séparer visuellement les logs