Skip to main content

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 department
  • UserId — the current authenticated user ID
  • UserName — 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:

  1. Policy-based authorization — ASP.NET [Authorize(Policy = "...")] attributes on controller actions (e.g., Call_View, Personnel_Create, Department_Update)
  2. Imperative authorization — Runtime checks via Resgrid's IAuthorizationService for 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:

FeatureDescriptionController
DashboardMain operations dashboard with personnel statusHomeController
Department SettingsDepartment configuration and administrationDepartmentController
Dispatch & CallsCall creation, management, and dispatch operationsDispatchController
PersonnelPersonnel management, roles, and rosterPersonnelController
UnitsUnit management, staffing, and state trackingUnitsController
Groups & StationsStation groups, membership, and geofencingGroupsController
ShiftsShift scheduling, signups, and tradesShiftsController
WorkshiftsStatic workshift schedulingWorkshiftsController
MappingInteractive maps, layers, POIs, and routingMappingController
MessagesInternal messaging systemMessagesController
CalendarEvent scheduling and RSVPCalendarController
LogsRun logs, work logs, and activity trackingLogsController
ReportsComprehensive reporting suiteReportsController
DocumentsDocument management and sharingDocumentsController
NotesDepartment notes and knowledge baseNotesController
TrainingsTraining creation, delivery, and quizzesTrainingsController
InventoryEquipment and supply trackingInventoryController
ContactsExternal contact managementContactsController
NotificationsNotification rules and alertsNotificationsController
Custom StatusesCustom personnel and unit status definitionsCustomStatusesController
Types & ConfigurationCall types, unit types, priorities, and categoriesTypesController
ProtocolsDispatch protocols with triggers and scoringProtocolsController
FormsCustom form builder with automationsFormsController
TemplatesCall quick templates and autofillsTemplatesController
Command DefinitionsIncident command structure definitionsCommandController
Department LinksInter-department data sharingLinksController
Distribution ListsEmail distribution list managementDistributionListsController
Resource OrdersCross-department resource orderingOrdersController
Subscription & BillingPlan management and Stripe billingSubscriptionController
Security & PermissionsPermission configuration and audit logsSecurityController
Profile & AccountUser profile, schedules, and certificationsProfileController
Voice & AudioVoice channels and audio streamsVoiceController
ConnectPublic department profile and postsConnectController
SearchQuick navigation searchSearchController

Event System

The application uses an event aggregation system (IEventAggregator) to decouple operations. Key events include:

EventTriggered ByPurpose
CallAddedEventCreating a new callBroadcasts notifications to dispatched personnel
CallUpdatedEventUpdating or re-opening a callNotifies personnel of changes
CallClosedEventClosing a callRecords close state and notifies
CalendarEventAddedEventCreating a calendar itemNotification delivery
CalendarEventUpdatedEventUpdating a calendar itemNotification delivery
ShiftCreatedEventCreating a shiftNotification to personnel
ShiftTradeRequestedEventRequesting a shift tradeNotifies potential traders
ShiftTradeFilledEventCompleting a shift tradeConfirms trade
AuditEventMost write operationsAudit trail recording
SecurityRefreshEventPermission changesCache invalidation
UnitAddedEventCreating a unitSystem integration
DocumentAddedEventUploading a documentNotification delivery
LogAddedEventCreating a work logNotification 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