# k0k4/mundix360 architecture

> Architecture diagram of the GitHub repository k0k4/mundix360, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/k0k4/mundix360
- Repository: https://github.com/k0k4/mundix360

## Overview

Mundix Security 360 is an Ubuntu edge-firewall/UTM appliance managed through a React dashboard and FastAPI API. An operator authenticates, configures network and security controls, and monitors appliance status, alerts, and logs. The README also documents VPNs, content filtering, threat intelligence, SIEM ingestion and triage, backups, and an optional AI assistant. The map combines those documented capabilities with sampled routing, frontend, and service evidence; unsampled subsystem internals and their specific call wiring are not inferred.

Main entry points: [`dashboard/backend/app/main.py`](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/main.py) (FastAPI app), [`dashboard/frontend/src/pages`](https://github.com/k0k4/mundix360/tree/main/dashboard/frontend/src/pages) (Feature pages), [`dashboard/backend/app/routers/ai.py`](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/ai.py) (AI API), [`scripts/security/triage.py`](https://github.com/k0k4/mundix360/blob/main/scripts/security/triage.py) (SIEM triage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web dashboard"]
  node_spa["Dashboard UI<br/>[App.tsx]"]
  node_pages["Feature pages"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and identity"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_users[("User service<br/>[users.py]")]
  node_network_api["Network API<br/>[network.py]"]
  node_firewall_api["Firewall API<br/>[firewall.py]"]
end

subgraph group_network["Network controls"]
  node_network_services["Network services<br/>[network.py]"]
  node_firewall_service["Firewall manager<br/>[fwmanage.py]"]
  node_vpn_service["VPN services"]
  node_content_service["Content filtering<br/>[content.py]"]
end

subgraph group_security["Security monitoring"]
  node_threat_api["Threat API<br/>[threatintel.py]"]
  node_threat_service["Threat intelligence<br/>[threatintel.py]"]
  node_siem_ingest["SIEM ingestion<br/>[siem-ingest.py]"]
  node_siem_triage["SIEM triage<br/>[triage.py]"]
end

subgraph group_operations["Operations and AI"]
  node_backup_service["Backup and restore<br/>[backup.py]"]
  node_ai_api["AI API<br/>[ai.py]"]
  node_ai_agent["AI agent<br/>[agent.py]"]
end

node_operator(("Operator"))
node_clickhouse[("ClickHouse")]
node_openrouter{{"OpenRouter"}}
node_appliance{{"Appliance services"}}

node_operator -->|"uses"| node_spa
node_spa -->|"routes to"| node_pages
node_pages -->|"requests"| node_api_client
node_api_client -->|"HTTP requests"| node_api_app
node_api_app -->|"mounts"| node_auth
node_api_app -->|"mounts"| node_network_api
node_api_app -->|"mounts"| node_firewall_api
node_api_app -->|"mounts"| node_threat_api
node_auth -->|"manages sessions"| node_users
node_api_app -->|"starts monitors"| node_appliance
node_network_api --> node_network_services
node_firewall_api --> node_firewall_service
node_threat_api --> node_threat_service
node_network_services -->|"configures networking"| node_appliance
node_firewall_service -->|"applies nftables rules"| node_appliance
node_vpn_service -->|"manages VPNs"| node_appliance
node_content_service -->|"configures filtering"| node_appliance
node_threat_service -->|"applies threat blocks"| node_appliance
node_siem_ingest -->|"ingests events"| node_clickhouse
node_siem_triage -->|"triages events"| node_clickhouse
node_siem_triage -->|"blocks IPs"| node_appliance
node_api_app -->|"mounts backup API"| node_backup_service
node_pages -->|"chat requests"| node_ai_api
node_api_app -->|"mounts"| node_ai_api
node_ai_api --> node_ai_agent
node_ai_agent -.->|"sends optional AI requests"| node_openrouter

click node_spa "https://github.com/k0k4/mundix360/blob/main/dashboard/frontend/src/App.tsx"
click node_pages "https://github.com/k0k4/mundix360/tree/main/dashboard/frontend/src/pages"
click node_api_client "https://github.com/k0k4/mundix360/blob/main/dashboard/frontend/src/api.ts"
click node_api_app "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/main.py"
click node_auth "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/auth.py"
click node_users "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/users.py"
click node_network_api "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/network.py"
click node_firewall_api "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/firewall.py"
click node_network_services "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/network.py"
click node_firewall_service "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/fwmanage.py"
click node_vpn_service "https://github.com/k0k4/mundix360/tree/main/dashboard/backend/app/services/vpn"
click node_content_service "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/content.py"
click node_threat_api "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/threatintel.py"
click node_threat_service "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/threatintel.py"
click node_siem_ingest "https://github.com/k0k4/mundix360/blob/main/scripts/security/siem-ingest.py"
click node_siem_triage "https://github.com/k0k4/mundix360/blob/main/scripts/security/triage.py"
click node_backup_service "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/backup.py"
click node_ai_api "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/ai.py"
click node_ai_agent "https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/ai/agent.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_spa,node_pages,node_api_client toneBlue
class node_api_app,node_auth,node_users,node_network_api,node_firewall_api,node_clickhouse toneAmber
class node_network_services,node_firewall_service,node_vpn_service,node_content_service,node_openrouter toneMint
class node_threat_api,node_threat_service,node_siem_ingest,node_siem_triage toneRose
class node_backup_service,node_ai_api,node_ai_agent,node_operator,node_appliance toneIndigo
```

## Components

### Web dashboard

- [Dashboard UI](https://github.com/k0k4/mundix360/blob/main/dashboard/frontend/src/App.tsx): `dashboard/frontend/src/App.tsx`
- [Feature pages](https://github.com/k0k4/mundix360/tree/main/dashboard/frontend/src/pages): `dashboard/frontend/src/pages`
- [API client](https://github.com/k0k4/mundix360/blob/main/dashboard/frontend/src/api.ts): `dashboard/frontend/src/api.ts`

### API and identity

- [FastAPI app](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/main.py): `dashboard/backend/app/main.py`
- [Authentication](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/auth.py): `dashboard/backend/app/routers/auth.py`
- [User service](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/users.py): `dashboard/backend/app/services/users.py`
- [Network API](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/network.py): `dashboard/backend/app/routers/network.py`
- [Firewall API](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/firewall.py): `dashboard/backend/app/routers/firewall.py`

### Network controls

- [Network services](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/network.py): `dashboard/backend/app/services/network.py`
- [Firewall manager](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/fwmanage.py): `dashboard/backend/app/services/fwmanage.py`
- [VPN services](https://github.com/k0k4/mundix360/tree/main/dashboard/backend/app/services/vpn): `dashboard/backend/app/services/vpn`
- [Content filtering](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/content.py): `dashboard/backend/app/services/content.py`

### Security monitoring

- [Threat API](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/threatintel.py): `dashboard/backend/app/routers/threatintel.py`
- [Threat intelligence](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/threatintel.py): `dashboard/backend/app/services/threatintel.py`
- [SIEM ingestion](https://github.com/k0k4/mundix360/blob/main/scripts/security/siem-ingest.py): `scripts/security/siem-ingest.py`
- [SIEM triage](https://github.com/k0k4/mundix360/blob/main/scripts/security/triage.py): `scripts/security/triage.py`

### Operations and AI

- [Backup and restore](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/backup.py): `dashboard/backend/app/services/backup.py`
- [AI API](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/routers/ai.py): `dashboard/backend/app/routers/ai.py`
- [AI agent](https://github.com/k0k4/mundix360/blob/main/dashboard/backend/app/services/ai/agent.py): `dashboard/backend/app/services/ai/agent.py`

### Other components

- **Operator**
- **ClickHouse**
- **OpenRouter**
- **Appliance services**

## Connections

- Operator → Dashboard UI: uses
- Dashboard UI → Feature pages: routes to
- Feature pages → API client: requests
- API client → FastAPI app: HTTP requests
- FastAPI app → Authentication: mounts
- FastAPI app → Network API: mounts
- FastAPI app → Firewall API: mounts
- FastAPI app → Threat API: mounts
- Authentication → User service: manages sessions
- FastAPI app → Appliance services: starts monitors
- Network API → Network services
- Firewall API → Firewall manager
- Threat API → Threat intelligence
- Network services → Appliance services: configures networking
- Firewall manager → Appliance services: applies nftables rules
- VPN services → Appliance services: manages VPNs
- Content filtering → Appliance services: configures filtering
- Threat intelligence → Appliance services: applies threat blocks
- SIEM ingestion → ClickHouse: ingests events
- SIEM triage → ClickHouse: triages events
- SIEM triage → Appliance services: blocks IPs
- FastAPI app → Backup and restore: mounts backup API
- Feature pages → AI API: chat requests
- FastAPI app → AI API: mounts
- AI API → AI agent
- AI agent → OpenRouter: sends optional AI requests
