%%{init: {'theme': 'base', 'themeVariables': {
'primaryColor': '#1e293b',
'edgeLabelBackground':'#0f172a',
'tertiaryColor': '#0f172a'
}}}%%
graph TD
%% --- STYL NASA/APOLLO ---
classDef ui fill:#172554,stroke:#3b82f6,stroke-width:3px,color:#e0f2fe,rx:10,ry:10,font-weight:bold;
classDef middleware fill:#312e81,stroke:#818cf8,stroke-width:2px,color:#e0eaff,rx:8,ry:8;
classDef gateway fill:#064e3b,stroke:#10b981,stroke-width:4px,color:#d1fae5,rx:15,ry:15,stroke-dasharray: 5 5;
classDef commander fill:#4c1d95,stroke:#d8b4fe,stroke-width:3px,color:#f3e8ff,rx:12,ry:12,font-weight:bold;
classDef specialist fill:#1f2937,stroke:#6b7280,stroke-width:2px,color:#d1d5db,rx:10,ry:10;
classDef storage fill:#000000,stroke:#f59e0b,stroke-width:3px,color:#fef3c7,rx:6,ry:6;
classDef protocol fill:#0f172a,stroke:#22c55e,stroke-width:2px,color:#dcfce7,rx:10,ry:10;
classDef warn fill:#0f172a,stroke:#ef4444,stroke-width:2px,color:#fee2e2,rx:10,ry:10,stroke-dasharray: 2 2;
%% --- Kolory "crew" per konsola (zostajΔ
) ---
classDef cPAO fill:#0b2a4a,stroke:#38bdf8,stroke-width:2px,color:#e0f2fe,rx:10,ry:10;
classDef cGUIDO fill:#3b1f0a,stroke:#fdba74,stroke-width:2px,color:#ffedd5,rx:10,ry:10;
classDef cFIDO fill:#2e1065,stroke:#e9d5ff,stroke-width:2px,color:#f5f3ff,rx:10,ry:10;
classDef cEECOM fill:#2a0f14,stroke:#fb7185,stroke-width:2px,color:#ffe4e6,rx:10,ry:10;
classDef cINCO fill:#1f2937,stroke:#fbbf24,stroke-width:2px,color:#fffbeb,rx:10,ry:10;
classDef cCAPCOM fill:#052e2b,stroke:#5eead4,stroke-width:2px,color:#d1fae5,rx:10,ry:10;
classDef cPLN fill:#0f172a,stroke:#94a3b8,stroke-width:2px,color:#e5e7eb,rx:10,ry:10,stroke-dasharray: 4 3;
%% =========================================================
%% WARSTWA 1: FLIGHT DECK
%% =========================================================
subgraph FLIGHT_DECK ["π°οΈ FLIGHT DECK (Apollo Console UI)"]
style FLIGHT_DECK fill:#0f172a,stroke:#3b82f6,color:#fff
Operator((π¨ββοΈ Console Operator
PaweΕ)):::ui
MC_UI["π₯οΈ MCC Dashboard (Next.js)
Commands β’ Telemetry β’ Console View"]:::ui
StatusBar["π STATUS
LOOP β’ WIP β’ ALERTS"]:::middleware
ModeSwitch["π‘ SIM / π’ FLIGHT
Go/No-Go Switch"]:::warn
Operator --> MC_UI
MC_UI -.- StatusBar
MC_UI -.- ModeSwitch
end
%% =========================================================
%% WARSTWA 2: COMMS
%% =========================================================
subgraph COMMS ["π‘ COMMS ARRAY (Mission Data/Voice Interface)"]
style COMMS fill:#1e1b4b,stroke:#818cf8,color:#fff
NextAPI["MCC API
(Auth β’ Validation β’ Audit)"]:::middleware
SSE["Telemetry Downlink
(SSE Stream)"]:::middleware
MC_UI <--> NextAPI
SSE -.-> MC_UI
end
%% =========================================================
%% WARSTWA 3: ENGINE
%% =========================================================
subgraph ENGINE ["βοΈ ENGINE ROOM (Command Gateway)"]
style ENGINE fill:#022c22,stroke:#10b981,color:#fff
Gateway["OPENCLAW GATEWAY
Port 18789 / Node.js"]:::gateway
ToolManager["π§° FLIGHT TOOLS
Safe ops β’ Policy enforcement"]:::middleware
NextAPI --> Gateway
Gateway --> ToolManager
end
%% =========================================================
%% WARSTWA 4: MCC (Apollo)
%% =========================================================
subgraph MCC ["ποΈ MCC β Apollo Mission Control"]
style MCC fill:#2e1065,stroke:#d8b4fe,color:#fff
FLIGHT["π§βπ FLIGHT
Flight Director (Muddy)"]:::commander
CAPCOM["ποΈ CAPCOM
Single Voice / Tasking (Orchestrator)"]:::commander
GUIDO["π§ GUIDO
Procedures β’ Sequencing"]:::commander
FIDO["π FIDO
Dynamics β’ Metrics"]:::commander
EECOM["π§ EECOM
Systems β’ Safety"]:::commander
INCO["π‘ INCO
Comms β’ Instrumentation β’ Infra"]:::commander
PAO["π£ PAO
Public Affairs"]:::commander
SURGEON["π©Ί SURGEON
Crew Support"]:::commander
MPAD["πΊοΈ MPAD
Planning & Analysis"]:::commander
%% Delegacja (czytelnie)
FLIGHT --> GUIDO
FLIGHT --> FIDO
FLIGHT --> EECOM
FLIGHT --> INCO
FLIGHT --> PAO
FLIGHT --> SURGEON
FLIGHT --> MPAD
%% Crew (Collapsed)
CAPCOM_Crew["CAPCOM CREW
β’ routing β’ acks β’ task log"]:::cCAPCOM
GUIDO_Crew["GUIDO CREW
β’ checklisty β’ sekwencje β’ gates"]:::cGUIDO
FIDO_Crew["FIDO CREW
β’ Pulse β’ Scout β’ Forge"]:::cFIDO
EECOM_Crew["EECOM CREW
β’ Anvil β’ Cipher β’ Inspector"]:::cEECOM
INCO_Crew["INCO CREW
β’ Sentry β’ Pixel β’ Concierge"]:::cINCO
PAO_Crew["PAO CREW
β’ Echo β’ Rex β’ Clip β’ Hype β’ Sage"]:::cPAO
SURGEON_Crew["SURGEON CREW
β’ Beacon β’ Link β’ Vibe"]:::cPAO
MPAD_Plan["MPAD / PLANNING
β’ Product (direct)
β’ Marketing (planned)"]:::cPLN
CAPCOM --> CAPCOM_Crew
GUIDO --> GUIDO_Crew
FIDO --> FIDO_Crew
EECOM --> EECOM_Crew
INCO --> INCO_Crew
PAO --> PAO_Crew
SURGEON --> SURGEON_Crew
MPAD --> MPAD_Plan
%% GO/NO-GO POLL (Apollo board)
subgraph POLL["π³οΈ GO/NOβGO POLL"]
style POLL fill:#0f172a,stroke:#22c55e,color:#dcfce7
PollBoard["POLL BOARD
GUIDO β’ FIDO β’ EECOM β’ INCO β’ PAO β’ SURGEON β’ MPAD"]:::protocol
HoldRule["Any NOβGO β HOLD / SCRUB
All GO β PROCEED"]:::protocol
end
GUIDO --> PollBoard
FIDO --> PollBoard
EECOM --> PollBoard
INCO --> PollBoard
PAO --> PollBoard
SURGEON --> PollBoard
MPAD --> PollBoard
PollBoard --> FLIGHT
%% CAPCOM/FLIGHT voice relationship
CAPCOM <--> FLIGHT
end
%% =========================================================
%% WARSTWA 5: SURFACE
%% =========================================================
subgraph SURFACE ["πͺ THE SURFACE (Mission Data Vault β .org / Johnny Decimal)"]
style SURFACE fill:#1c1917,stroke:#f59e0b,color:#fff
JD_00["π 00-09 FLIGHT ADMIN
(Decisions/Runway)"]:::storage
JD_10["π 10-19 FLIGHT LOGS
(Console logs/Inbox)"]:::storage
JD_20["π 20-29 ACTIVE MISSIONS
(Sprints/WIP)"]:::storage
JD_30["π 30-39 PAO PAYLOAD
(Assets/Pipeline)"]:::storage
JD_40["π 40-49 PROCEDURES (KB)
(SOP/Playbooks)"]:::storage
AccessPolicy["π FLIGHT RULES
RO: JD_40
Append (SIM): JD_10 & JD_30
RW (FLIGHT): JD_00 & JD_20"]:::warn
end
ToolManager --> AccessPolicy
AccessPolicy --> JD_40
AccessPolicy --> JD_10
AccessPolicy --> JD_30
AccessPolicy --> JD_20
AccessPolicy --> JD_00
%% Context mapping (dotted)
EECOM -.- JD_20
EECOM -.- JD_40
INCO -.- JD_10
INCO -.- JD_40
PAO -.- JD_30
FIDO -.- JD_10
GUIDO -.- JD_40
MPAD -.- JD_00
SURGEON -.- JD_10
%% =========================================================
%% COLOR THE IMPORTANT LINKS (Apollo loops)
%% NOTE: linkStyle indices correspond to links in order of appearance.
%% We only color key paths (not every edge) to keep it clean.
%% =========================================================
%% Command loop (orange): MC_UI<->NextAPI, NextAPI->Gateway, Gateway->CAPCOM
linkStyle 3 stroke:#fb923c,stroke-width:3px;
linkStyle 4 stroke:#fb923c,stroke-width:3px;
linkStyle 5 stroke:#fb923c,stroke-width:3px;
linkStyle 6 stroke:#fb923c,stroke-width:3px;
%% Data loop (blue): SSE->MC_UI
linkStyle 7 stroke:#38bdf8,stroke-width:3px,stroke-dasharray: 6 4;
%% Voice loop (green): CAPCOM<->FLIGHT + console poll reports + PollBoard->FLIGHT
linkStyle 30 stroke:#22c55e,stroke-width:3px;
linkStyle 31 stroke:#22c55e,stroke-width:3px;
linkStyle 32 stroke:#22c55e,stroke-width:3px;
linkStyle 33 stroke:#22c55e,stroke-width:3px;
linkStyle 34 stroke:#22c55e,stroke-width:3px;
linkStyle 35 stroke:#22c55e,stroke-width:3px;
linkStyle 36 stroke:#22c55e,stroke-width:3px;
linkStyle 37 stroke:#22c55e,stroke-width:3px;
linkStyle 38 stroke:#22c55e,stroke-width:3px;
linkStyle 39 stroke:#22c55e,stroke-width:3px;