Architecture
FacilFlow system architecture and component design.
Platform Context
graph TB
subgraph "Facilis Platform"
Jarvis["Jarvis AI
jarvis.facilis.ai"]
FacilFlow["FacilFlow
flow.facilis.ai"]
Firebase["Firebase
Auth & Firestore"]
end
subgraph "ML Platform"
MLflow["MLflow
Model Registry"]
end
subgraph "Edge Layer"
FacilEdge["FacilEdge Agents"]
end
subgraph "Plant Floor"
PLC["PLCs"]
SCADA["SCADA"]
Historians["Historians"]
end
Jarvis <-->|REST API| FacilFlow
Jarvis --> Firebase
FacilFlow --> Firebase
FacilFlow <-->|gRPC/MQTT| FacilEdge
FacilFlow --> MLflow
FacilEdge --> PLC
FacilEdge --> SCADA
FacilEdge --> Historians
style Jarvis fill:#0D9488,color:#fff
style FacilFlow fill:#22C55E,color:#fff
style FacilEdge fill:#F59E0B,color:#fff
style MLflow fill:#EC4899,color:#fff
System Components
Frontend Pages (28 total)
| Section |
Page |
Purpose |
| Auth |
LoginPage |
Firebase email/password login |
|
SignupPage |
New user registration |
|
ProfilePage |
User profile management |
|
SettingsPage |
App and account settings |
| Connect |
ConnectorsPage |
Manage data connectors |
|
ConnectorHubPage |
Browse available connector types |
|
AirbyteCatalogPage |
PyAirbyte connector catalog |
|
TelegrafPluginsPage |
Telegraf input plugin browser |
|
APIRepositoryPage |
Custom API connector repository |
|
AgentsPage |
Edge agent list and status |
|
AgentDetailPage |
Single agent details and metrics |
|
AgentConfigPage |
Agent configuration editor |
|
DataSourcesPage |
Registered data source browser |
| Infrastructure |
ClustersPage |
Compute cluster management |
| Build |
PipelinesPage |
Pipeline list, create, manage |
|
MLModelsPage |
ML model registry and lifecycle |
|
SchemaRegistryPage |
Data schema definitions |
| Analyze |
DataExplorerPage |
SQL/InfluxQL query interface |
|
DashboardPage |
Custom dashboard builder |
|
DataQualityPage |
Data quality rules and scores |
|
LineageExplorerPage |
Data lineage graph visualization |
| Operate |
AlertsPage |
Alert rules and notifications |
|
SchedulerPage |
Pipeline scheduling (cron) |
|
StoragePage |
Storage provider management |
|
ObjectStoreManagerPage |
Object/file browser for buckets |
|
AuditLogsPage |
Activity audit trail |
|
GovernancePage |
Data governance policies |
Backend Services
| Service |
Purpose |
| PipelineService |
Pipeline CRUD, execution, status tracking |
| AgentService |
Edge agent registration, heartbeat, commands |
| ClaudeService |
AI assistant via Claude Code CLI spawn with OAuth |
| ChatService |
Conversation history and context |
| DataSourceService |
Connector and data source management |
| StorageService |
Multi-cloud object storage operations |
| MLService |
Model training, inference, approvals, feature store |
| SchedulerService |
Cron-based pipeline scheduling |
| AlertService |
Alert rule evaluation and notification dispatch |
| DashboardService |
Dashboard CRUD and widget data |
| QualityService |
Data quality rule execution and scoring |
| LineageService |
Data lineage capture and graph queries |
| SchemaService |
Schema registry and validation |
| AuditService |
Activity logging and audit trail |
| ClusterService |
Compute cluster provisioning and monitoring |
Data Layer
| Store |
Purpose |
| PostgreSQL |
Pipelines, agents, users, configs, audit logs (Drizzle ORM) |
| InfluxDB 3 |
Time-series metrics and telemetry (Arrow Flight SQL) |
| MinIO/S3/Azure/GCS |
Object storage for artifacts, models, files |
| Redis |
Cache, pub/sub, real-time state, job queues |
| Tool Set |
Tools |
Purpose |
pipeline_tools |
list, create, start, stop, delete |
Pipeline management via Jarvis |
query_tools |
explore_catalog, query_data |
Data exploration via Jarvis |
Data Flow
flowchart LR
PLC[Plant Floor] --> Edge[FacilEdge]
Edge -->|gRPC| Receiver[Data Receiver]
Receiver --> Validate[Schema Validator]
Validate --> Store[(InfluxDB)]
Validate --> Quality[Quality Checks]
Validate --> Lineage[Lineage Capture]
Store --> API[Query API]
API --> UI[Web UI]
API --> Jarvis[Jarvis AI]
Store --> ML[ML Pipeline]
ML --> MLflow[MLflow Registry]
MLflow --> Inference[Inference Service]
ML Pipeline Flow
flowchart LR
Data[(InfluxDB / PostgreSQL)] --> Features[Feature Engineering]
Features --> Train[ML Training]
Train --> MLflow[MLflow Registry]
MLflow --> Approve[Approval Gate]
Approve --> Deploy[Inference Service]
Deploy --> Results[Predictions]
Results --> Store[(Storage)]
Real-time Architecture
Socket.IO namespaces and events:
| Namespace |
Events |
Purpose |
/pipelines |
pipeline:status, pipeline:metrics |
Pipeline execution updates |
/agents |
agent:heartbeat, agent:status |
Edge agent health |
/dashboards |
dashboard:data, widget:refresh |
Dashboard live data |
/alerts |
alert:triggered, alert:resolved |
Alert notifications |
/clusters |
cluster:status, cluster:metrics |
Cluster health |