Alert.CA.Frontend.API
A .NET 8 Web API serving as the bridge between the Alert California frontend application and Azure cloud services. It provides RESTful endpoints for camera operations, image retrieval, alert and notification management, user preferences, and real-time updates via SignalR.
Architecture Overview
Tech Stack
| Category | Technology |
|---|---|
| Runtime | .NET 8, ASP.NET Core |
| API Patterns | CQRS (MediatR), REST |
| Real-time | SignalR (Azure SignalR Service) |
| Databases | Azure Cosmos DB (NoSQL), Azure SQL Server |
| Storage | Azure Blob Storage (images), Azure Table Storage (metadata) |
| Auth | Microsoft Entra ID (Azure AD), JWT, Microsoft Identity Web |
| Image Processing | Magick.NET (GIF generation) |
| GIS Integration | ESRI Feature Layers |
| Monitoring | Azure Application Insights |
| Config | Azure App Configuration + Key Vault |
| Infrastructure | AlertCAInfrastructure NuGet package (shared services) |
| Testing | xUnit, Moq |
Solution Structure
| Project | Type | Purpose |
|---|---|---|
| Alert.CA.Frontend.API | ASP.NET Core 8 Web API | Controllers, startup configuration, SignalR hub, authentication |
| Alert.CA.Frontend.Application | Class Library | Application services, MediatR commands/queries, models, validators, utilities |
| Alert.CA.Frontend.API.Test | xUnit Test Project | Unit and integration tests |
| Devops | Pipeline Definitions | CI/CD build and deployment scripts |
Key Features
| Feature | Description |
|---|---|
| Camera Metadata | Query static and operational camera metadata, user-specific camera access |
| Camera Movement | PTZ control, focus, brightness, guard tour toggle, turbo mode, lease management |
| Image Retrieval | Latest images, timelapses (max 6 hours), panoramas, animated GIF generation |
| Alerts & Notifications | Alert message creation with map images, subscription management (ESRI + point-based) |
| Real-time Updates | SignalR-based broadcasts for image updates, activity logs, panoramas, camera config |
| User Preferences | UI settings, pinned/hidden cameras, layer visibility, camera display options |
| Feature Flags | Centralized feature flag retrieval from App Configuration |
| Shared Views | Shareable camera view links with anonymous access |
| Authentication | Azure AD with role-based access control (Camera.Operate, Notification.Alert, etc.) |
Data Flow
Documentation
- API Endpoints — Complete endpoint reference for all controllers
- Application Services — CQRS pattern, services, and utilities
- Command & Query Catalog — Full reference of MediatR commands and queries
- SignalR & Real-time — CameraHub, broadcast patterns, and client integration
- Configuration & Setup — Prerequisites, local development, configuration options, and troubleshooting
Stakeholders
| Name | Role |
|---|---|
| TBD | TBD |
License
This project is licensed under the [Your License Here].