2026-07-16 19:21:14 +00:00
# Heimdall — Plan d'implémentation
2026-07-16 20:19:11 +02:00
2026-10-23 22:23:11 +02:00
> **Document historique (MVP — juillet 2026).** Les statuts de phases ci-dessous ne reflètent pas l’état courant du dépôt. Pour le suivi à jour, consulter la [liste de travaux](../todo.md).
2026-10-21 20:07:30 +02:00
2026-07-16 19:21:14 +00:00
**Principe :** On implémente d'abord le **plus simple et le plus important** .
La **vidéo live** arrive en dernier dans l'IHM.
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
## Statut d'avancement (MVP — Juillet 2026)
2026-07-16 19:21:14 +00:00
```
2026-07-17 19:45:40 +00:00
✅ Phase 1 : Solution .NET 10 + Clean Architecture [FAIT]
✅ Phase 2 : Tests Framework [FAIT - partiel]
✅ Phase 3 : CI/CD [FAIT - Forgejo Actions]
✅ Phase 4 : Domain Model [FAIT - entités core]
✅ Phase 5 : Application Layer [FAIT - services directs, sans MediatR]
2026-07-22 20:01:55 +00:00
✅ Phase 5b : Migration CQRS (MediatR + AutoMapper) [FAIT - 50+ handlers, 11 profiles, pipelines]
2026-07-17 19:45:40 +00:00
✅ Phase 6 : Security [FAIT - Identity, JWT, API Key, 2FA]
✅ Phase 7 : API Sites + Agent Tokens [FAIT]
✅ Phase 8 : Agent Registration + Heartbeat [FAIT]
⏳ Phase 9 : ONVIF Discovery [EN ATTENTE - hardware requis]
✅ Phase 10 : Camera Management API [FAIT]
⏳ Phase 11 : Video Pipeline (FFmpeg) [EN ATTENTE - hardware requis]
⏳ Phase 12 : AI Pipeline [EN ATTENTE - hardware requis]
2026-10-21 16:03:16 +02:00
⏳ Phase 13 : Storage (RustFS/S3) [EN ATTENTE - v2]
2026-07-17 19:45:40 +00:00
⏳ Phase 14 : SignalR Hubs [EN ATTENTE - v2]
2026-10-25 02:56:06 +02:00
✅ Phase 15 : Hangfire Central [FAIT - surveillance heartbeat et failover]
2026-07-17 19:45:40 +00:00
⏳ Phase 16 : Hangfire Agent (InMemory) [EN ATTENTE - v2]
⏳ Phase 17 : Notifications [EN ATTENTE - v2]
✅ Phase 18 : Blazor UI [FAIT - 13 pages]
⏳ Phase 19 : WebRTC Streaming [EN ATTENTE - v2]
⏳ Phase 20 : Blazor UI Live Vidéo [EN ATTENTE - v2]
2026-10-20 02:12:47 +02:00
⏳ Phase 21 : Application web installable (PWA) [À IMPLÉMENTER]
2026-07-17 19:45:40 +00:00
⏳ Phase 22 : Dashboard KPI [FAIT - basique]
⏳ Phase 23 : Production Hardening [EN ATTENTE]
2026-07-16 19:21:14 +00:00
```
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
**Légende :** ✅ Fait — ⏳ En attente — ❌ Bloqué
2026-07-16 20:19:11 +02:00
---
2026-07-16 19:21:14 +00:00
# Phase 1 — Solution .NET 10 + Clean Architecture
2026-07-16 20:19:11 +02:00
2026-07-16 19:21:14 +00:00
## Objectif
Créer le socle technique stable : solution .NET 10 avec Clean Architecture.
## Arborescence
2026-07-16 20:19:11 +02:00
```
2026-07-16 19:21:14 +00:00
Heimdall/
├── src/
2026-07-17 19:45:40 +00:00
│ ├── Heimdall.Domain # Entities, Value Objects, Enums ✅
│ ├── Heimdall.Domain.Primitives # Base types (Entity<TId>, ValueObject) ✅
│ ├── Heimdall.Contracts # Shared DTOs, Constants ✅ (vide, prévu)
│ ├── Heimdall.Application # Interfaces, DTOs, Validators ✅
│ ├── Heimdall.Infrastructure # EF Core, PostgreSQL, Identity ✅
│ ├── Heimdall.Api # REST API controllers ✅
│ ├── Heimdall.Web # Blazor Web App (MudBlazor) ✅
│ ├── Heimdall.Agent # Worker Service ✅
│ └── Heimdall.Workers # Hangfire background jobs ✅
2026-07-16 19:21:14 +00:00
├── tests/
2026-07-17 19:45:40 +00:00
│ ├── Heimdall.Domain.Tests # 13 tests ✅
│ ├── Heimdall.Application.Tests # Placeholder ✅
│ ├── Heimdall.Infrastructure.Tests # Placeholder ✅
│ ├── Heimdall.Api.Tests # Placeholder ✅
│ ├── Heimdall.Agent.Tests # Placeholder ✅
│ ├── Heimdall.Web.Tests # Placeholder ✅
│ ├── Heimdall.Workers.Tests # Placeholder ✅
│ └── Heimdall.IntegrationTests # 16 tests (WebApplicationFactory) ✅
2026-07-16 19:21:14 +00:00
├── docker/
2026-07-17 19:45:40 +00:00
│ ├── Dockerfile.central # Multi-stage ✅
│ ├── Dockerfile.agent # Multi-stage ✅
2026-10-26 05:59:55 +01:00
│ ├── docker-compose.yml # Central de développement + PostgreSQL
│ ├── docker-compose.prod.yml # Central de production + PostgreSQL
│ └── docker-compose.<service>.yml # Logiciels optionnels isolés
2026-07-16 19:21:14 +00:00
├── docs/
2026-07-17 19:45:40 +00:00
│ ├── MASTER_SPECIFICATION.md # Spec complète
│ ├── implementation.md # ← ce fichier
│ └── specs.md # Spécifications détaillées
├── .forgejo/workflows/ci.yml # CI pipeline ✅
├── .dockerignore # ✅
├── Makefile # 20+ commandes ✅
├── .env.example # ✅
└── README.md # Documentation complète ✅
2026-07-16 20:19:11 +02:00
```
2026-07-16 19:21:14 +00:00
## Dépendances entre projets
```
Domain (aucune dépendance)
↑
2026-07-17 19:45:40 +00:00
Application (ref Domain) — FluentValidation
2026-07-16 19:21:14 +00:00
↑
2026-07-17 19:45:40 +00:00
Infrastructure (ref Application) — EF Core, Npgsql, Identity, Hangfire
2026-07-16 19:21:14 +00:00
↑
┌───┴───┐
2026-07-17 19:45:40 +00:00
Api Web (Blazor) — MudBlazor
2026-07-16 19:21:14 +00:00
├── ── ┘
Agent (ref Application, Infrastructure) — Worker Service
Workers (ref Application, Infrastructure) — Hangfire jobs
```
## Directory.Build.props
```xml
<TargetFramework> net10.0</TargetFramework>
<ImplicitUsings> enable</ImplicitUsings>
<Nullable> enable</Nullable>
<TreatWarningsAsErrors> true</TreatWarningsAsErrors>
<AnalysisLevel> latest-Recommended</AnalysisLevel>
```
2026-07-17 19:45:40 +00:00
Build : `dotnet build` — 0 errors, 0 warnings ✅
2026-07-16 19:21:14 +00:00
2026-07-16 20:19:11 +02:00
---
2026-07-16 19:21:14 +00:00
# Phase 2 — Framework de tests
2026-07-16 20:19:11 +02:00
## Objectif
2026-07-16 19:21:14 +00:00
Avoir les tests avant le métier (TDD).
2026-07-16 20:19:11 +02:00
2026-07-16 19:21:14 +00:00
## Stack
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
| Outil | Usage | Status |
|---|---|---|
| **xUnit** | Framework de tests | ✅ |
| **Shouldly** | Assertions fluides | ✅ |
| **NSubstitute** | Mocking | ⏳ Pas encore utilisé |
| **Testcontainers** | PostgreSQL en integration | ⏳ Utilise InMemory pour l'instant |
| **bUnit** | Tests composants Blazor | ⏳ Pas encore |
2026-07-16 20:19:11 +02:00
2026-07-16 19:21:14 +00:00
## Projets de test
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
Un par projet source, nommage `Heimdall.X.Tests` — tous créés ✅
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
## Tests existants
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
| Suite | Tests | Technologie |
|-------|-------|-------------|
| Domain (Site, Agent, Camera) | 13 | xUnit + Shouldly |
| Integration (Auth, Sites, Users, Cameras, Agents) | 16 | WebApplicationFactory + InMemory |
| Placeholder (Api, Application, Infrastructure, Web, Workers) | 5 | xUnit |
| **Total** | **34** | |
2026-07-16 19:21:14 +00:00
---
2026-07-17 19:45:40 +00:00
# Phase 3 — CI/CD
2026-07-16 19:21:14 +00:00
## Objectif
Chaque commit build et push les images Docker.
## Pipeline
```yaml
2026-07-17 19:45:40 +00:00
push → restore → build → unit tests → integration tests → docker build
2026-07-16 19:21:14 +00:00
```
2026-07-17 19:45:40 +00:00
## Implémentation actuelle
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
- **Forgejo Actions** (`./forgejo/workflows/ci.yml` ) ✅
- Build + Test sur push (branches main, develop) ✅
- Docker build (central + agent) sur main ✅
- PostgreSQL service pour les tests ✅
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## À faire (v2)
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
- [ ] multi-arch Docker (linux/amd64 + arm64)
- [ ] Push vers registry Docker
- [ ] Couverture de code
2026-07-16 19:21:14 +00:00
---
# Phase 4 — Domain Model
## Objectif
Toutes les entités métier, énumérations, value objects.
2026-07-17 19:45:40 +00:00
## Entités implémentées
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Entité | Status | Détail |
|--------|--------|--------|
| **Site** | ✅ | Guid PK, Name, Address, Timezone, RegistrationToken, soft delete |
| **Agent** | ✅ | Guid PK, Status, Heartbeat, ApiKeyHash/Prefix, Capabilities |
| **Camera** | ✅ | Guid PK, Status, Manufacturer, Model, RtspUrl |
| **CameraCredentials** | ✅ | 1:1 avec Camera, credentials chiffrés |
| **CameraDetectionProfile** | ✅ | 1:1, tous les paramètres de détection |
| **AppUser** (Identity) | ✅ | DisplayName, Theme, Language |
| **AppRole** (Identity) | ✅ | Admin, Supervisor, Viewer |
| **UserSite** | ✅ | Many-to-many User ↔ Site |
| **ApiKey** | ✅ | HMACSHA256 hash, prefix, site scope |
| **AuditLog** | ✅ | Append-only, toutes les actions critiques |
## Entités à créer (v2)
| Entité | Dans migration ? |
|--------|-----------------|
| Person | ⏳ Non (v2) |
| Vehicle | ⏳ Non (v2) |
| LicensePlate | ⏳ Non (v2) |
| Event | ⏳ Non (v2) |
| Recording | ⏳ Non (v2) |
| StoragePolicy | ⏳ Non (v2) |
| NotificationConfig | ⏳ Non (v2) |
| NotificationTemplate | ⏳ Non (v2) |
## Énumérations
```
CameraStatus { Unknown, Online, Offline, Disabled, Error } ✅
EventType { MotionDetected, PersonDetected, ... } ✅
StorageProvider { Local, S3 } ✅
AgentStatus { Online, Offline, Error } ✅
GpuAcceleration { None, NvidiaCuda, IntelQuickSync, Vaapi } ✅
UserRole { Admin, Supervisor, Viewer } ✅
2026-07-16 19:21:14 +00:00
```
2026-07-17 19:45:40 +00:00
## Migration EF Core
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
- `InitialCreate` créée avec toutes les tables actuelles ✅
- `.Designer.cs` présent ✅
- `AppDbContextFactory` pour les migrations design-time ✅
2026-07-16 20:19:11 +02:00
---
2026-07-17 19:45:40 +00:00
# Phase 5 — Application Layer
2026-07-16 20:19:11 +02:00
## Objectif
2026-07-17 19:45:40 +00:00
Interfaces, DTOs, validateurs.
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## Implémentation actuelle
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Composant | Approche | Status |
|-----------|----------|--------|
| **Services** | Interfaces directes (pas MediatR) | ✅ |
| **DTOs** | Records immutables | ✅ |
| **Validation** | FluentValidation | ✅ |
| **ServiceResult** | Pattern Result<T> success/failure | ✅ |
| **Pagination** | PagedResult<T> | ✅ |
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## Services implémentés
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Service | Méthodes |
|---------|----------|
2026-11-04 13:33:30 +01:00
| `IAuthService` | BootstrapAdmin, Login, Verify2fa, RefreshToken, ChangePassword |
2026-07-17 19:45:40 +00:00
| `ISiteService` | Create, GetById, List, Update, Delete, GenerateToken |
| `IAgentService` | Register, Heartbeat, GetById, ListBySite |
| `IUserService` | List, GetById, Create, Update, AssignRoles, AssignSites, ResetPassword, Lock, Unlock |
| `ICameraService` | Create, GetById, ListBySite, Update, Delete |
| `IStatsService` | GetStats |
| `IAuditLogService` | List (filtré, paginé) |
## Note sur CQRS
Le MVP utilise des **services directs** (pas MediatR) par simplicité.
La migration vers CQRS avec MediatR est prévue en v2 si le besoin se fait sentir.
2026-07-16 20:19:11 +02:00
---
2026-07-17 19:45:40 +00:00
# Phase 6 — Security
2026-07-16 20:19:11 +02:00
## Objectif
2026-07-17 19:45:40 +00:00
Authentification AVANT d'exposer l'API.
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
## Implémenté
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
| Fonctionnalité | Priorité | Status |
|---|---|---|
| ASP.NET Core Identity (User, Role) | 🔴 Requis | ✅ |
| JWT Bearer (15min access + refresh 7j) | 🔴 Requis | ✅ |
| API Key HMACSHA256 (agents) | 🔴 Requis | ✅ |
| 2FA TOTP | 🟠 Important | ✅ |
| Rôles (Admin, Supervisor, Viewer) | 🟠 Important | ✅ |
| Permissions (Site.Read, Camera.Write, etc.) | 🔴 Requis | ✅ |
| Rate limiting (10 req/min auth, 200 API) | 🔴 Requis | ✅ |
| Audit logging (append-only) | 🟠 Important | ✅ |
| CORS configurable | 🔴 Requis | ✅ |
| `[Authorize(AuthenticationSchemes)]` explicite | 🔴 Requis | ✅ |
2026-07-16 19:21:14 +00:00
## Endpoints d'auth
2026-07-17 19:45:40 +00:00
| Méthode | Route | Auth | Status |
2026-07-16 19:21:14 +00:00
|---|---|---|---|
2026-11-04 13:33:30 +01:00
| `GET` | `/api/auth/bootstrap-status` | — | ✅ |
| `POST` | `/api/auth/bootstrap-admin` | — (first account only) | ✅ |
2026-07-17 19:45:40 +00:00
| `POST` | `/api/auth/login` | — | ✅ |
| `POST` | `/api/auth/2fa/verify` | — | ✅ |
| `POST` | `/api/auth/refresh` | — | ✅ |
2026-11-04 13:33:30 +01:00
| `POST` | `/api/auth/register` | Retired (404) | ✅ |
| `POST` | `/api/auth/register-admin` | Retired (404) | ✅ |
| `/api/users/*` | User creation and lifecycle | Admin.Users; surfaced in `/users` UI | ✅ |
| `PUT` | `/api/roles/{name}/permissions` | Admin.Manage; surfaced in `/admin/claims` UI (Admin role fixed) | ✅ |
2026-07-16 20:19:11 +02:00
---
2026-07-17 19:45:40 +00:00
# Phase 7 — API Sites + Agent Tokens
2026-07-16 20:19:11 +02:00
2026-07-17 19:45:40 +00:00
## Implémenté
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Méthode | Route | Auth | Status |
2026-07-16 19:21:14 +00:00
|---|---|---|---|
2026-07-17 19:45:40 +00:00
| `POST` | `/api/sites` | JWT/Site.Write | ✅ |
| `GET` | `/api/sites` | JWT/Site.Read | ✅ |
| `GET` | `/api/sites/{id}` | JWT/Site.Read | ✅ |
| `PUT` | `/api/sites/{id}` | JWT/Site.Write | ✅ |
| `DELETE` | `/api/sites/{id}` | JWT/Site.Delete | ✅ |
| `POST` | `/api/sites/{id}/tokens` | JWT/Site.Write | ✅ |
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
Le token d'enregistrement est :
- Généré en SHA256, stocké hashé en DB ✅
- Affiché 1 fois dans l'UI (docker-compose snippet) ✅
- Token + docker-compose copiable via bouton ✅
2026-07-16 20:19:11 +02:00
---
2026-07-17 19:45:40 +00:00
# Phase 8 — Agent Registration + Heartbeat
2026-07-16 19:09:28 +00:00
2026-07-17 19:45:40 +00:00
## Implémenté
2026-07-16 19:09:28 +00:00
2026-07-17 19:45:40 +00:00
### Côté Central
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Méthode | Route | Auth | Status |
2026-07-16 19:21:14 +00:00
|---|---|---|---|
2026-07-17 19:45:40 +00:00
| `POST` | `/api/agents/register` | Token site | ✅ |
| `POST` | `/api/agents/{id}/heartbeat` | API Key | ✅ |
| `GET` | `/api/agents/{id}` | JWT | ✅ |
| `GET` | `/api/agents/by-site/{siteId}` | JWT | ✅ |
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
### Côté Agent
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Fonctionnalité | Status |
|----------------|--------|
| Registration avec token site | ✅ |
| Réception API Key | ✅ |
| Heartbeat toutes les 30s | ✅ |
| API Key envoyée dans header Authorization | ✅ |
| Détection GPU/CPU capabilities | ✅ |
2026-07-16 19:21:14 +00:00
2026-10-25 02:56:06 +02:00
### Surveillance heartbeat et failover (Hangfire)
2026-07-16 19:21:14 +00:00
2026-10-25 02:56:06 +02:00
- Vérification et failover planifiés toutes les minutes ✅
- Le délai utilise l'intervalle global ou la surcharge de l'agent, avec deux intervalles et une marge d'ordonnanceur (minimum 90 s) ✅
- Le job de failover effectue la transition Offline et réessaie la réaffectation des caméras actives des agents déjà Offline ✅
- Les intervalles sont limités à 5– 300 s, conformément à la plage appliquée par l'Agent ✅
2026-07-16 19:21:14 +00:00
---
2026-07-17 19:45:40 +00:00
# Phase 9 — ONVIF Discovery
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
🔴 **Nécessite du hardware (caméras réseau).**
Reporté après le MVP logiciel.
2026-07-16 19:21:14 +00:00
---
# Phase 10 — Camera Management API
2026-07-17 19:45:40 +00:00
## Implémenté
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Méthode | Route | Auth | Status |
2026-07-16 19:21:14 +00:00
|---|---|---|---|
2026-07-17 19:45:40 +00:00
| `POST` | `/api/cameras` | JWT/Camera.Write | ✅ |
| `GET` | `/api/cameras/{id}` | JWT/Camera.Read | ✅ |
| `GET` | `/api/cameras/by-site/{siteId}` | JWT/Camera.Read | ✅ |
| `PUT` | `/api/cameras/{id}` | JWT/Camera.Write | ✅ |
| `DELETE` | `/api/cameras/{id}` | JWT/Camera.Write | ✅ |
### Interface Blazor
| Page | Status |
|------|--------|
| Liste caméras par site | ✅ |
| Détail caméra (éditable) | ✅ |
| Création caméra (dialog) | ✅ |
2026-07-16 19:21:14 +00:00
---
# Phase 11 — Video Pipeline (FFmpeg)
# Phase 12 — AI Pipeline
2026-10-21 16:03:16 +02:00
# Phase 13 — Storage (RustFS/S3)
2026-07-17 19:45:40 +00:00
# Phase 14 — SignalR Hubs
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
🔴 **Nécessitent du hardware + dépendances natives.**
Reportées en v2.
2026-07-16 19:21:14 +00:00
---
2026-07-17 19:45:40 +00:00
# Phase 15 — Hangfire Central
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## Implémenté
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Composant | Status |
|-----------|--------|
| Hangfire avec PostgreSQL | ✅ |
| Schéma isolé (`hangfire` ) | ✅ |
| HeartbeatMonitorJob (toutes les minutes) | ✅ |
| Queue heartbeat dédiée | ✅ |
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## Jobs à implémenter (v2)
2026-07-16 19:35:53 +00:00
2026-07-17 19:45:40 +00:00
| Job | Schedule |
|-----|----------|
| RetentionCheck | Quotidien 3h |
| S3Cleanup | Quotidien 4h |
| DailyDigest | Quotidien 8h |
| DatabaseMaintenance | Hebdomadaire |
2026-07-16 19:35:53 +00:00
---
2026-07-17 19:45:40 +00:00
# Phase 16 — Hangfire Agent (InMemory)
2026-07-16 19:35:53 +00:00
2026-07-17 19:45:40 +00:00
⏳ Reporté à la phase de déploiement Agent réel.
2026-07-16 19:35:53 +00:00
---
2026-07-17 19:45:40 +00:00
# Phase 17 — Notifications
2026-07-16 19:35:53 +00:00
2026-07-17 19:45:40 +00:00
⏳ Reporté en v2.
2026-07-16 19:21:14 +00:00
---
2026-07-17 19:45:40 +00:00
# Phase 18 — Blazor UI
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## Implémenté
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Page | Route | Auth | Status |
|------|-------|------|--------|
| **Login** | `/login` | — | ✅ |
| **Register** | `/register` | — | ✅ |
| **Dashboard** | `/dashboard` | JWT | ✅ |
| **Sites** | `/sites` | JWT | ✅ |
| **Site détail** | `/sites/{id}` | JWT | ✅ |
| **Caméras d'un site** | `/sites/{id}/cameras` | JWT | ✅ |
| **Caméra détail** | `/cameras/{id}` | JWT | ✅ |
| **Agents d'un site** | `/sites/{id}/agents` | JWT | ✅ |
| **Agent détail** | `/agents/{id}` | JWT | ✅ |
| **Utilisateurs** | `/users` | JWT/Admin | ✅ |
| **Journal d'audit** | `/audit-logs` | JWT/Admin | ✅ |
| **RedirectToLogin** | (composant) | — | ✅ |
| **NotFound** | (page 404) | — | ✅ |
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## Stack UI
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
| Technologie | Status |
|-------------|--------|
| MudBlazor 9.1.0 | ✅ |
| Inter Font | ✅ |
| Thème clair/sombre | ✅ |
| Navigation responsive | ✅ |
| Auth redirect avec returnUrl | ✅ |
| Requêtes API parallèles (Dashboard) | ✅ |
2026-07-16 19:35:53 +00:00
2026-07-17 19:45:40 +00:00
## Pages à implémenter (v2)
2026-07-16 19:35:53 +00:00
2026-07-17 19:45:40 +00:00
| Page | Priorité |
|------|----------|
| Événements liste | P1 |
| Personnes liste | P1 |
| Administration (jobs Hangfire) | P1 |
| Live vidéo | P2 |
2026-07-16 19:35:53 +00:00
---
2026-07-17 19:45:40 +00:00
# Phase 19 — WebRTC Streaming
# Phase 20 — Blazor UI Live Vidéo
2026-07-16 19:35:53 +00:00
2026-07-17 19:45:40 +00:00
⏳ Reporté en v2.
2026-07-16 19:21:14 +00:00
---
2026-10-20 02:12:47 +02:00
# Phase 21 — Application web installable (PWA)
2026-07-16 19:21:14 +00:00
2026-10-23 22:23:11 +02:00
Le client natif a été retiré. Voir [l’ audit PWA ](pwa.md ) et la [liste de travaux ](../todo.md ).
2026-07-16 19:35:53 +00:00
---
# Phase 22 — Dashboard KPI
2026-07-16 19:09:28 +00:00
2026-07-17 19:45:40 +00:00
## Implémenté
2026-07-16 19:09:28 +00:00
2026-07-17 19:45:40 +00:00
| Widget | Source | Status |
|--------|--------|--------|
| Total sites | `GET /api/stats` | ✅ |
| Total caméras | `GET /api/stats` | ✅ |
| Agents en ligne | `GET /api/stats` | ✅ |
| Sites actifs | `GET /api/stats` | ✅ |
| Sites récents (tableau) | `GET /api/sites` | ✅ |
| Chargement parallèle | `Task.WhenAll` | ✅ |
2026-07-16 19:35:53 +00:00
2026-07-16 19:09:28 +00:00
---
2026-07-16 19:35:53 +00:00
# Phase 23 — Production Hardening
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## Implémenté
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
- [x] Health checks (/healthz, /readyz)
- [x] Rate limiting (Auth: 10/min, API: 200/min)
- [x] CORS configurable
- [x] Docker Compose production-ready
- [x] Documentation API (Scalar UI)
- [x] README avec architecture + setup
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
## À faire
2026-07-16 19:21:14 +00:00
2026-07-17 19:45:40 +00:00
- [ ] Serilog + Seq/GlitchTip
2026-07-16 19:21:14 +00:00
- [ ] Métriques Prometheus
2026-07-16 19:35:53 +00:00
- [ ] Backup PostgreSQL automatisé
2026-10-21 16:03:16 +02:00
- [ ] Backup RustFS (S3 → S3)
2026-07-16 19:21:14 +00:00
- [ ] Tests de charge (k6)
2026-07-17 19:45:40 +00:00
- [ ] Security audit (pentest)
---
## Résumé — Stats MVP
| Métrique | Valeur |
|----------|--------|
| Projets | 17 (9 src + 8 tests) |
| Fichiers .cs | 83 |
| Pages Blazor | 13 |
| Tests | 34 (13 domain + 16 integration + 5 placeholder) |
| Build | 0 errors, 0 warnings |
| Commits | 45 |
2026-10-21 16:03:16 +02:00
| Conteneurs Docker | 5 (postgresql, rustfs, central, workers, agent) |
2026-07-17 19:45:40 +00:00
| Endpoints API | 30+ |