# apiyush-12/netpilot architecture

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

- Interactive diagram: https://gitdiagram.com/apiyush-12/netpilot
- Repository: https://github.com/apiyush-12/netpilot

## Overview

NetPilot is a local network-operations and failover console: operators inspect lab status, events and incidents, then authorize lab, service, route or managed-process actions. The React console also exposes monitoring, recovery, audit, AWS operations, cloud-event exploration and customizable settings. FastAPI is the browser-facing control layer, with separate core and cloud modules; the repository also contains agent and AWS Lambda runtime components. Source excerpts establish the console/API and API/core relationships, but do not establish all agent or AWS wiring.

Main entry points: [`dashboard/src/App.jsx`](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/App.jsx) (Console App), [`dashboard/src/pages/Operations.jsx`](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Operations.jsx) (Operations View), [`dashboard/src/pages/CloudEvents.jsx`](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/CloudEvents.jsx) (Cloud Events View), [`backend/app.py`](https://github.com/apiyush-12/netpilot/blob/main/backend/app.py) (FastAPI Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Operator Console"]
  node_dashboard["Console App<br/>[App.jsx]"]
  node_navigation["Navigation Chrome<br/>[Chrome.jsx]"]
  node_confirmation["Action Confirmation<br/>[ConfirmDialog.jsx]"]
  node_operations["Operations View<br/>[Operations.jsx]"]
  node_monitoring["Monitoring View<br/>[Monitoring.jsx]"]
  node_recovery["Recovery View<br/>[Recovery.jsx]"]
  node_events["Event Logs View<br/>[Events.jsx]"]
  node_cloudview["AWS Operations View<br/>[Cloud.jsx]"]
  node_cloudevents["Cloud Events View<br/>[CloudEvents.jsx]"]
  node_audit["Audit View<br/>[Audit.jsx]"]
  node_settingsview["Settings View<br/>[Settings.jsx]"]
  node_eventtable["Event Table<br/>[EventTable.jsx]"]
  node_topology["Topology Display<br/>[Topology.jsx]"]
  node_format["Display Formatting<br/>[format.js]"]
  node_settings["Preference Storage<br/>[settings.js]"]
  node_api_client["API Client<br/>[api.js]"]
end

subgraph group_control["Local Control Plane"]
  node_backend_api["FastAPI Service<br/>[app.py]"]
  node_core["Lab and Process Control<br/>[core.py]"]
  node_cloud_backend["Cloud Operations<br/>[cloud.py]"]
end

subgraph group_agents["Network Agents"]
  node_controller["NetPilot Controller<br/>[netpilot_v4.py]"]
  node_log_analyzer["Log Analysis<br/>[analyze_logs.py]"]
  node_forwarder["AWS Log Forwarder<br/>[aws_forwarder.py]"]
end

subgraph group_cloud["Cloud Event Processing"]
  node_lambda_processor["Event Processor<br/>[lambda_function.py]"]
  node_aws_services[("AWS Services")]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_navigation
node_dashboard -->|"renders"| node_confirmation
node_dashboard -->|"selects view"| node_operations
node_dashboard -->|"selects view"| node_monitoring
node_dashboard -->|"selects view"| node_recovery
node_dashboard -->|"selects view"| node_events
node_dashboard -->|"selects view"| node_cloudview
node_dashboard -->|"selects view"| node_cloudevents
node_dashboard -->|"selects view"| node_audit
node_dashboard -->|"selects view"| node_settingsview
node_dashboard -->|"requests data"| node_api_client
node_dashboard -->|"loads preferences"| node_settings
node_api_client -->|"calls API"| node_backend_api
node_backend_api -->|"dispatches control"| node_core
node_backend_api -->|"queries cloud"| node_cloud_backend
node_operations -->|"renders"| node_topology
node_operations -->|"renders"| node_eventtable
node_monitoring -->|"renders"| node_topology
node_events -->|"renders"| node_eventtable
node_cloudevents -->|"fetches events"| node_api_client
node_cloudevents -->|"formats records"| node_format
node_eventtable -->|"formats rows"| node_format
node_format -->|"reads preferences"| node_settings
node_settingsview -->|"updates preferences"| node_settings
node_core -.-> node_controller
node_forwarder -.-> node_lambda_processor
node_lambda_processor -.-> node_aws_services

click node_dashboard "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/App.jsx"
click node_navigation "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/components/Chrome.jsx"
click node_confirmation "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/components/ConfirmDialog.jsx"
click node_operations "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Operations.jsx"
click node_monitoring "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Monitoring.jsx"
click node_recovery "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Recovery.jsx"
click node_events "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Events.jsx"
click node_cloudview "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Cloud.jsx"
click node_cloudevents "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/CloudEvents.jsx"
click node_audit "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Audit.jsx"
click node_settingsview "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Settings.jsx"
click node_eventtable "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/components/EventTable.jsx"
click node_topology "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/components/Topology.jsx"
click node_format "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/lib/format.js"
click node_settings "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/lib/settings.js"
click node_api_client "https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/lib/api.js"
click node_backend_api "https://github.com/apiyush-12/netpilot/blob/main/backend/app.py"
click node_core "https://github.com/apiyush-12/netpilot/blob/main/backend/core.py"
click node_cloud_backend "https://github.com/apiyush-12/netpilot/blob/main/backend/cloud.py"
click node_controller "https://github.com/apiyush-12/netpilot/blob/main/agent/netpilot_v4.py"
click node_log_analyzer "https://github.com/apiyush-12/netpilot/blob/main/agent/analyze_logs.py"
click node_forwarder "https://github.com/apiyush-12/netpilot/blob/main/agent/aws_forwarder.py"
click node_lambda_processor "https://github.com/apiyush-12/netpilot/blob/main/aws/lambda/lambda_function.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_dashboard,node_navigation,node_confirmation,node_operations,node_monitoring,node_recovery,node_events,node_cloudview,node_cloudevents,node_audit,node_settingsview,node_eventtable,node_topology,node_format,node_settings,node_api_client toneBlue
class node_backend_api,node_core,node_cloud_backend toneAmber
class node_controller,node_log_analyzer,node_forwarder toneMint
class node_lambda_processor,node_aws_services toneRose
class node_operator toneIndigo
```

## Components

### Operator Console

- [Console App](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/App.jsx): `dashboard/src/App.jsx`
- [Navigation Chrome](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/components/Chrome.jsx): `dashboard/src/components/Chrome.jsx`
- [Action Confirmation](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/components/ConfirmDialog.jsx): `dashboard/src/components/ConfirmDialog.jsx`
- [Operations View](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Operations.jsx): `dashboard/src/pages/Operations.jsx`
- [Monitoring View](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Monitoring.jsx): `dashboard/src/pages/Monitoring.jsx`
- [Recovery View](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Recovery.jsx): `dashboard/src/pages/Recovery.jsx`
- [Event Logs View](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Events.jsx): `dashboard/src/pages/Events.jsx`
- [AWS Operations View](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Cloud.jsx): `dashboard/src/pages/Cloud.jsx`
- [Cloud Events View](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/CloudEvents.jsx): `dashboard/src/pages/CloudEvents.jsx`
- [Audit View](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Audit.jsx): `dashboard/src/pages/Audit.jsx`
- [Settings View](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/pages/Settings.jsx): `dashboard/src/pages/Settings.jsx`
- [Event Table](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/components/EventTable.jsx): `dashboard/src/components/EventTable.jsx`
- [Topology Display](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/components/Topology.jsx): `dashboard/src/components/Topology.jsx`
- [Display Formatting](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/lib/format.js): `dashboard/src/lib/format.js`
- [Preference Storage](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/lib/settings.js): `dashboard/src/lib/settings.js`
- [API Client](https://github.com/apiyush-12/netpilot/blob/main/dashboard/src/lib/api.js): `dashboard/src/lib/api.js`

### Local Control Plane

- [FastAPI Service](https://github.com/apiyush-12/netpilot/blob/main/backend/app.py): `backend/app.py`
- [Lab and Process Control](https://github.com/apiyush-12/netpilot/blob/main/backend/core.py): `backend/core.py`
- [Cloud Operations](https://github.com/apiyush-12/netpilot/blob/main/backend/cloud.py): `backend/cloud.py`

### Network Agents

- [NetPilot Controller](https://github.com/apiyush-12/netpilot/blob/main/agent/netpilot_v4.py): `agent/netpilot_v4.py`
- [Log Analysis](https://github.com/apiyush-12/netpilot/blob/main/agent/analyze_logs.py): `agent/analyze_logs.py`
- [AWS Log Forwarder](https://github.com/apiyush-12/netpilot/blob/main/agent/aws_forwarder.py): `agent/aws_forwarder.py`

### Cloud Event Processing

- [Event Processor](https://github.com/apiyush-12/netpilot/blob/main/aws/lambda/lambda_function.py): `aws/lambda/lambda_function.py`
- **AWS Services**

### Other components

- **Operator**

## Connections

- Operator → Console App: uses (evidence: `dashboard/src/App.jsx`)
- Console App → Navigation Chrome: renders (evidence: `dashboard/src/App.jsx`)
- Console App → Action Confirmation: renders (evidence: `dashboard/src/App.jsx`)
- Console App → Operations View: selects view (evidence: `dashboard/src/App.jsx`)
- Console App → Monitoring View: selects view (evidence: `dashboard/src/App.jsx`)
- Console App → Recovery View: selects view (evidence: `dashboard/src/App.jsx`)
- Console App → Event Logs View: selects view (evidence: `dashboard/src/App.jsx`)
- Console App → AWS Operations View: selects view (evidence: `dashboard/src/App.jsx`)
- Console App → Cloud Events View: selects view (evidence: `dashboard/src/App.jsx`)
- Console App → Audit View: selects view (evidence: `dashboard/src/App.jsx`)
- Console App → Settings View: selects view (evidence: `dashboard/src/App.jsx`)
- Console App → API Client: requests data (evidence: `dashboard/src/App.jsx`)
- Console App → Preference Storage: loads preferences (evidence: `dashboard/src/App.jsx`)
- API Client → FastAPI Service: calls API (evidence: `backend/app.py`)
- FastAPI Service → Lab and Process Control: dispatches control (evidence: `backend/app.py`)
- FastAPI Service → Cloud Operations: queries cloud (evidence: `backend/app.py`)
- Operations View → Topology Display: renders (evidence: `dashboard/src/pages/Operations.jsx`)
- Operations View → Event Table: renders (evidence: `dashboard/src/pages/Operations.jsx`)
- Monitoring View → Topology Display: renders (evidence: `dashboard/src/pages/Monitoring.jsx`)
- Event Logs View → Event Table: renders (evidence: `dashboard/src/pages/Events.jsx`)
- Cloud Events View → API Client: fetches events (evidence: `dashboard/src/pages/CloudEvents.jsx`)
- Cloud Events View → Display Formatting: formats records (evidence: `dashboard/src/pages/CloudEvents.jsx`)
- Event Table → Display Formatting: formats rows (evidence: `dashboard/src/components/EventTable.jsx`)
- Display Formatting → Preference Storage: reads preferences (evidence: `dashboard/src/lib/format.js`)
- Settings View → Preference Storage: updates preferences (evidence: `dashboard/src/pages/Settings.jsx`)
- Lab and Process Control → NetPilot Controller
- AWS Log Forwarder → Event Processor
- Event Processor → AWS Services
