Skip to main content

Architecture

FacilFlow system architecture overview.

Platform Context

System Components

Frontend (React 19 SPA)

ComponentPurpose
Pipeline BuilderVisual pipeline design with React Flow
Agent ManagerEdge agent monitoring and control
Data ExplorerSQL queries and time-series visualization
Jarvis ChatAI assistant with SSE streaming and artifact rendering
Canvas PanelSide panel for displaying generated artifacts
Auth SystemFirebase login with RBAC

Technology Stack:

  • React 19 + TypeScript
  • TailwindCSS + shadcn/ui
  • React Flow (@xyflow/react)
  • Zustand state management
  • Socket.IO client for real-time updates

Backend (Node.js + TypeScript)

ComponentPurpose
REST APIExpress.js endpoints for CRUD operations
Socket.IO ServerReal-time pipeline/agent status updates
Claude Code CLIAI assistant via CLI spawn with OAuth
SSE StreamingServer-Sent Events for real-time responses
Auth MiddlewareFirebase JWT validation
RBAC MiddlewareRole-based permission checks

Services:

  • PipelineService — Pipeline CRUD and execution
  • AgentService — Edge agent management
  • ClaudeService — AI assistant via Claude Code CLI spawn
  • ChatService — Conversation history
  • DataSourceService — Connector management

Data Layer

StorePurpose
PostgreSQLPipelines, agents, chat history (Drizzle ORM)
InfluxDB 3Time-series data with Arrow Flight SQL

MCP Tools:

  • pipeline_tools — List, create, start, stop, delete pipelines
  • query_tools — Explore catalog, query data

Data Flow