# puneethrajtr/cyber-security-project architecture

> Architecture diagram of the GitHub repository puneethrajtr/cyber-security-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/puneethrajtr/cyber-security-project
- Repository: https://github.com/puneethrajtr/cyber-security-project

## Overview

This Django/React application provides authenticated cybersecurity analysis: users sign in, choose a threat-analysis capability, and receive results in the web UI. Major branches cover URL classification, packet monitoring, IP intelligence, dark-web search, chatbot assistance, and dashboard analytics. The README documents endpoint capabilities and external integrations; sampled code confirms routing, API-client behavior, and selected backend operations. Several backend views and feature pages were not inspected, so their detailed internal calls are not inferred.

Main entry points: [`frontend/src/api/axios.js`](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/api/axios.js) (HTTP client), [`backend/monitoring/views.py`](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/views.py) (Monitoring API), [`backend/detection/views.py`](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/detection/views.py) (URL detection API), [`frontend/src/App.jsx`](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/App.jsx) (Page router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_router["Page router<br/>[App.jsx]"]
  node_authui["Sign in / register<br/>[SlidingAuth.jsx]"]
  node_client["HTTP client<br/>[axios.js]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_charts["Dashboard charts"]
end

subgraph group_identity["Identity and API"]
  node_authapi["Authentication API<br/>[views.py]"]
  node_userstore[("User accounts<br/>[models.py]")]
end

subgraph group_threat["Threat analysis"]
  node_urlui["URL detection UI<br/>[DetectEnhanced.jsx]"]
  node_urlapi["URL detection API<br/>[views.py]"]
  node_classifier["URL classifier<br/>[ml_model.py]"]
  node_threatstore[("Detection records<br/>[models.py]")]
end

subgraph group_intelligence["Monitoring and intelligence"]
  node_networkui["Network monitor UI<br/>[NetworkMonitor.jsx]"]
  node_monitorapi["Monitoring API<br/>[views.py]"]
  node_capture["Packet capture / IP analysis<br/>[utils.py]"]
  node_security["Security analysis<br/>[security_utils.py]"]
  node_packetstore[("Packet events<br/>[models.py]")]
  node_ipui["IP threat UI<br/>[IPThreat.jsx]"]
  node_darkui["Dark-web search UI<br/>[DarkWebSearch.jsx]"]
  node_darkapi["Dark-web search API<br/>[views.py]"]
  node_darklogic["Search and intelligence<br/>[utils.py]"]
  node_darkstore[("Dark-web records<br/>[models.py]")]
end

subgraph group_assist["Assistance and insights"]
  node_chatui["Cybersecurity chatbot UI<br/>[Chatbot.jsx]"]
  node_chatapi["Chatbot API<br/>[views.py]"]
  node_chatstore[("Chat history<br/>[models.py]")]
end

node_user(("Analyst"))
node_gemini["Google Gemini"]
node_virustotal["VirusTotal"]
node_ipservices["IP reputation services"]

node_user -->|"opens pages"| node_router
node_router -->|"routes to"| node_authui
node_authui -->|"submits credentials"| node_client
node_client -->|"calls authentication"| node_authapi
node_authapi -->|"authenticates users"| node_userstore
node_router -->|"routes to"| node_dashboard
node_dashboard -->|"requests dashboard data"| node_client
node_dashboard -->|"renders"| node_charts
node_user -->|"submits URL"| node_urlui
node_urlui -->|"sends analysis request"| node_client
node_client -->|"calls URL endpoint"| node_urlapi
node_urlapi -->|"classifies URL"| node_classifier
node_urlapi -.->|"records detections"| node_threatstore
node_urlapi -.->|"scans URL"| node_virustotal
node_user -->|"views traffic"| node_networkui
node_networkui -->|"requests packets"| node_client
node_client -->|"calls monitoring API"| node_monitorapi
node_monitorapi -->|"captures packets"| node_capture
node_monitorapi -->|"checks security"| node_security
node_monitorapi -->|"stores packet events"| node_packetstore
node_user -->|"submits IP"| node_ipui
node_ipui -->|"requests IP analysis"| node_client
node_client -->|"calls IP endpoint"| node_monitorapi
node_monitorapi -->|"analyzes IP"| node_capture
node_capture -.->|"checks reputation"| node_ipservices
node_user -->|"searches keywords"| node_darkui
node_darkui -->|"sends search"| node_client
node_client -->|"calls search endpoint"| node_darkapi
node_darkapi -.->|"performs search"| node_darklogic
node_darkapi -.->|"tracks mentions"| node_darkstore
node_user -->|"asks question"| node_chatui
node_chatui -->|"sends message"| node_client
node_client -->|"calls chatbot endpoint"| node_chatapi
node_chatapi -->|"generates response"| node_gemini
node_chatapi -->|"stores chat history"| node_chatstore

click node_router "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/SlidingAuth.jsx"
click node_client "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/api/axios.js"
click node_dashboard "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/Dashboard.jsx"
click node_charts "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/components/DashboardCharts.jsx"
click node_authapi "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/users/views.py"
click node_userstore "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/users/models.py"
click node_urlui "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/DetectEnhanced.jsx"
click node_urlapi "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/detection/views.py"
click node_classifier "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/detection/ml_model.py"
click node_threatstore "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/detection/models.py"
click node_networkui "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/NetworkMonitor.jsx"
click node_monitorapi "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/views.py"
click node_capture "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/utils.py"
click node_security "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/security_utils.py"
click node_packetstore "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/models.py"
click node_ipui "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/IPThreat.jsx"
click node_darkui "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/DarkWebSearch.jsx"
click node_darkapi "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/darkweb/views.py"
click node_darklogic "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/darkweb/utils.py"
click node_darkstore "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/darkweb/models.py"
click node_chatui "https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/Chatbot.jsx"
click node_chatapi "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/chatbot/views.py"
click node_chatstore "https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/chatbot/models.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_router,node_authui,node_client,node_dashboard,node_charts toneBlue
class node_authapi,node_userstore toneAmber
class node_urlui,node_urlapi,node_classifier,node_threatstore toneMint
class node_networkui,node_monitorapi,node_capture,node_security,node_packetstore,node_ipui,node_darkui,node_darkapi,node_darklogic,node_darkstore toneRose
class node_chatui,node_chatapi,node_chatstore,node_user,node_gemini,node_virustotal,node_ipservices toneIndigo
```

## Components

### Web application

- [Page router](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Sign in / register](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/SlidingAuth.jsx): `frontend/src/pages/SlidingAuth.jsx`
- [HTTP client](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/api/axios.js): `frontend/src/api/axios.js`
- [Dashboard](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Dashboard charts](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/components/DashboardCharts.jsx): `frontend/src/pages/components/DashboardCharts.jsx`

### Identity and API

- [Authentication API](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/users/views.py): `backend/users/views.py`
- [User accounts](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/users/models.py): `backend/users/models.py`

### Threat analysis

- [URL detection UI](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/DetectEnhanced.jsx): `frontend/src/pages/DetectEnhanced.jsx`
- [URL detection API](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/detection/views.py): `backend/detection/views.py`
- [URL classifier](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/detection/ml_model.py): `backend/detection/ml_model.py`
- [Detection records](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/detection/models.py): `backend/detection/models.py`

### Monitoring and intelligence

- [Network monitor UI](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/NetworkMonitor.jsx): `frontend/src/pages/NetworkMonitor.jsx`
- [Monitoring API](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/views.py): `backend/monitoring/views.py`
- [Packet capture / IP analysis](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/utils.py): `backend/monitoring/utils.py`
- [Security analysis](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/security_utils.py): `backend/monitoring/security_utils.py`
- [Packet events](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/monitoring/models.py): `backend/monitoring/models.py`
- [IP threat UI](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/IPThreat.jsx): `frontend/src/pages/IPThreat.jsx`
- [Dark-web search UI](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/DarkWebSearch.jsx): `frontend/src/pages/DarkWebSearch.jsx`
- [Dark-web search API](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/darkweb/views.py): `backend/darkweb/views.py`
- [Search and intelligence](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/darkweb/utils.py): `backend/darkweb/utils.py`
- [Dark-web records](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/darkweb/models.py): `backend/darkweb/models.py`

### Assistance and insights

- [Cybersecurity chatbot UI](https://github.com/puneethrajtr/cyber-security-project/blob/main/frontend/src/pages/Chatbot.jsx): `frontend/src/pages/Chatbot.jsx`
- [Chatbot API](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/chatbot/views.py): `backend/chatbot/views.py`
- [Chat history](https://github.com/puneethrajtr/cyber-security-project/blob/main/backend/chatbot/models.py): `backend/chatbot/models.py`

### Other components

- **Analyst**
- **Google Gemini**
- **VirusTotal**
- **IP reputation services**

## Connections

- Analyst → Page router: opens pages (evidence: `frontend/src/App.jsx`)
- Page router → Sign in / register: routes to (evidence: `frontend/src/App.jsx`)
- Sign in / register → HTTP client: submits credentials (evidence: `frontend/src/pages/SlidingAuth.jsx`)
- HTTP client → Authentication API: calls authentication (evidence: `README.md`)
- Authentication API → User accounts: authenticates users (evidence: `backend/users/views.py`)
- Page router → Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Dashboard → HTTP client: requests dashboard data (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard → Dashboard charts: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Analyst → URL detection UI: submits URL (evidence: `README.md`)
- URL detection UI → HTTP client: sends analysis request (evidence: `frontend/src/pages/DetectEnhanced.jsx`)
- HTTP client → URL detection API: calls URL endpoint (evidence: `README.md`)
- URL detection API → URL classifier: classifies URL (evidence: `README.md`)
- URL detection API → Detection records: records detections
- URL detection API → VirusTotal: scans URL (evidence: `README.md`)
- Analyst → Network monitor UI: views traffic (evidence: `README.md`)
- Network monitor UI → HTTP client: requests packets (evidence: `README.md`)
- HTTP client → Monitoring API: calls monitoring API (evidence: `README.md`)
- Monitoring API → Packet capture / IP analysis: captures packets (evidence: `backend/monitoring/views.py`)
- Monitoring API → Security analysis: checks security (evidence: `backend/monitoring/views.py`)
- Monitoring API → Packet events: stores packet events (evidence: `backend/monitoring/views.py`)
- Analyst → IP threat UI: submits IP (evidence: `README.md`)
- IP threat UI → HTTP client: requests IP analysis (evidence: `frontend/src/pages/IPThreat.jsx`)
- HTTP client → Monitoring API: calls IP endpoint (evidence: `README.md`)
- Monitoring API → Packet capture / IP analysis: analyzes IP (evidence: `backend/monitoring/views.py`)
- Packet capture / IP analysis → IP reputation services: checks reputation (evidence: `README.md`)
- Analyst → Dark-web search UI: searches keywords (evidence: `README.md`)
- Dark-web search UI → HTTP client: sends search (evidence: `frontend/src/pages/DarkWebSearch.jsx`)
- HTTP client → Dark-web search API: calls search endpoint (evidence: `README.md`)
- Dark-web search API → Search and intelligence: performs search
- Dark-web search API → Dark-web records: tracks mentions
- Analyst → Cybersecurity chatbot UI: asks question (evidence: `README.md`)
- Cybersecurity chatbot UI → HTTP client: sends message (evidence: `frontend/src/pages/Chatbot.jsx`)
- HTTP client → Chatbot API: calls chatbot endpoint (evidence: `README.md`)
- Chatbot API → Google Gemini: generates response (evidence: `README.md`)
- Chatbot API → Chat history: stores chat history (evidence: `backend/chatbot/views.py`)
