Resgrid Web Application — User Area Overview
The Resgrid web application User Area is the primary interface for managing all aspects of a department's operations. It is built on ASP.NET Core with Razor views and follows an MVC (Model-View-Controller) architecture organized under the User area.
Architecture
All controllers in the User Area inherit from SecureBaseController, which provides:
DepartmentId— the current user's active departmentUserId— the current authenticated user IDUserName— the current authenticated user's name- Claims-based authorization helpers for fine-grained permission checks
Authorization Model
The system uses a two-layer authorization model:
- Policy-based authorization — ASP.NET
[Authorize(Policy = "...")]attributes on controller actions (e.g.,Call_View,Personnel_Create,Department_Update) - Imperative authorization — Runtime checks via Resgrid's
IAuthorizationServicefor granular permissions (e.g.,CanUserEditCall,CanUserViewUnit,CanUserRemoveUser)
Permission levels can be configured per department: | Level | Description | |-------|-------------| | Everyone | All department members | | Department Admins | Only department administrators | | Department + Group Admins | Department admins and station/group administrators | | Admins + Select Roles | Admins plus users in specific personnel roles |
Audit Trail
Most mutating operations fire an AuditEvent through the IEventAggregator system, capturing:
- Before and after JSON snapshots
- IP address and User-Agent
- Server/machine name
- Timestamp and acting user
Department Scoping
Every data query is scoped to the current user's DepartmentId, ensuring complete data isolation between departments.
Feature Areas
The User Area is organized into the following major feature areas:
| Feature | Description | Controller |
|---|---|---|
| Dashboard | Main operations dashboard with personnel status | HomeController |
| Department Settings | Department configuration and administration | DepartmentController |
| Dispatch & Calls | Call creation, management, and dispatch operations | DispatchController |
| Personnel | Personnel management, roles, and roster | PersonnelController |
| Units | Unit management, staffing, and state tracking | UnitsController |
| Groups & Stations | Station groups, membership, and geofencing | GroupsController |
| Shifts | Shift scheduling, signups, and trades | ShiftsController |
| Workshifts | Static workshift scheduling | WorkshiftsController |
| Mapping | Interactive maps, layers, POIs, and routing | MappingController |
| Messages | Internal messaging system | MessagesController |
| Calendar | Event scheduling and RSVP | CalendarController |
| Logs | Run logs, work logs, and activity tracking | LogsController |
| Reports | Comprehensive reporting suite | ReportsController |
| Documents | Document management and sharing | DocumentsController |
| Notes | Department notes and knowledge base | NotesController |
| Trainings | Training creation, delivery, and quizzes | TrainingsController |
| Inventory | Equipment and supply tracking | InventoryController |
| Contacts | External contact management | ContactsController |
| Notifications | Notification rules and alerts | NotificationsController |
| Custom Statuses | Custom personnel and unit status definitions | CustomStatusesController |
| Types & Configuration | Call types, unit types, priorities, and categories | TypesController |
| Protocols | Dispatch protocols with triggers and scoring | ProtocolsController |
| Forms | Custom form builder with automations | FormsController |
| Templates | Call quick templates and autofills | TemplatesController |
| Command Definitions | Incident command structure definitions | CommandController |
| Department Links | Inter-department data sharing | LinksController |
| Distribution Lists | Email distribution list management | DistributionListsController |
| Resource Orders | Cross-department resource ordering | OrdersController |
| Subscription & Billing | Plan management and Stripe billing | SubscriptionController |
| Security & Permissions | Permission configuration and audit logs | SecurityController |
| Profile & Account | User profile, schedules, and certifications | ProfileController |
| Voice & Audio | Voice channels and audio streams | VoiceController |
| Connect | Public department profile and posts | ConnectController |
| Search | Quick navigation search | SearchController |
Event System
The application uses an event aggregation system (IEventAggregator) to decouple operations. Key events include:
| Event | Triggered By | Purpose |
|---|---|---|
CallAddedEvent | Creating a new call | Broadcasts notifications to dispatched personnel |
CallUpdatedEvent | Updating or re-opening a call | Notifies personnel of changes |
CallClosedEvent | Closing a call | Records close state and notifies |
CalendarEventAddedEvent | Creating a calendar item | Notification delivery |
CalendarEventUpdatedEvent | Updating a calendar item | Notification delivery |
ShiftCreatedEvent | Creating a shift | Notification to personnel |
ShiftTradeRequestedEvent | Requesting a shift trade | Notifies potential traders |
ShiftTradeFilledEvent | Completing a shift trade | Confirms trade |
AuditEvent | Most write operations | Audit trail recording |
SecurityRefreshEvent | Permission changes | Cache invalidation |
UnitAddedEvent | Creating a unit | System integration |
DocumentAddedEvent | Uploading a document | Notification delivery |
LogAddedEvent | Creating a work log | Notification delivery |
Queue System
Time-sensitive operations like call dispatch use the IQueueService to enqueue asynchronous processing:
- Call Broadcast Queue — Sends push notifications, SMS, and email to dispatched personnel
- CQRS Event Queue — Handles cache clearing and other eventual-consistency operations