Commit Graph
43 Commits
Author SHA1 Message Date
Arnaud Dartois 2b41ab4ea3 fix(storage): record historical object destinations
Heimdall Gitea / Build and tests (pull_request) Failing after 4m57s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
2026-10-22 19:58:55 +02:00
Arnaud Dartois 58b6a1de9b feat(app): implement all open issues - camera access control, i18n, GPU, mDNS, site filtering
- Implement UserCameraAccess entity and CRUD API (issues #131, #133)
- Add CameraAccessPanel UI component for granular access management (issue #134)
- Implement camera toggle UI (issues #59, #199)
- Implement site filtering by user rights (issue #136)
- Implement Groups camera access assignment (issue #138)
- Implement audit logging for camera access changes (issue #140)
- Add comprehensive camera access test coverage (issue #141)
- Implement i18n/l10n localization infrastructure (issue #142)
- Implement OpenTelemetry metrics infrastructure (issue #14)
- Implement Agent GPU worker (issue #76)
- Implement Agent remote sensor mode (issue #75)
- Fix Docker GPU exposure in compose files (issues #76, #77)
- Fix mDNS divergence by extracting shared MdnsClient library (issue #81)
- Implement User email confirm/edit UI (issues #88, #89)
- Implement Persons UI (issue #11)
- Fix E2E test timing issues by increasing circuit delay

- Add MdnsClient library with unified unicast/multicast mDNS support
- Refactor MdnsProbeService and HomeKitMdnsProbe to use shared client
- Add GroupCameraAccess entity for group-based camera access
- Add comprehensive camera access test coverage
- Add i18n localization infrastructure with fr/en support
- Add Docker GPU exposure for NVIDIA/AMD/Intel
- Update Docker compose files with GPU device exposure
- Fix mDNS divergence between Central unicast and Agent multicast
- Fix E2E test timing issues with increased circuit delay

All 1700+ tests pass (unit + integration)
2026-10-11 21:23:16 +02:00
Arnaud Dartois b97d3bec11 feat(security): enforcement — filtrage caméra dans les endpoints sensibles (#175) 2026-08-27 20:28:41 +02:00
Arnaud Dartois ca43c6d28e feat(analysis): scheduler de jobs d'analyse avec routage par capacités, priorités et dead-letter (#159) 2026-08-26 23:44:38 +02:00
Arnaud Dartois 13456ab4f5 fix(security): align rate limiting and password po 2026-08-20 18:14:18 +02:00
Arnaud Dartois 7d6213696f feat(storage): stockage configurable par l'IHM — providers Fichier + S3 (Fixes #78)
- IStorageProvider (Application) : Upload/Download/Delete/DeleteBatch/Health
- LocalStorageProvider : écriture atomique (tmp + move), anti path-traversal
- AlarikStorageProvider : S3-compatible (AWS SDK, ForcePathStyle), upload
  staging→final (atomique), batch delete 1000/appel (Correctif D6)
- StorageProviderFactory : provider résolu depuis les settings DB
  (storage.provider = Local|S3) avec fallback env, re-résolu à chaque appel
- Seed idempotent des clés storage.* (catégorie 'storage') au démarrage
- UI : section 'Stockage' dédiée dans SettingsPage (sélecteur Local/S3,
  champs conditionnels, clé secrète masquée, bouton Tester → POST
  /api/settings/storage/test)
- Tests : 6 LocalStorageProvider (roundtrip, delete, batch, traversal,
  health) ; Web 217/217, Infrastructure 177/177, Application 391/391
2026-08-12 10:14:40 +02:00
Arnaud Dartois 381410510f feat(health): health checks complets /health/ready + /health/live (Fixes #13)
- Checks enregistrés : PostgreSQL (ready+live), Alarik S3 (ready),
  CodeProject.AI/Ollama (live) — optionnels → Healthy si non configurés
- Routes : /health (alias /healthz), /health/ready (alias /readyz),
  /health/live → 503 + degradationLevel quand IA dégradée
- Fix CI : dashboard Hangfire skip en Testing (Hangfire désactivé → crash
  au démarrage WebApplicationFactory) — IntegrationTests 125/125 verts
2026-08-12 09:54:37 +02:00
Arnaud Dartois e14e4cde78 feat(discovery): base caméras Strix — DB SQLite embarquée 100k+ patterns (Fixes #64)
- cameras.db récupérée depuis l'image Docker eduard256/strix (MIT © 2025 eduard256,
  /app/cameras.db) : 3 688 marques, 17 313 streams, 73 238 modèles, 4 186 presets, 2 406 OUIs
- SqliteCameraDatabase (Microsoft.Data.Sqlite pur managé, Alpine-safe) :
  Search (presets+brands+models, multi-mots), BuildStreams (ids b:/m:/p:,
  placeholders [CHANNEL]/[USERNAME]/[PASSWORD]..., portFilter), LookupOui
- Copiée en Content CopyToOutputDirectory → dispo Central + Agent + tests
- Central : SearchDatabase/BuildStreamUrls/ResolveOuiVendor préfèrent la DB
  (fallback catalogue statique + templates)
- Agent : BuildCandidateUrls utilise les patterns réels de la marque (DB) sinon templates
- Tests : 10 (search marque/modèle/preset, build URLs, portFilter, OUI)
2026-08-12 08:45:18 +02:00
Arnaud Dartois 53b6240a3e fix(auth): répare l'authentification de bout en bout (cookie + JWT + rendu Blazor)
Anomalies corrigées :
- MudPopoverProvider manquant dans les layouts → circuit Blazor mourait sur
  l'ouverture de menus/popovers (dashboard jamais rendu après login)
- AddIdentity redéfinissait le schéma par défaut sur Identity.Application
  alors que /_auth/signin signait avec Cookies → cookie posé mais jamais
  validé, tout rechargement de page redirigeait vers /login. Forçage du
  schéma par défaut sur Cookies + schémas JwtBearer explicites sur les
  endpoints API d'AuthController et SettingsController
- Policy 'AdminUsers' utilisée par register-admin mais jamais enregistrée
  → 500 à l'appel. Ajoutée (RequireRole Admin)
- HeimdallAuthStateProvider ne lisait que le sessionStorage navigateur :
  pendant le prerender SSR, HttpContext.User (cookie) n'était pas utilisé
  → pages protégées redirigées vers /login. Fallback cookie ajouté
- SameOriginHttpMessageHandler : résolution de l'origine via
  IServerAddressesFeature quand IHttpContextAccessor est null (circuit
  Blazor post-hydratation) au lieu de heimdall.local → DNS cassé
- UpdateUserValidator rejetait le thème 'Auto' (défaut de l'UI) → 400
  à l'édition. Accepte désormais auto (case-insensitive)

Tests :
- E2E Playwright complets (login/logout/register/user management) : 33/33
- Integration (Testcontainers PostgreSQL) : 120/120 (valeur 'bool' du
  valueType, bootstrap admin via /register auto-admin, header X-API-Key,
  /proc/meminfo optionnel pour les LXC restreints)
- Exécution E2E séquentielle (xunit.runner.json) pour éliminer le flakiness
2026-08-09 23:43:11 +02:00
Arnaud Dartois afc1b2e032 fix: resolve demo admin seeding, Sentry DSN pass-through, and add startup diagnostics
- Replace IsDevelopment() guard with Seed:DemoOnStartup config flag
  (default: true, disable via SEED__DEMO_ON_STARTUP=false)
- Add Seed:AdminLogin (env SEED__ADMIN_LOGIN) to customize demo admin email
- Add Seed:AdminDisplayName (env SEED__ADMIN_DISPLAYNAME) to customize display name
- Add Sentry__Dsn env var to docker-compose files (matches .env convention)
- Increase Heimdall log level to Debug for startup diagnostics
- Add [DIAG] startup logs for Sentry DSN, Data Protection keys, environment
- Add Data Protection key directory diagnostic in DependencyInjection
2026-07-29 14:21:16 +00:00
Arnaud Dartois 450e019617 feat(infra): intégration Sentry/GlitchTip complète
- Upgrade Sentry.AspNetCore v6.7.0 → v6.8.0
- Ajout Sentry base package à Infrastructure (pour SentryErrorReporter)
- Configuration SDK enrichie dans Web et Agent:
  - AutoSessionTracking=false (GlitchTip ne supporte pas)
  - EnableLogs=true (logs structurés)
  - CaptureBlockingCalls=true (détection .Result/.Wait())
  - CaptureFailedRequests=true (capture 4xx/5xx HttpClient)
  - IncludeActivityData=true (DiagnosticSource)
  - SetBeforeSend pour nettoyage PII (password, token, secret)
  - SetBeforeBreadcrumb pour filtrage breadcrumbs
  - SampleRate, AttachStacktrace, MaxBreadcrumbs configurés
  - Release depuis la config, Environment auto
  - StackTraceMode.Enhanced
  - double.Parse avec CultureInfo.InvariantCulture
  - UseSentry avec type explicite SentryAspNetCoreOptions
- Abstraction IErrorReporter dans Application (0 dép. Sentry)
- Implémentation SentryErrorReporter dans Infrastructure
- Enregistrement DI dans Infrastructure
- DSN de développement dans appsettings.Development.json
- .env.example avec Sentry__Dsn et Sentry__TracesSampleRate
2026-07-28 14:52:52 +00:00
Arnaud Dartois f800103239 feat: remplacer Gotify par ntfy — push notifications multi-utilisateur avec isolation par topic
- Nouveau NtfyService: topic isolé par user (heimdall_{userId})
- Configuration globale Ntfy:BaseUrl + Ntfy:Token (plus de token par user)
- Renommage UserNotificationConfig: Gotify* → Ntfy*
- Migration des colonnes DB: gotify_enabled/url/token → ntfy_enabled/url
- Ajout service ntfy dans docker-compose (binwiederhier/ntfy)
- Mise à jour .env.example avec NTFY__BASE_URL et NTFY__TOKEN
- Suppression GotifyService et IGotifyService
2026-07-27 04:56:16 +00:00
Arnaud Dartois f9be0f1e0d feat: implémenter SignalR hubs (Monitoring, Notifications, Admin) + système de notifications complet
SignalR Hubs:
- MonitoringHub (/hubs/monitoring) — statuts agents/caméras/stockage/GPU jobs
- NotificationsHub (/hubs/notifications) — notifications in-app badge temps réel
- AdminHub (/hubs/admin) — broadcast changements config (Admin only)

Notification System:
- Nouvelles entités: Notification, NotificationTemplate, UserNotificationConfig
- CQRS/MediatR: 6 handlers (list, unread, mark-read, mark-all, config get/update)
- Infrastructure: NotificationService orchestrator + EmailService + GotifyService
- Rate limiter IMemoryCache (20 events/min/camera/type)
- Hangfire jobs: SendNotification, DailyDigest, WeeklyDigest
- NotificationsController API (6 endpoints)
- Blazor UI: NotificationsPage + NotificationBadge
- Migration AddNotifications (3 nouvelles tables)
- 644 nouveaux tests (Domain: 131, Application: 321, Infra: 151, Integration: 120, +autres)
2026-07-26 20:45:35 +00:00
Arnaud Dartois 550c621f35 fix(auth): move ConfigureApplicationCookie to Program.cs to override Identity defaults
Move ConfigureApplicationCookie configuration from DependencyInjection.cs
to Program.cs, ensuring it's called AFTER AddAuthentication().AddCookie().
This prevents Identity default paths (/Account/Login) from overriding
custom login paths (/login).
2026-07-24 18:15:56 +00:00
Arnaud Dartois e5fb13632f fix(auth): configure Identity cookie paths to use custom login page
Add ConfigureApplicationCookie to override Identity default paths
(/Account/Login) with custom paths (/login). This fixes the 404 error
when unauthenticated users are redirected to the login page.
2026-07-24 17:55:23 +00:00
Arnaud Dartois 6978d2e9ab fix(cqrs): implement missing auth service interfaces and fix tests
- Create RolePermissionService (delegates to AppPermissions)
- Create AuthSignInService (wraps SignInManager)
- Create AuthDataService (handles settings, first-user, token revocation)
- Register all new services in Infrastructure DI
- Fix AuthDataService RevokedRefreshToken constructor usage
- All 226 tests passing
2026-07-22 20:05:59 +00:00
Arnaud Dartois d67cbd64cc refactor(cqrs): cleanup old service layer, preserve discovery/assignment services for handlers
- Remove 13 old service interfaces from Application/Services
- Remove 13 old service implementations from Infrastructure/Services
- Remove old SnapshotService (no CQRS replacement needed)
- Update Infrastructure DI to register only CQRS-compatible services
- Preserve CameraEventService + PersonService for existing tests
- Clean up duplicate IUserRepository registration
2026-07-22 20:00:49 +00:00
Arnaud Dartois 11f7fd8d20 feat(cqrs): migrate Sites, Auth, Users, Cameras to CQRS
- Sites: CreateSite, UpdateSite, DeleteSite, GenerateToken commands + handlers
- Auth: Login, Register, RefreshToken, 2FA, ChangePassword, Logout commands
- Users: CRUD, roles, sites, lock/unlock, reset-password commands + queries
- Cameras: CRUD, SetCredentials commands + queries
- Add IApplicationDbContext abstraction for Clean Architecture
- Add ICredentialProtector, IJwtService interfaces to Application layer
- 0 build errors, 0 warnings
2026-07-22 19:43:13 +00:00
Arnaud Dartois 58a3ce5b1b chore: vire toute trace d'InMemory, remplace par Testcontainers PostgreSQL
- Supprime InMemory de tous les .csproj (Infrastructure, Domain.Tests, IntegrationTests)\n- Supprime le branchement Database:Provider=InMemory de DependencyInjection.cs\n  (plus que du PostgreSQL natif)\n- Infrastructure.Tests: CameraAssignment + CameraEvent tests -> Testcontainers\n- PostgreSqlContainerFixture ajoute aux Infrastructure.Tests\n- appsettings.Testing.json: retire Database:Provider et Hangfire:Enabled\n- 4 tests echouent encore: bugs pre-existants masques par InMemory\n  (FK non respectees, donnees de test erronees)\n\nTests: 222/226 passed (4 pre-existants lies aux FK)
2026-07-21 12:19:43 +00:00
Arnaud Dartois 940e826865 fix(identity): corrige JWT role claims, password policy, et consistency
- JWT role claims: string.Join -> ClaimTypes.Role individuels (debloque [Authorize(Roles)])\n- Password policy: RequireUppercase=true, RequireNonAlphanumeric=true\n- JWT validation params extraits en methode partagee (anti-duplication)\n- Retours 401 uniformises avec body structure\n- Champ Langue ajoute dans le dialog d'edition utilisateur\n\nBuild: 0 errors, 0 warnings\nTests: 226/226 passed
2026-07-21 08:47:24 +00:00
Arnaud Dartois 81b8e6aacf refactor: replace isTesting hacks with appsettings.Testing.json
The entire 'if (isTesting)' pattern is removed. Instead:
- Add appsettings.Testing.json: Database:Provider=InMemory,
  DataProtection:Mode=Ephemeral, Hangfire:Enabled=false,
  Database:MigrateOnStartup=false
- DependencyInjection reads configuration keys instead of
  environment name
- Program.cs uses Hangfire:Enabled and Database:MigrateOnStartup
  config booleans instead of IsEnvironment("Testing") checks
- Test fixture persists (UseEnvironment + UseSetting for
  unique InMemoryDbName per instance)

No functional change — still 54/61 integration tests passing.
The 7 remaining failures are pre-existing 'expected 401 got 400'
auth middleware differences.
2026-07-21 07:23:33 +00:00
Arnaud Dartois 34037c20bf fix(dp): keep X509Certificate2 alive for DataProtection key ring
- Remove `using var` from dpCert so the cert stays alive for
  ProtectKeysWithCertificate (was disposed, causing
  CryptographicException)
- Add query filter on DiscoveredStreamUrl for model warning #10622
- Simplify migration retry: call Migrate() directly instead of
  GetPendingMigrations()+Migrate() to reduce transient startup noise
2026-07-20 19:58:32 +00:00
Arnaud Dartois c8c93e3d87 fix(dp): guard data protection certificate bootstrap with isTesting check
The self-signed certificate auto-bootstrap for DataProtection key
encryption ran unconditionally, causing integration tests to crash
with CryptographicException (m_safeCertContext is an invalid handle)
when Identity token providers tried to use the certificate encryptor.

The test environment has no /var/lib/heimdall/dp-keys/ directory, and
loading a PFX with empty password is fragile on Linux — the X509
certificate handle becomes invalid.

Wrap the certificate + file persistence code in the same if (isTesting)
guard already used for the DbContext setup. Tests now use ephemeral
DataProtection keys without certificate encryption.
2026-07-20 15:44:20 +00:00
Arnaud Dartois 8278c75cf4 fix(dp): auto-bootstrap self-signed certificate for data protection key encryption
Generates a self-signed X.509 certificate on first run and stores it
alongside DP keys in the persistent volume. Uses ProtectKeysWithCertificate
to encrypt data protection keys at rest. Prevents the 'No XML encryptor
configured' startup warning.
2026-07-20 14:07:27 +00:00
Arnaud Dartois a33a436c26 chore: apply auto-fixes and code improvements
- AuthService: fix public registration logic revert
- JwtService: add ILogger dependency
- SoftDeleteInterceptor removed (merged)
- XML doc comments on all services
- Error boundary + error page in Blazor
- Optimize StatsService queries
- ApiClient error handling improvements
2026-07-20 09:50:43 +00:00
Arnaud Dartois 153be535d4 fix(multiple): auth, workers, EF Core, MudTheme fixes
- Auth: AssignmentsController auth bug, ReleaseCamera result, logout endpoint
- Security: open redirect fix
- Workers: AgentState thread-safety, CameraStreamService async, HttpClientFactory
- EF Core: AddCameraDiscoveryFields migration, DI interceptors, retry helper
- UI: MudTheme palette config, aria-labels on icon buttons
2026-07-19 19:58:45 +00:00
Arnaud Dartois 4b83e35df0 fix(infra): persist Data Protection keys for Docker resilience
- Add PersistKeysToFileSystem with SetApplicationName so camera
  credential decryption survives container restarts
- Move connection string resolution inside else block to fix
  integration tests (was evaluating connection string eagerly
  before Testing environment check)
- Remove hardcoded connection string fallback, throw instead
- Add Microsoft.AspNetCore.DataProtection.Extensions dependency
2026-07-19 19:34:58 +00:00
Arnaud Dartois 32025eae67 fix(infra): persist Data Protection keys to filesystem for Docker
- Add PersistKeysToFileSystem to /var/lib/heimdall/dp-keys so camera
  credential decryption survives container restarts
- Remove hardcoded connection string fallback, throw instead
- Add Microsoft.AspNetCore.DataProtection.Extensions dependency
2026-07-19 19:33:10 +00:00
Arnaud Dartois 129a6148f5 feat(persons): add person manager with known face registry and CRUD API 2026-07-19 15:28:38 +00:00
Arnaud Dartois 8ac8baf20a feat(storage): add S3 snapshot service and comprehensive tests for phases 2-3
Adds S3-compatible snapshot storage (Alarik) with AWS Signature V4,
upload, thumbnail, and delete operations. Backfills Phase 2 & 3 with
27 new tests covering camera assignment strategies, event CRUD with
filtering, snapshot attachment, and API contract validation.

- SnapshotService with S3 REST API via HttpClient + SigV4 signing
- 10 unit tests for CameraAssignmentService (assign, release, failover, history)
- 9 unit tests for CameraEventService (create, query, filter, delete, snapshot)
- 8 integration tests for AssignmentsController + EventsController
- SnapshotService registration with 5-min timeout HTTP client
2026-07-19 13:14:05 +00:00
Arnaud Dartois 358443ff1a feat(events): implement camera event pipeline with AI detection storage
Adds the foundation for AI-powered detection events storage, query,
and snapshot management. Agents can POST detection events (motion,
person, vehicle, face, etc.) with confidence scores and metadata;
users can query, filter, and view event history.

- CameraEvent entity with EF Core configuration + migration
- ICameraEventService / CameraEventService with paged query + filters
- EventsController: 5 REST endpoints (create, get, query, attach snapshot, delete)
- Agent-side CameraStreamService: FFmpeg-based RTSP frame capture (foundation)
- Supports both ApiKey (agent) and JWT (user) authentication
2026-07-19 12:55:05 +00:00
Arnaud Dartois 159da2ca26 feat(assign): implement camera-to-agent assignment with failover and strategy support
Multi-agent sites need automatic camera distribution, failover when
an agent goes offline, and rebalancing when new agents join.

Adds CameraAssignment entity with audit trail, 4 assignment strategies
(RoundRobin, GpuPriority, LeastCameras, Failover), a Hangfire failover
job that checks for stale heartbeats every 60s, a discovery coordinator
for leader election, 6 REST endpoints, EF migration, and DI registration.
2026-07-19 12:20:07 +00:00
Arnaud Dartois 2152fca3c6 feat(discovery): implement camera detection and dedup pipeline
Manual camera configuration does not scale beyond a few devices.
Automated discovery is needed to support deployments with 50+
cameras across heterogeneous protocols (ONVIF, mDNS, HTTP, ARP).

Phase 1 introduces 5 network probe services, a stream tester, an
orchestrating discovery service with IP+MAC deduplication, 11 REST
endpoints, a pre-verification endpoint, 57 tests, and DI registration.
2026-07-19 12:00:16 +00:00
Arnaud Dartois 57b51f403c feat(web): add profile, roles, groups and claims pages 2026-07-19 06:49:17 +00:00
Arnaud Dartois 0f22a60fbc fix(db): correct Site index filter column casing ("is_deleted" → "IsDeleted")
The filtered index IX_sites_IsDeleted uses a WHERE clause
referencing "is_deleted" (lowercase underscore) but the column
is "IsDeleted" (PascalCase). PostgreSQL quoted identifiers are
case-sensitive, causing Npgsql.PostgresException on migration.

Fixes remaining HEIMDALL issues on GlitchTip.
2026-07-18 20:01:31 +00:00
Arnaud Dartois c2837af089 feat(mvp): complete MVP hardening — API, Web, config system, SignalR, tests 2026-07-18 18:58:20 +00:00
Arnaud Dartois 076bc58e93 fix(security): implement IDataProtector-based credential encryption for CameraCredentials
- Add ICredentialProtector/DataProtectorCredentialProtector using ASP.NET Core Data Protection
- Register AddDataProtection + ICredentialProtector in Infrastructure DI
- Update CameraCredentials XML comments to reference real protector
- Add SetCredentialsAsync to CameraService with encryption
- Update ICameraService interface
2026-07-17 20:07:03 +00:00
Arnaud Dartois b816446f72 feat(audit): journal d'audit consultable dans l'UI
- IAuditLogService + AuditLogService avec pagination et filtres
- AuditLogsController: GET /api/audit-logs (resourceType, action, page)
- AuditLogsPage Blazor: liste paginée avec filtres + coloration par action
- Lien vers le journal dans le menu Admin (visible pour les Admins)
2026-07-17 18:14:41 +00:00
Arnaud Dartois e17dce1b4f fix(api): StatsController uses IStatsService instead of direct AppDbContext
- Add IStatsService in Application layer
- Add StatsService in Infrastructure layer
- StatsController now injects IStatsService (Clean Architecture compliant)
- StatsResponse DTO added to Application/DTOs
2026-07-17 17:36:14 +00:00
Arnaud Dartois da123ec544 fix(tests): InMemory DB isolation + refactor test helpers
- Fix: InMemory database name now unique per test factory instance
  (was using process-wide env var, now per-host config via UseSetting)
- Refactor: all integration tests use shared TestHelpers.CreateAdminClientAsync
- New: register-admin endpoint (test/dev only) creates Admin users directly
- New: TestHelpers.cs with extension method for admin client creation
- Cleanup: removed bootstrap template files, old Counter/Weather pages
- Cleanup: simplified app.css with MudBlazor-only styles
- Seed: demo admin + demo site created in Development mode
2026-07-17 13:15:25 +00:00
Arnaud Dartois 6d5ec0c201 feat(mvp): cameras API, Docker production, tests, security, Makefile
- Cameras API: CRUD with service/controller/DTOs + Blazor page
- Docker: production-grade compose with healthchecks, .env, Makefile, networks
- Healthchecks: /healthz (liveness) and /readyz (readiness) endpoints
- Testing: 13 integration tests (Auth, Sites, Users, Cameras controllers)
  - Users: create, list, lock, reset-password
  - Cameras: create with site, list by site
- Environment: .env.example, docker-compose.override.yml for dev
- Infrastructure: ICameraService registered in DI
2026-07-17 06:18:56 +00:00
Arnaud Dartois 38816aec8a feat(mvp): complete Blazor UI + User Management + integration tests 2026-07-16 21:19:16 +00:00
Arnaud Dartois b217c932e8 feat(mvp): implement MVP multi-site platform
Complete MVP implementation (Étape 1) covering:
- Domain: primitives (Entity<TId>, ValueObject), 10 entities, 6 enums
- EF Core: AppDbContext + Identity, 8 EntityTypeConfigurations, audit/soft-delete interceptors, initial migration
- Application: service interfaces, DTOs, FluentValidation, ServiceResult pattern
- Security: Identity + JWT + API Key multi-auth, role-based permissions, constant-time key validation
- API: Auth/Sites/Agents controllers with explicit auth scheme policies
- Workers: Hangfire PostgreSQL setup with schema isolation, HeartbeatMonitorJob
- Agent: registration service + 30s heartbeat loop
- Docker: multi-stage Dockerfiles for central + agent, docker-compose.yml
- CI/CD: GitHub Actions pipeline with build+test and Docker build
- Tests: 13 domain tests (Site, Agent, Camera entities)

Architecture decisions per deliberation council:
- API Key via AuthenticationHandler<T> (not middleware)
- Explicit [Authorize(AuthenticationSchemes)] on all endpoints
- Event/Recording/Person/Vehicle deferred from initial migration
- Hangfire compatible with .NET 10 (v1.8.17)
2026-07-16 20:53:56 +00:00