# kpatel3360-eng/aegisnet architecture

> Architecture diagram of the GitHub repository kpatel3360-eng/aegisnet, 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/kpatel3360-eng/aegisnet
- Repository: https://github.com/kpatel3360-eng/aegisnet

## Overview

AegisNet is a network-security monitoring platform: users view a dashboard or upload compatible flow data for binary attack detection and multiclass threat classification, alongside a separate one-minute traffic forecast. The graph includes the documented analytics, health, and model-information capabilities. Sampled code confirms CSV validation, model loading, preprocessing, and forecasting; unsampled route and analytics internals are represented only at their exact tree paths, with uncertain calls omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/App.jsx) (Application Shell), [`backend/app.py`](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/app.py) (Flask App), [`backend/routes/prediction.py`](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/prediction.py) (Prediction API), [`backend/services/analytics_service.py`](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/analytics_service.py) (Flow Analytics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Command Center"]
  node_app_ui["Application Shell<br/>[App.jsx]"]
  node_dashboard_ui["Dashboard<br/>[Dashboard.jsx]"]
  node_threat_ui["Threat View"]
  node_traffic_ui["Traffic View"]
  node_analytics_ui["Analytics View<br/>[Analytics.jsx]"]
  node_about_ui["About View<br/>[About.jsx]"]
  node_upload_ui["CSV Upload"]
  node_frontend_api["API Client<br/>[api.js]"]
  node_frontend_server["Frontend Server<br/>[server.js]"]
end

subgraph group_api["Backend API"]
  node_backend_app["Flask App<br/>[app.py]"]
  node_health_route["Health API<br/>[health.py]"]
  node_dashboard_route["Dashboard API<br/>[dashboard.py]"]
end

subgraph group_detection["Threat Analysis"]
  node_prediction_route["Prediction API<br/>[prediction.py]"]
  node_validation["CSV Validation<br/>[validation.py]"]
  node_analytics["Flow Analytics"]
  node_preprocessing["Feature Preparation"]
  node_models["Model Runtime<br/>[model_service.py]"]
end

subgraph group_forecast["Traffic Forecasting"]
  node_traffic_route["Traffic API<br/>[traffic.py]"]
  node_traffic_service["Forecast Service<br/>[traffic_service.py]"]
  node_timeseries[("Traffic History")]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_app_ui
node_app_ui -->|"fetches summary"| node_frontend_api
node_app_ui -->|"renders"| node_dashboard_ui
node_app_ui -->|"renders"| node_threat_ui
node_app_ui -->|"renders"| node_traffic_ui
node_app_ui -->|"renders"| node_analytics_ui
node_app_ui -->|"renders"| node_about_ui
node_app_ui -->|"opens"| node_upload_ui
node_upload_ui -->|"uploads CSV"| node_frontend_api
node_frontend_api -->|"sends API request"| node_frontend_server
node_frontend_server -->|"proxies API"| node_backend_app
node_backend_app -->|"registers routes"| node_health_route
node_backend_app -->|"registers routes"| node_dashboard_route
node_backend_app -->|"registers routes"| node_prediction_route
node_backend_app -->|"registers routes"| node_traffic_route
node_prediction_route -->|"validates upload"| node_validation
node_prediction_route -->|"analyzes flows"| node_analytics
node_analytics -->|"prepares features"| node_preprocessing
node_analytics -->|"uses classifiers"| node_models
node_traffic_route -->|"requests forecast"| node_traffic_service
node_traffic_service -->|"reads history"| node_timeseries
node_traffic_service -->|"uses forecaster"| node_models

click node_app_ui "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/App.jsx"
click node_dashboard_ui "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/Dashboard.jsx"
click node_threat_ui "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/ThreatDetection.jsx"
click node_traffic_ui "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/TrafficPrediction.jsx"
click node_analytics_ui "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/Analytics.jsx"
click node_about_ui "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/About.jsx"
click node_upload_ui "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/components/FileUploadModal.jsx"
click node_frontend_api "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/services/api.js"
click node_frontend_server "https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/server.js"
click node_backend_app "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/app.py"
click node_health_route "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/health.py"
click node_dashboard_route "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/dashboard.py"
click node_prediction_route "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/prediction.py"
click node_traffic_route "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/traffic.py"
click node_validation "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/utils/validation.py"
click node_analytics "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/analytics_service.py"
click node_preprocessing "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/preprocessing_service.py"
click node_models "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/model_service.py"
click node_traffic_service "https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/traffic_service.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_app_ui,node_dashboard_ui,node_threat_ui,node_traffic_ui,node_analytics_ui,node_about_ui,node_upload_ui,node_frontend_api,node_frontend_server toneBlue
class node_backend_app,node_health_route,node_dashboard_route toneAmber
class node_prediction_route,node_validation,node_analytics,node_preprocessing,node_models toneMint
class node_traffic_route,node_traffic_service,node_timeseries toneRose
class node_operator toneIndigo
```

## Components

### Command Center

- [Application Shell](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Dashboard](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Threat View](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/ThreatDetection.jsx): `frontend/src/pages/ThreatDetection.jsx`
- [Traffic View](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/TrafficPrediction.jsx): `frontend/src/pages/TrafficPrediction.jsx`
- [Analytics View](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/Analytics.jsx): `frontend/src/pages/Analytics.jsx`
- [About View](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/pages/About.jsx): `frontend/src/pages/About.jsx`
- [CSV Upload](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/components/FileUploadModal.jsx): `frontend/src/components/FileUploadModal.jsx`
- [API Client](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Frontend Server](https://github.com/kpatel3360-eng/aegisnet/blob/main/frontend/server.js): `frontend/server.js`

### Backend API

- [Flask App](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/app.py): `backend/app.py`
- [Health API](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/health.py): `backend/routes/health.py`
- [Dashboard API](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/dashboard.py): `backend/routes/dashboard.py`

### Threat Analysis

- [Prediction API](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/prediction.py): `backend/routes/prediction.py`
- [CSV Validation](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/utils/validation.py): `backend/utils/validation.py`
- [Flow Analytics](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/analytics_service.py): `backend/services/analytics_service.py`
- [Feature Preparation](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/preprocessing_service.py): `backend/services/preprocessing_service.py`
- [Model Runtime](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/model_service.py): `backend/services/model_service.py`

### Traffic Forecasting

- [Traffic API](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/routes/traffic.py): `backend/routes/traffic.py`
- [Forecast Service](https://github.com/kpatel3360-eng/aegisnet/blob/main/backend/services/traffic_service.py): `backend/services/traffic_service.py`
- **Traffic History**

### Other components

- **Operator**

## Connections

- Operator → Application Shell: uses
- Application Shell → API Client: fetches summary
- Application Shell → Dashboard: renders
- Application Shell → Threat View: renders
- Application Shell → Traffic View: renders
- Application Shell → Analytics View: renders
- Application Shell → About View: renders
- Application Shell → CSV Upload: opens
- CSV Upload → API Client: uploads CSV
- API Client → Frontend Server: sends API request
- Frontend Server → Flask App: proxies API
- Flask App → Health API: registers routes
- Flask App → Dashboard API: registers routes
- Flask App → Prediction API: registers routes
- Flask App → Traffic API: registers routes
- Prediction API → CSV Validation: validates upload
- Prediction API → Flow Analytics: analyzes flows
- Flow Analytics → Feature Preparation: prepares features
- Flow Analytics → Model Runtime: uses classifiers
- Traffic API → Forecast Service: requests forecast
- Forecast Service → Traffic History: reads history
- Forecast Service → Model Runtime: uses forecaster
