// SYSTEM_SCHEMATIC_V4.0
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#ffffff', 'primaryTextColor': '#000000', 'primaryBorderColor': '#000000', 'lineColor': '#000000', 'secondaryColor': '#f5f5f5', 'tertiaryColor': '#ffffff', 'background': '#fafafa', 'mainBkg': '#ffffff', 'secondBkg': '#f5f5f5', 'textColor': '#000000'}}}%%
graph TB
%% Define styles
classDef hardware fill:#ffffff,stroke:#000000,stroke-width:2px,color:#000000
classDef logic fill:#f5f5f5,stroke:#000000,stroke-width:1px,stroke-dasharray: 5 5,color:#000000
classDef storage fill:#ffffff,stroke:#000000,stroke-width:2px,color:#000000
classDef cognitive fill:#e3f2fd,stroke:#1976d2,stroke-width:3px,color:#000000
subgraph Power_Layer["POWER & ENERGY"]
direction TB
Solar[Solar Array 2kW] --> CC[Charge Controller]
Grid[Grid / Shore Power] --> CC
CC --> LiFePO4[LiFePO4 Battery Bank]
LiFePO4 --> PSU[Server PSU & Buck Converters]
end
subgraph Resilience_Layer["AUTONOMOUS RECOVERY"]
Watchdog[Hardware Watchdog] -->|Hard Reset| Host
UPS[UPS Backup] --> Host
VOLT[Voltage Sensors] --> Orch
end
subgraph Compute_Layer["COMPUTE KERNEL"]
direction TB
Host[Linux Docker Host]
Orch[Docker Orchestration]
Host --> Orch
Orch --> APP1[Data Logger]
Orch --> APP2[Telemetry Forwarder]
Orch --> APP3[Safety Controllers]
Orch --> APP4[Monitoring Stack]
end
subgraph Cognitive_Core["COGNITIVE CORE"]
direction TB
Orch --> Ollama[Ollama Inference Engine]
Ollama --> Model1[granite4:3b]
Ollama --> Model2[qwen2.5:3b]
Ollama --> Embed[nomic-embed-text]
Model1 --> CrewAI[CrewAI Orchestrator]
Model2 --> CrewAI
Embed --> VectorMem[Vector Memory
ChromaDB]
VectorMem --> CrewAI
CrewAI --> Agent1[SysAdmin Agent]
CrewAI --> Agent2[Strategist Agent]
CrewAI --> Agent3[Writer Agent]
CrewAI --> Agent4[Editor Agent]
Agent1 --> DockerSock[Docker Socket]
Agent2 --> SerperAPI[SerperDev API]
Agent2 --> Internet[Internet]
end
subgraph Storage_Layer["ATOMIC STORAGE"]
direction TB
NVMe[NVMe RAID 1]
Log[Immutable Logs]
APP1 --> NVMe
APP2 --> NVMe
APP3 --> NVMe
CrewAI --> RunHistory[Run History]
RunHistory --> NVMe
NVMe --> Log
Log --> BUFFER[Store & Forward Buffer]
end
subgraph Mission_Control["MISSION CONTROL"]
direction TB
CrewAI --> Status[Status]
Status --> FastAPI[FastAPI Backend
Port 8085]
FastAPI --> NextJS[Next.js Dashboard
Port 3003]
NextJS --> Operator[Operator]
end
subgraph Network_Layer["MESH & TRANSPORT"]
direction TB
Mesh[Zero-Trust Mesh / VPN]
Telem[LoRa Telemetry]
BUFFER --> Mesh
APP4 --> Mesh
Host --> Telem
NextJS --> RemoteAccess[Remote Access]
RemoteAccess --> Mesh
end
subgraph Observability["OBSERVABILITY"]
APP4 --> DATADOG[Datadog Metrics]
APP4 --> SENTRY[Sentry Error Tracking]
FastAPI --> HealthStatus[Health Status]
HealthStatus --> DATADOG
Mesh --> REMOTE[Remote Access]
end
%% Inter-layer connections
PSU ==> Host
Watchdog -.->|Heartbeat| Orch
%% Styling
class Solar,Grid,CC,LiFePO4,PSU,Host,NVMe,Watchdog,UPS hardware
class Orch,APP1,APP2,APP3,APP4,Mesh,Telem logic
class Log,BUFFER storage
class DATADOG,SENTRY,REMOTE,VOLT logic
class Ollama,Model1,Model2,Embed,CrewAI,VectorMem,Agent1,Agent2,Agent3,Agent4,DockerSock,SerperAPI,Internet,Status,FastAPI,NextJS,Operator,RunHistory,HealthStatus,RemoteAccess cognitive
Autonomous infrastructure stack for DDIL environments with Cognitive AI layer. Hardware watchdog architecture with power-aware orchestration, 100% data retention, and autonomous AI agent workforce.