Comprehensive guides and references for the OpenFrame platform
The Frontend Tenant Api Clients And Mingo module provides the client-side integration layer between the OpenFrame frontend application and backend services. It centralizes:
This module acts as the frontend gateway to the broader OpenFrame platform, including the API Service, Authorization Server, Gateway, Chat services, and integrated tools.
ApiClientAuthApiClientFleetApiClient and TacticalApiClientMingoApiService and hooksflowchart LR
UI["Frontend UI"] --> ApiClient["ApiClient"]
UI --> AuthApiClient["AuthApiClient"]
UI --> FleetClient["FleetApiClient"]
UI --> TacticalClient["TacticalApiClient"]
UI --> MingoService["MingoApiService"]
ApiClient --> ApiBackend["API Service"]
AuthApiClient --> AuthServer["Authorization Server"]
FleetClient --> FleetTool["Fleet MDM Tool"]
TacticalClient --> TacticalTool["Tactical RMM Tool"]
MingoService --> ChatBackend["Chat and AI Services"]
MingoService --> MingoStore["MingoMessagesStore"]
UI --> DialogDetailsStore["DialogDetailsStore"]
The ApiClient is the foundational abstraction. All other clients and services either extend or depend on it.
Component: ApiClient
The ApiClient is the central HTTP abstraction layer.
localStorageflowchart TD
Request["Outgoing Request"] --> Check401{"401 Response?"}
Check401 -->|No| ReturnOK["Return Response"]
Check401 -->|Yes| Refresh["Refresh Access Token"]
Refresh --> Success{"Refresh Success?"}
Success -->|Yes| Retry["Retry Original Request"]
Success -->|No| Logout["Force Logout"]
The client prevents infinite loops by:
/auth pagesComponent: AuthApiClient
Dedicated client for authentication endpoints:
/oauth/*/oauth/refreshflowchart LR
Env["runtimeEnv"] --> SharedHost{"Shared Host URL?"}
SharedHost -->|Yes| UseShared["Use Shared Host"]
SharedHost -->|No| Relative["Use Relative Path"]
This allows the same frontend to operate in:
Component: FleetApiClient
Specialized client for Fleet MDM tool integration.
{tenantHost}/tools/fleetmdm-server
All methods delegate actual HTTP execution to ApiClient, ensuring consistent authentication and retry behavior.
Component: TacticalApiClient
Specialized client for Tactical RMM tool integration.
{tenantHost}/tools/tactical-rmm
Like Fleet, it reuses ApiClient for transport and authentication handling.
The Mingo subsystem provides AI-powered chat interactions within the tenant frontend.
It includes:
Provides React Query mutations for:
sequenceDiagram
participant User
participant UI
participant ApiClient
participant ChatAPI
User->>UI: Send Message
UI->>ApiClient: POST /chat/api/v1/messages
ApiClient->>ChatAPI: Forward request
ChatAPI-->>ApiClient: Message ID
ApiClient-->>UI: Success response
All mutations:
Encapsulates:
It ensures:
State management engine for chat dialogs.
Built using Zustand with devtools support.
messagesByDialogstreamingMessagessegmentAccumulatorstypingStatesunreadCountsflowchart TD
Segments["Incoming Segments"] --> Accumulator["Message Segment Accumulator"]
Accumulator --> Processed["Processed Segments"]
Processed --> UpdateStore["Update Streaming Message"]
UpdateStore --> SyncMessages["Sync Dialog Messages"]
The accumulator supports:
This enables rich AI responses with structured segments.
Handles GraphQL-based dialog retrieval for ticket views.
flowchart TD
Store["DialogDetailsStore"] --> ApiClient["ApiClient"]
ApiClient --> GraphQL["/chat/graphql"]
GraphQL --> Connection["MessageConnection"]
Connection --> Store
The store ensures:
DialogNodeDialogConnectionDialogsResponseDialogResponseGraphQLMessageCoreMessageMessagesResponseThese types:
flowchart TD
Login["User Login"] --> CookieOrToken["Cookie or Dev Token"]
CookieOrToken --> ApiRequest["API Request"]
ApiRequest --> Unauthorized{"401?"}
Unauthorized -->|No| Success["Continue"]
Unauthorized -->|Yes| Refresh["/oauth/refresh"]
Refresh --> Valid{"Valid?"}
Valid -->|Yes| Retry["Retry Request"]
Valid -->|No| ForceLogout["Force Logout"]
This unified mechanism is shared across:
The Frontend Tenant Api Clients And Mingo module serves as the frontend integration boundary for:
It ensures:
Without this module, the frontend would require duplicated authentication logic, fragmented tool integrations, and inconsistent chat handling.
The Frontend Tenant Api Clients And Mingo module is the frontend’s transport, authentication, and AI orchestration layer.
It provides:
It is foundational to delivering a secure, multi-tenant, AI-enabled OpenFrame frontend experience.