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
8a6a0a9d04
chore(api): remove dead IApiKeyService interface
...
No implementation exists and no controller injects it.
The DTOs (ApiKeyResponse, CreateApiKeyResponse) are kept
as they may be reused by a future endpoint.
2026-07-17 20:02:33 +00:00
Arnaud Dartois
21642bc4d6
fix(api): align IStatsService with ServiceResult pattern and fix activeSites bug
...
IStatsService was the only service returning raw Task<T> instead of
ServiceResult<T>. Also fixed 'activeSites = totalSites' copy-paste
bug — now counts sites where Enabled == true.
2026-07-17 19:28:02 +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
1203c7f0e1
fix(api): register-admin uses IAuthService instead of direct Entity creation
...
- Add RegisterAdminAsync to IAuthService interface
- Implement in AuthService (creates user + assigns Admin role)
- AuthController.register-admin now delegates to service layer
- No more 'new AppUser' in controller
2026-07-17 17:37:52 +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
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
Arnaud Dartois
bfb3e06bc1
feat: initialize .NET 10 Clean Architecture solution
...
Create Heimdall solution with 17 projects following Clean
Architecture for a maintainable and loosely coupled codebase.
src/ (9 projects):
- Domain, Domain.Primitives, Contracts (core layer, no deps)
- Application (ref. Domain) — CQRS/MediatR ready
- Infrastructure (ref. Application + Domain) — EF Core
PostgreSQL ready
- Api, Web (Blazor), Agent, Workers (hosts, ref. Application +
Infrastructure)
tests/ (8 projects):
- xUnit + Shouldly + NSubstitute + bUnit (Web.Tests)
- One test project per source project (Domain -> IntegrationTests)
Config: Directory.Build.props (Nullable, ImplicitUsings,
TreatWarningsAsErrors)
2026-07-16 19:09:28 +00:00