# lakshman-26/omnisec-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/lakshman-26/omnisec-analyzer
- Repository: https://github.com/lakshman-26/omnisec-analyzer

## Overview

CyberSentinel AI is an educational security-testing dashboard, not a general-purpose scanner: its documented OWASP tests are restricted to registered local labs. Users enter through the dashboard, choose a module, submit a test through the API client, and review results, history, or reports. The graph preserves the documented geolocation, SQL, OWASP, rate-limit, URL-analysis, settings, and reporting capabilities. Some backend routes and services were not sampled; uncertain implementation links are omitted rather than inferred.

Main entry points: [`server/src/app.ts`](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/app.ts) (Express API), [`client/src/App.tsx`](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/App.tsx) (App Navigation), [`client/src/services/api.ts`](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/services/api.ts) (API Client), [`server/src/database/db.ts`](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/database/db.ts) (SQLite Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard UI"]
  node_app["App Navigation<br/>[App.tsx]"]
  node_overview["Dashboard<br/>[Overview.tsx]"]
  node_geo_ui["Geolocation<br/>[Geolocation.tsx]"]
  node_sql_ui["SQL Tester<br/>[SqlInjection.tsx]"]
  node_owasp_ui["OWASP Assessment"]
  node_rate_ui["Rate Limit Tester<br/>[RateLimiter.tsx]"]
  node_history_ui["Scan History<br/>[ScanHistory.tsx]"]
  node_reports_ui["Report Viewer<br/>[ReportViewer.tsx]"]
  node_settings_ui["Settings<br/>[Settings.tsx]"]
end

subgraph group_analysis["Security Analysis"]
  node_url_analysis["URL Safety Analysis<br/>[urlAnalyzer.ts]"]
  node_ip_service["IP Lookup<br/>[ipService.ts]"]
  node_sql_engine["SQL Scan Engine<br/>[sqlScanner.ts]"]
  node_realtime_engine["Realtime Scanner<br/>[realtimeScanner.ts]"]
  node_target_registry["Lab Target Registry<br/>[targetRegistry.ts]"]
  node_lab_app["Vulnerable and Secure Labs<br/>[lab.ts]"]
  node_rate_engine["Rate Limit Tester<br/>[rateLimitTester.ts]"]
  node_report_builder["Report Generator<br/>[reportGenerator.ts]"]
end

subgraph group_api["API and Services"]
  node_api_client["API Client<br/>[api.ts]"]
  node_express["Express API<br/>[app.ts]"]
  node_geo_route["Geolocation Route<br/>[geolocation.ts]"]
  node_sql_route["SQL Scan Route<br/>[sqlInjection.ts]"]
  node_owasp_route["OWASP Scan Route<br/>[owasp.ts]"]
  node_realtime_route["Realtime Scan Route<br/>[realtimeScans.ts]"]
  node_rate_route["Rate Limit Route<br/>[rateLimit.ts]"]
  node_url_route["URL Analyzer Route<br/>[urlAnalyzer.ts]"]
  node_scans_route["History Routes<br/>[scans.ts]"]
  node_reports_route["Report Routes<br/>[reports.ts]"]
  node_settings_route["Settings Route<br/>[settings.ts]"]
end

subgraph group_state["Persistence"]
  node_database[("SQLite Store<br/>[db.ts]")]
end

node_user(("Student"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_overview
node_app -->|"renders"| node_geo_ui
node_app -->|"renders"| node_sql_ui
node_app -->|"renders"| node_owasp_ui
node_app -->|"renders"| node_rate_ui
node_app -->|"renders"| node_history_ui
node_app -->|"renders"| node_reports_ui
node_app -->|"renders"| node_settings_ui
node_owasp_ui -->|"analyzes locally"| node_url_analysis
node_overview -->|"requests data"| node_api_client
node_geo_ui -->|"requests lookup"| node_api_client
node_sql_ui -->|"submits scans"| node_api_client
node_owasp_ui -->|"submits scans"| node_api_client
node_rate_ui -->|"submits test"| node_api_client
node_history_ui -->|"requests history"| node_api_client
node_reports_ui -->|"gets report URL"| node_api_client
node_settings_ui -->|"requests settings"| node_api_client
node_api_client -->|"HTTP requests"| node_express
node_express -->|"routes requests"| node_geo_route
node_express -->|"routes requests"| node_sql_route
node_express -->|"routes requests"| node_owasp_route
node_express -->|"routes requests"| node_realtime_route
node_express -->|"routes requests"| node_rate_route
node_express -->|"routes requests"| node_url_route
node_express -->|"routes requests"| node_scans_route
node_express -->|"routes requests"| node_reports_route
node_express -->|"routes requests"| node_settings_route
node_geo_route -->|"calls lookup"| node_ip_service
node_sql_route -->|"calls scanner"| node_sql_engine
node_rate_route -->|"calls tester"| node_rate_engine
node_realtime_route -->|"starts scans"| node_realtime_engine
node_realtime_route -->|"checks targets"| node_target_registry
node_realtime_engine -->|"uses registry"| node_target_registry
node_realtime_engine -.->|"tests lab"| node_lab_app
node_geo_route -.->|"persists results"| node_database
node_sql_route -.->|"persists scans"| node_database
node_realtime_route -->|"stores scan data"| node_database
node_realtime_engine -->|"records scan data"| node_database
node_target_registry -->|"reads registry"| node_database
node_scans_route -->|"reads history"| node_database
node_settings_route -->|"reads settings"| node_database
node_reports_route -.->|"builds reports"| node_report_builder
node_reports_route -.->|"reads scan data"| node_database

click node_app "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/App.tsx"
click node_overview "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/Overview.tsx"
click node_geo_ui "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/Geolocation.tsx"
click node_sql_ui "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/SqlInjection.tsx"
click node_owasp_ui "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/OwaspAssessment.tsx"
click node_rate_ui "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/RateLimiter.tsx"
click node_history_ui "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/ScanHistory.tsx"
click node_reports_ui "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/ReportViewer.tsx"
click node_settings_ui "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/Settings.tsx"
click node_url_analysis "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/services/urlAnalyzer.ts"
click node_api_client "https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/services/api.ts"
click node_express "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/app.ts"
click node_geo_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/geolocation.ts"
click node_ip_service "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/ipService.ts"
click node_sql_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/sqlInjection.ts"
click node_sql_engine "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/sqlScanner.ts"
click node_owasp_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/owasp.ts"
click node_realtime_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/realtimeScans.ts"
click node_realtime_engine "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/realtimeScanner.ts"
click node_target_registry "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/targetRegistry.ts"
click node_lab_app "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/lab.ts"
click node_rate_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/rateLimit.ts"
click node_rate_engine "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/rateLimitTester.ts"
click node_url_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/urlAnalyzer.ts"
click node_scans_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/scans.ts"
click node_reports_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/reports.ts"
click node_report_builder "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/reportGenerator.ts"
click node_settings_route "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/settings.ts"
click node_database "https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/database/db.ts"

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,node_overview,node_geo_ui,node_sql_ui,node_owasp_ui,node_rate_ui,node_history_ui,node_reports_ui,node_settings_ui toneBlue
class node_url_analysis,node_ip_service,node_sql_engine,node_realtime_engine,node_target_registry,node_lab_app,node_rate_engine,node_report_builder toneAmber
class node_api_client,node_express,node_geo_route,node_sql_route,node_owasp_route,node_realtime_route,node_rate_route,node_url_route,node_scans_route,node_reports_route,node_settings_route toneMint
class node_database toneRose
class node_user toneIndigo
```

## Components

### Dashboard UI

- [App Navigation](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Dashboard](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/Overview.tsx): `client/src/components/pages/Overview.tsx`
- [Geolocation](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/Geolocation.tsx): `client/src/components/pages/Geolocation.tsx`
- [SQL Tester](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/SqlInjection.tsx): `client/src/components/pages/SqlInjection.tsx`
- [OWASP Assessment](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/OwaspAssessment.tsx): `client/src/components/pages/OwaspAssessment.tsx`
- [Rate Limit Tester](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/RateLimiter.tsx): `client/src/components/pages/RateLimiter.tsx`
- [Scan History](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/ScanHistory.tsx): `client/src/components/pages/ScanHistory.tsx`
- [Report Viewer](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/ReportViewer.tsx): `client/src/components/pages/ReportViewer.tsx`
- [Settings](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/components/pages/Settings.tsx): `client/src/components/pages/Settings.tsx`

### Security Analysis

- [URL Safety Analysis](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/services/urlAnalyzer.ts): `client/src/services/urlAnalyzer.ts`
- [IP Lookup](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/ipService.ts): `server/src/services/ipService.ts`
- [SQL Scan Engine](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/sqlScanner.ts): `server/src/services/sqlScanner.ts`
- [Realtime Scanner](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/realtimeScanner.ts): `server/src/services/realtimeScanner.ts`
- [Lab Target Registry](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/targetRegistry.ts): `server/src/services/targetRegistry.ts`
- [Vulnerable and Secure Labs](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/lab.ts): `server/src/routes/lab.ts`
- [Rate Limit Tester](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/rateLimitTester.ts): `server/src/services/rateLimitTester.ts`
- [Report Generator](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/services/reportGenerator.ts): `server/src/services/reportGenerator.ts`

### API and Services

- [API Client](https://github.com/lakshman-26/omnisec-analyzer/blob/main/client/src/services/api.ts): `client/src/services/api.ts`
- [Express API](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/app.ts): `server/src/app.ts`
- [Geolocation Route](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/geolocation.ts): `server/src/routes/geolocation.ts`
- [SQL Scan Route](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/sqlInjection.ts): `server/src/routes/sqlInjection.ts`
- [OWASP Scan Route](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/owasp.ts): `server/src/routes/owasp.ts`
- [Realtime Scan Route](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/realtimeScans.ts): `server/src/routes/realtimeScans.ts`
- [Rate Limit Route](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/rateLimit.ts): `server/src/routes/rateLimit.ts`
- [URL Analyzer Route](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/urlAnalyzer.ts): `server/src/routes/urlAnalyzer.ts`
- [History Routes](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/scans.ts): `server/src/routes/scans.ts`
- [Report Routes](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/reports.ts): `server/src/routes/reports.ts`
- [Settings Route](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/routes/settings.ts): `server/src/routes/settings.ts`

### Persistence

- [SQLite Store](https://github.com/lakshman-26/omnisec-analyzer/blob/main/server/src/database/db.ts): `server/src/database/db.ts`

### Other components

- **Student**

## Connections

- Student → App Navigation: uses (evidence: `README.md`)
- App Navigation → Dashboard: renders (evidence: `client/src/App.tsx`)
- App Navigation → Geolocation: renders (evidence: `client/src/App.tsx`)
- App Navigation → SQL Tester: renders (evidence: `client/src/App.tsx`)
- App Navigation → OWASP Assessment: renders (evidence: `client/src/App.tsx`)
- App Navigation → Rate Limit Tester: renders (evidence: `client/src/App.tsx`)
- App Navigation → Scan History: renders (evidence: `client/src/App.tsx`)
- App Navigation → Report Viewer: renders (evidence: `client/src/App.tsx`)
- App Navigation → Settings: renders (evidence: `client/src/App.tsx`)
- OWASP Assessment → URL Safety Analysis: analyzes locally (evidence: `client/src/components/pages/OwaspAssessment.tsx`)
- Dashboard → API Client: requests data (evidence: `client/src/components/pages/Overview.tsx`)
- Geolocation → API Client: requests lookup (evidence: `client/src/components/pages/Geolocation.tsx`)
- SQL Tester → API Client: submits scans (evidence: `client/src/services/api.ts`)
- OWASP Assessment → API Client: submits scans (evidence: `client/src/components/pages/OwaspAssessment.tsx`)
- Rate Limit Tester → API Client: submits test (evidence: `client/src/services/api.ts`)
- Scan History → API Client: requests history (evidence: `client/src/services/api.ts`)
- Report Viewer → API Client: gets report URL (evidence: `client/src/services/api.ts`)
- Settings → API Client: requests settings (evidence: `client/src/services/api.ts`)
- API Client → Express API: HTTP requests (evidence: `README.md`)
- Express API → Geolocation Route: routes requests (evidence: `server/src/app.ts`)
- Express API → SQL Scan Route: routes requests (evidence: `server/src/app.ts`)
- Express API → OWASP Scan Route: routes requests (evidence: `server/src/app.ts`)
- Express API → Realtime Scan Route: routes requests (evidence: `server/src/app.ts`)
- Express API → Rate Limit Route: routes requests (evidence: `server/src/app.ts`)
- Express API → URL Analyzer Route: routes requests (evidence: `server/src/app.ts`)
- Express API → History Routes: routes requests (evidence: `server/src/app.ts`)
- Express API → Report Routes: routes requests (evidence: `server/src/app.ts`)
- Express API → Settings Route: routes requests (evidence: `server/src/app.ts`)
- Geolocation Route → IP Lookup: calls lookup (evidence: `server/src/routes/geolocation.ts`)
- SQL Scan Route → SQL Scan Engine: calls scanner (evidence: `server/src/routes/sqlInjection.ts`)
- Rate Limit Route → Rate Limit Tester: calls tester (evidence: `server/src/routes/rateLimit.ts`)
- Realtime Scan Route → Realtime Scanner: starts scans (evidence: `server/src/routes/realtimeScans.ts`)
- Realtime Scan Route → Lab Target Registry: checks targets (evidence: `server/src/routes/realtimeScans.ts`)
- Realtime Scanner → Lab Target Registry: uses registry (evidence: `server/src/services/realtimeScanner.ts`)
- Realtime Scanner → Vulnerable and Secure Labs: tests lab
- Geolocation Route → SQLite Store: persists results
- SQL Scan Route → SQLite Store: persists scans
- Realtime Scan Route → SQLite Store: stores scan data (evidence: `server/src/routes/realtimeScans.ts`)
- Realtime Scanner → SQLite Store: records scan data (evidence: `server/src/services/realtimeScanner.ts`)
- Lab Target Registry → SQLite Store: reads registry (evidence: `server/src/services/targetRegistry.ts`)
- History Routes → SQLite Store: reads history (evidence: `server/src/routes/scans.ts`)
- Settings Route → SQLite Store: reads settings (evidence: `server/src/routes/settings.ts`)
- Report Routes → Report Generator: builds reports
- Report Routes → SQLite Store: reads scan data
