# mohimabanerjee43-byte/vulnerasense-ai architecture

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

- Interactive diagram: https://gitdiagram.com/mohimabanerjee43-byte/vulnerasense-ai
- Repository: https://github.com/mohimabanerjee43-byte/vulnerasense-ai

## Overview

VulneraSense AI is a prototype vulnerability-screening product: users provide voice or text, the system analyzes input and classifies vulnerability, then presents assessment results and support recommendations. The repository has two backend paths: a Node assessment API with optional Python trust verification, and a separate FastAPI input/translation pipeline for transcription and acoustic features. The frontend also provides assessment, results, dashboard, voice, and resource experiences. Some frontend wiring and recommendation implementation details are not shown, so those connections are omitted unless documented.

Main entry points: [`app/main.py`](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/main.py) (Input processing API), [`backend/server.js`](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/server.js) (Node API), [`backend/routes/assessment.js`](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/routes/assessment.js) (Assessment endpoint), [`js/assessment.js`](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/assessment.js) (Assessment UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User experience"]
  node_web["Web experience<br/>[index.html]"]
  node_assessment_ui["Assessment UI<br/>[assessment.js]"]
  node_voice_ui["Voice input<br/>[voice.js]"]
  node_audio_tracking["Audio tracking<br/>[audio_Tracker.js]"]
  node_results_ui["Results and charts<br/>[charts.js]"]
  node_recommendation_ui["Recommendations UI<br/>[recommendation.js]"]
  node_resources["Support resources<br/>[resources.html]"]
end

subgraph group_assessment["Screening and support"]
  node_api["Node API<br/>[server.js]"]
  node_assessment_route["Assessment endpoint<br/>[assessment.js]"]
  node_text_analysis["Signal analysis<br/>[nlp.js]"]
  node_risk_classification["Risk classification<br/>[riskEngine.js]"]
  node_ai_model["Analysis coordinator<br/>[aiModel.js]"]
  node_recommendation_route["Recommendation endpoint<br/>[recommendations.js]"]
end

subgraph group_input["Voice and language input"]
  node_input_api["Input processing API<br/>[main.py]"]
  node_input_schema["Pipeline data models<br/>[input_schema.py]"]
  node_audio_analysis["Acoustic analysis<br/>[audio_service.py]"]
  node_speech_to_text["Speech transcription<br/>[stt_service.py]"]
  node_translation["Text translation<br/>[main.py]"]
end

subgraph group_trust["Trust verification"]
  node_security_api["Security service<br/>[app.py]"]
  node_trust_engine["Trust evaluation<br/>[trust_engine.py]"]
  node_audio_analyzer["Audio verification<br/>[audio_analyzer.py]"]
end

node_user(("User"))
node_python_services["Translator services"]
node_browser_speech["Web Speech API"]

node_user -->|"uses"| node_web
node_web -.->|"offers screening"| node_assessment_ui
node_assessment_ui -.->|"submits text"| node_api
node_voice_ui -->|"uses speech"| node_browser_speech
node_voice_ui -.->|"provides input"| node_assessment_ui
node_assessment_ui -.->|"shows results"| node_results_ui
node_results_ui -.->|"presents pathway"| node_recommendation_ui
node_recommendation_ui -.->|"offers support"| node_resources
node_api -->|"mounts route"| node_assessment_route
node_api -->|"mounts route"| node_recommendation_route
node_assessment_route -->|"analyzes text"| node_ai_model
node_ai_model -->|"extracts signals"| node_text_analysis
node_ai_model -->|"classifies risk"| node_risk_classification
node_assessment_route -->|"requests trust check"| node_security_api
node_assessment_route -->|"returns assessment"| node_user
node_recommendation_route -.->|"returns recommendations"| node_user
node_input_api -->|"extracts features"| node_audio_analysis
node_input_api -->|"transcribes audio"| node_speech_to_text
node_input_api -->|"returns validated output"| node_input_schema
node_input_api -->|"translates text"| node_python_services
node_input_api -.->|"returns processed input"| node_user
node_api -->|"proxies audio update"| node_security_api
node_security_api -->|"evaluates reports"| node_trust_engine
node_security_api -->|"analyzes audio"| node_audio_analyzer

click node_web "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/index.html"
click node_assessment_ui "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/assessment.js"
click node_voice_ui "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/voice.js"
click node_audio_tracking "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/audio_Tracker.js"
click node_results_ui "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/charts.js"
click node_recommendation_ui "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/recommendation.js"
click node_resources "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/pages/resources.html"
click node_api "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/server.js"
click node_assessment_route "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/routes/assessment.js"
click node_text_analysis "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/services/nlp.js"
click node_risk_classification "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/services/riskEngine.js"
click node_ai_model "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/services/aiModel.js"
click node_recommendation_route "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/routes/recommendations.js"
click node_input_api "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/main.py"
click node_input_schema "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/schemas/input_schema.py"
click node_audio_analysis "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/services/audio_service.py"
click node_speech_to_text "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/services/stt_service.py"
click node_translation "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/main.py"
click node_security_api "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/security_service/app.py"
click node_trust_engine "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/security_service/trust_engine.py"
click node_audio_analyzer "https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/security_service/audio_analyzer.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_web,node_assessment_ui,node_voice_ui,node_audio_tracking,node_results_ui,node_recommendation_ui,node_resources,node_user toneBlue
class node_api,node_assessment_route,node_text_analysis,node_risk_classification,node_ai_model,node_recommendation_route toneAmber
class node_input_api,node_input_schema,node_audio_analysis,node_speech_to_text,node_translation,node_browser_speech toneMint
class node_security_api,node_trust_engine,node_audio_analyzer toneRose
class node_python_services toneIndigo
```

## Components

### User experience

- [Web experience](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/index.html): `index.html`
- [Assessment UI](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/assessment.js): `js/assessment.js`
- [Voice input](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/voice.js): `js/voice.js`
- [Audio tracking](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/audio_Tracker.js): `js/audio_Tracker.js`
- [Results and charts](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/charts.js): `js/charts.js`
- [Recommendations UI](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/js/recommendation.js): `js/recommendation.js`
- [Support resources](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/pages/resources.html): `pages/resources.html`

### Screening and support

- [Node API](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/server.js): `backend/server.js`
- [Assessment endpoint](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/routes/assessment.js): `backend/routes/assessment.js`
- [Signal analysis](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/services/nlp.js): `backend/services/nlp.js`
- [Risk classification](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/services/riskEngine.js): `backend/services/riskEngine.js`
- [Analysis coordinator](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/services/aiModel.js): `backend/services/aiModel.js`
- [Recommendation endpoint](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/routes/recommendations.js): `backend/routes/recommendations.js`

### Voice and language input

- [Input processing API](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/main.py): `app/main.py`
- [Pipeline data models](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/schemas/input_schema.py): `app/schemas/input_schema.py`
- [Acoustic analysis](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/services/audio_service.py): `app/services/audio_service.py`
- [Speech transcription](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/services/stt_service.py): `app/services/stt_service.py`
- [Text translation](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/app/main.py): `app/main.py`

### Trust verification

- [Security service](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/security_service/app.py): `backend/security_service/app.py`
- [Trust evaluation](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/security_service/trust_engine.py): `backend/security_service/trust_engine.py`
- [Audio verification](https://github.com/mohimabanerjee43-byte/vulnerasense-ai/blob/main/backend/security_service/audio_analyzer.py): `backend/security_service/audio_analyzer.py`

### Other components

- **User**
- **Translator services**
- **Web Speech API**

## Connections

- User → Web experience: uses (evidence: `README.md`)
- Web experience → Assessment UI: offers screening
- Assessment UI → Node API: submits text
- Voice input → Web Speech API: uses speech (evidence: `README.md`)
- Voice input → Assessment UI: provides input
- Assessment UI → Results and charts: shows results
- Results and charts → Recommendations UI: presents pathway (evidence: `README.md`)
- Recommendations UI → Support resources: offers support
- Node API → Assessment endpoint: mounts route (evidence: `backend/server.js`)
- Node API → Recommendation endpoint: mounts route (evidence: `backend/server.js`)
- Assessment endpoint → Analysis coordinator: analyzes text (evidence: `backend/routes/assessment.js`)
- Analysis coordinator → Signal analysis: extracts signals (evidence: `backend/services/aiModel.js`)
- Analysis coordinator → Risk classification: classifies risk (evidence: `backend/services/aiModel.js`)
- Assessment endpoint → Security service: requests trust check (evidence: `backend/routes/assessment.js`)
- Assessment endpoint → User: returns assessment (evidence: `backend/routes/assessment.js`)
- Recommendation endpoint → User: returns recommendations
- Input processing API → Acoustic analysis: extracts features (evidence: `app/main.py`)
- Input processing API → Speech transcription: transcribes audio (evidence: `app/main.py`)
- Input processing API → Pipeline data models: returns validated output (evidence: `app/main.py`)
- Input processing API → Translator services: translates text (evidence: `app/main.py`)
- Input processing API → User: returns processed input
- Node API → Security service: proxies audio update (evidence: `backend/server.js`)
- Security service → Trust evaluation: evaluates reports (evidence: `backend/security_service/app.py`)
- Security service → Audio verification: analyzes audio (evidence: `backend/security_service/app.py`)
