Admin Dashboard & Cockpit
Relevant source files
The following files were used as context for generating this wiki page:
The Admin Dashboard & Cockpit provides a centralized management interface for the NeXifyAI platform. It allows administrators to monitor system health, manage AI agents, track business leads, and interact with the autonomous "Master" AI orchestrator. The system uses a React-based frontend that communicates with a FastAPI backend, primarily secured via JWT authentication.
Sources: apps/web/src/pages/admin-next/AdminCockpit.jsx:1-10, apps/web/src/pages/Admin.jsx:1-20, services/api/routes/nexify_ai_routes.py:10-30
Architecture and Auth Flow
The Admin Cockpit operates as a Single Page Application (SPA) that requires valid administrator credentials. The application supports two primary authentication methods: Supabase JWT and a legacy backend JWT. Upon successful login, the application polls various API endpoints to populate the dashboard with live telemetry and business statistics.
The diagram shows the standard authentication and data synchronization loop for the dashboard.
Sources: apps/web/src/pages/admin/AdminCockpit.jsx:45-80, apps/web/src/pages/Admin.jsx:130-150, services/api/routes/nexify_ai_routes.py:277-310
Core Modules and Navigation
The cockpit is divided into several specialized views, accessible via a sidebar. Key modules include:
| Module | Purpose | Key Metrics / Data |
|---|---|---|
| Live Dashboard | Real-time system monitoring | Health Score, Active Tasks, Incidents |
| Leads | CRM lead management | Lead Status (New, Contacted, Qualified) |
| NeXify AI | Direct interaction with the Master Agent | Chat History, Brain Context, Tool Status |
| Commercial | Financial tracking | Quotes, Invoices, Revenue Stats |
| Audit | System integrity logs | Entity Type, Action, Actor, Timestamp |
Sources: apps/web/src/pages/Admin.jsx:1193-1225, apps/web/src/pages/admin/AdminCockpit.jsx:180-200
AI Agent Management and "Brain" Interaction
The cockpit provides a dedicated interface for managing the "AI Team." Administrators can create, edit, and monitor the performance of various agents. The "NeXify AI Master" (Agent Zero) orchestrates these agents using context retrieved from the "Brain," a semantic vector store powered by Qdrant and SQLite.
Proactive Mode
The cockpit features an "Autonomous Mode" toggle. When enabled, NeXify AI performs proactive tasks such as lead analysis, system checks, and morning briefings based on cron schedules.
This flowchart illustrates how administrator inputs are processed by the Master Agent and delegated to sub-systems.
Sources: apps/web/src/pages/Admin.jsx:658-750, apps/web/src/pages/admin-next/AdminCockpit.jsx:75-100, services/api/routes/nexify_ai_routes.py:100-200
System Health Monitoring
The platform includes a dedicated Health Score system (DOS v2.0). It calculates an overall percentage score based on the status of various components, including the database, workers, and AI provider availability. A standalone health.html provides a lightweight visualization of this data with a 5-minute auto-refresh cycle.
Health Status Parameters
- OpenRouter: Connectivity to the primary LLM provider.
- Qdrant: Availability of the vector memory store.
- Workers: Status of the background task processors (APScheduler).
- Disk/Memory: Hardware resource utilization on the host server.
Sources: apps/web/public/health.html:84-135, apps/web/src/pages/Admin.jsx:1130-1180, services/api/routes/nexify_ai_routes.py:315-385
API and External Integration
The cockpit manages external access via an API Key management system. This allows third-party tools to interact with NeXifyAI programmatically.
API Endpoints for Admin Management
| Endpoint | Method | Description |
|---|---|---|
/api/admin/stats | GET | Returns aggregated platform statistics. |
/api/admin/nexify-ai/status | GET | Returns connection status for all backend services. |
/api/admin/api-keys | POST | Generates a new nxa_live_ prefixed API key. |
/api/admin/nexify-ai/chat | POST | Primary endpoint for Master Agent chat interaction. |
Sources: services/api/routes/nexify_ai_routes.py:311-385, apps/web/src/pages/Admin.jsx:1063-1110
Summary
The Admin Dashboard & Cockpit serves as the nerve center for the NeXifyAI platform. It integrates business management (CRM, Billing) with deep technical monitoring and autonomous AI orchestration. By providing a unified interface for both human administrators and the AI Master, it enables high-level control over the platform's automated workflows and data integrity.
Sources: apps/web/src/pages/admin-next/AdminCockpit.jsx:250-280, apps/web/src/pages/Admin.jsx:1260-1280