Users Flow - martinmendozadev/StateForce GitHub Wiki

🚦 StateForce User Flows

This document provides detailed user interaction flows, system capabilities, and key responsibilities for each role within the StateForce platform. StateForce is designed to facilitate real-time emergency resource management, and its roles support efficient, coordinated responses. Each flow illustrates how users navigate the system to perform their duties, leveraging the platform's features and data structure.


🏆 1. Superadmin Flow

Primary Objectives:

Superadmins oversee the entire StateForce platform, ensuring system-wide health, security, configuration, and policy enforcement.

Key Responsibilities:

  • Configure platform-wide settings such as API keys and feature toggles.
  • Manage administrator accounts and roles.
  • Perform security audits and monitor system health.
  • Define and enforce global policies for data retention and access control.

User Flow Diagram:

graph TD
    SA_Login["Login via Google OAuth2"] --> SA_Dashboard{"Superadmin Dashboard"};

    SA_Dashboard --> SA_SysConfig["System Configuration"];
        SA_SysConfig --> SA_GlobalPolicies["Define Global Policies"];
        SA_SysConfig --> SA_AuthProviders["Authentication Provider Setup"];
        SA_SysConfig --> SA_FeatureToggles["Feature Toggles"];

    SA_Dashboard --> SA_AdminMgmt["Administrator Management"];
        SA_AdminMgmt --> SA_CreateAdmin["Create Admin Accounts"];
        SA_AdminMgmt --> SA_AssignRoles["Assign/Revoke Admin Roles"];

    SA_Dashboard --> SA_PlatformHealth["Platform Health Monitoring"];
        SA_PlatformHealth --> SA_ErrorLogs["View Error Logs"];
        SA_PlatformHealth --> SA_PerformanceMetrics["Analyze Performance Metrics"];

    SA_Dashboard --> SA_SecurityAudits["Security Audits"];
        SA_SecurityAudits --> SA_ReviewAuditLogs["Review Audit Logs"];
        SA_SecurityAudits --> SA_DataIntegrityChecks["Perform Data Integrity Checks"];

    SA_Dashboard --> SA_TenantMgmt["Tenant Management"];
    SA_Dashboard --> SA_Logout["Logout"];

Key Data Interactions:

  • users (for admin accounts)
  • audit_logs
  • System configuration tables.

🛠️ 2. Administrator Flow

Primary Objectives:

Administrators manage institutions within StateForce, overseeing users, institutional settings, and resource catalogs to ensure operational readiness.

Key Responsibilities:

  • Manage users and roles within their institution.
  • Configure institutional settings (e.g., locations, contacts).
  • Maintain institutional resources and operational readiness.
  • Monitor institutional activity and data accuracy.

User Flow Diagram:

graph TD
    A_Login["Login via Google OAuth2"] --> A_Dashboard{"Admin Dashboard"};

    A_Dashboard --> A_UserMgmt["User Management"];
        A_UserMgmt --> A_InviteUser["Invite New Users"];
        A_UserMgmt --> A_EditUserProfile["Edit User Profiles"];
        A_UserMgmt --> A_AssignRoles["Assign Roles"];

    A_Dashboard --> A_InstitutionMgmt["Institution Management"];
        A_InstitutionMgmt --> A_CreateInstitution["Create New Institution"];
        A_InstitutionMgmt --> A_UpdateInstitutionStatus["Update Status"];

    A_Dashboard --> A_ResourceCatalog["Resource Catalog Management"];
        A_ResourceCatalog --> A_ManageCategories["Manage Resource Categories"];
        A_ResourceCatalog --> A_ManageTypes["Manage Resource Types"];
        A_ResourceCatalog --> A_ManageSpecialties["Manage Specialty Types"];

    A_Dashboard --> A_ViewScopedAuditLogs["View Audit Logs"];
    A_Dashboard --> A_Logout["Logout"];

Key Data Interactions:

  • users, institutions, resources, audit_logs.

📋 3. Manager Flow

Primary Objectives:

Managers supervise emergency operations for institutions or teams. They oversee personnel, manage active events, allocate resources, and ensure readiness.

Key Responsibilities:

  • Monitor and manage active events.
  • Allocate resources strategically.
  • Supervise team members and shifts.
  • Generate operational reports.

User Flow Diagram:

graph TD
    M_Login["Login via Google OAuth2"] --> M_Dashboard{"Manager Dashboard"};

    M_Dashboard --> M_EventOversight["Event Oversight"];
        M_EventOversight --> M_ViewEvents["View Active Events"];
        M_EventOversight --> M_AdjustEventPriority["Adjust Event Priority"];

    M_Dashboard --> M_ResourceMgmt["Resource Allocation"];
        M_ResourceMgmt --> M_ViewResources["View Resources"];
        M_ResourceMgmt --> M_ApproveRequests["Approve Resource Requests"];

    M_Dashboard --> M_TeamMgmt["Team Management"];
        M_TeamMgmt --> M_ViewTeamMembers["View Team Members"];
        M_TeamMgmt --> M_ManageShifts["Manage Shifts"];

    M_Dashboard --> M_Reporting["Reporting & Analytics"];
        M_Reporting --> M_GenerateReports["Generate Reports"];
        M_Reporting --> M_AnalyzePerformance["Analyze Performance"];

    M_Dashboard --> M_Logout["Logout"];

Key Data Interactions:

  • events, resources, audit_logs.

⚙️ 4. Standard User Flow

Primary Objectives:

Standard Users are frontline personnel who interact directly with events and resources. Their actions are critical for real-time updates and situational awareness.

Key Responsibilities:

  • Create, update, and close events.
  • Dispatch resources to events.
  • Provide real-time updates on resource and event statuses.

User Flow Diagram:

graph TD
    SU_Login["Login via Google OAuth2"] --> SU_Dashboard{"Operator Dashboard"};

    SU_Dashboard --> SU_EventMgmt["Event Management"];
        SU_EventMgmt --> SU_CreateEvent["Create New Event"];
        SU_EventMgmt --> SU_UpdateEventStatus["Update Event Status"];

    SU_Dashboard --> SU_ResourceTracking["Resource Tracking"];
        SU_ResourceTracking --> SU_AssignResources["Assign Resources"];
        SU_ResourceTracking --> SU_UpdateResourceStatus["Update Resource Status"];

    SU_Dashboard --> SU_Logout["Logout"];

Key Data Interactions:

  • events, resources, audit_logs.

👀 5. Guest Flow

Primary Objectives:

Guests have read-only access to predefined information for external observers or auditors.

Key Responsibilities:

  • View public events and reports.
  • Access shared institutional data.

User Flow Diagram:

graph TD
    G_Login["Login"] --> G_Dashboard{"Guest Dashboard"};

    G_Dashboard --> G_ViewEvents["View Events"];
    G_Dashboard --> G_ViewReports["View Reports"];
    G_Dashboard --> G_Logout["Logout"];

Key Data Interactions:

  • Read-only access to events.

🔒 6. Restricted User Flow

Primary Objectives:

Restricted users perform specific tasks or view limited data. This role is for individuals with highly defined duties.

Key Responsibilities:

  • Perform predefined actions (e.g., check-in).
  • View explicitly permitted data.

User Flow Diagram:

graph TD
    RU_Login["Login"] --> RU_Dashboard{"Restricted Dashboard"};

    RU_Dashboard --> RU_ViewSpecificInfo["View Specific Info"];
        RU_ViewSpecificInfo --> RU_ViewTask["View Assigned Task"];

    RU_Dashboard --> RU_PerformAction["Perform Specific Action"];
        RU_PerformAction --> RU_UpdateAvailability["Update Availability"];

    RU_Dashboard --> RU_Logout["Logout"];

Key Data Interactions:

  • Restricted access to specific fields in users.

🔔 Notifications and Alerts

Description:

Notifications are critical for real-time updates and workflows. Each role interacts with alerts differently:

  • Superadmins: Receive system-wide notifications on performance and security.
  • Administrators: Get alerts related to institutional activity (e.g., new user registrations, resource updates).
  • Managers: Receive event and resource-related updates (e.g., changes in priority or dispatch notifications).
  • Standard Users: Receive updates on assigned events and resources.
  • Guests: Limited notifications for shared reports or updates.

Notification Channels:

  • Email: Sent for significant updates (e.g., event creation, priority changes).
  • SMS: For urgent updates (e.g., critical incidents).
  • In-app: Real-time notifications for user dashboards.

📊 Role Capabilities Summary

Feature / Action Area Superadmin Admin Manager Standard User Guest Restricted
System Configuration Full Scope No No No No
Manage Institutions Full Scope View No No No
Event Management Full Full Full Direct View Limited
Resource Management Full Full Full Direct No Limited
Reporting & Analytics Full Full Full Limited View No

Notes

  • Error Handling: Ensure clear error messages and fallback workflows for failed actions (e.g., insufficient permissions, unavailable resources).
  • Mobile-Specific Flows: Future versions will optimize workflows for mobile users, ensuring responsiveness and usability on smaller devices.
  • Real-Time Updates: Hotwire and ActionCable enable seamless real-time updates across all roles.
  • Data Privacy: Visibility settings (public, private, restricted) control access to sensitive data.

Related Pages