# sakshilanghi/nerveless architecture

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

- Interactive diagram: https://gitdiagram.com/sakshilanghi/nerveless
- Repository: https://github.com/sakshilanghi/nerveless

## Overview

NERVELESS turns uploaded preparation documents into personalized spoken interview, viva, or presentation simulations, then presents a communication analysis of the recorded responses. The main flow runs from setup in the React app through document extraction and question generation, into the voice-driven simulation, and finally to the Pressure Response Map dashboard. The README documents baseline, pressure, and recovery metrics; those stages are represented in the analysis view. Some routes and services were not sampled, so their documented roles are included where paths are supported, while uncertain wiring is omitted.

Main entry points: [`frontend/src/components/SimulationRoom.jsx`](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/components/SimulationRoom.jsx) (Simulation room), [`frontend/src/services/api.js`](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/api.js) (HTTP API client), [`frontend/src/App.jsx`](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/App.jsx) (Session setup), [`backend/app/routes/documents.py`](https://github.com/sakshilanghi/nerveless/blob/main/backend/app/routes/documents.py) (Document upload route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and preparation"]
  node_app["Session setup<br/>[App.jsx]"]
  node_api["HTTP API client<br/>[api.js]"]
end

subgraph group_backend["Preparation services"]
  node_documents["Document upload route<br/>[documents.py]"]
  node_parser["Document extraction<br/>[document_parser.py]"]
  node_questions["Question route<br/>[questions.py]"]
  node_generator["Question generation"]
end

subgraph group_simulation["Voice simulation"]
  node_room["Simulation room<br/>[SimulationRoom.jsx]"]
  node_voiceapi["Voice route<br/>[voice.py]"]
  node_rime_service["Rime TTS proxy<br/>[rime_service.py]"]
  node_capture["Microphone VAD<br/>[voiceCapture.js]"]
  node_stt["Speech recognition<br/>[speechToText.js]"]
  node_tts_client["TTS client<br/>[rimeTts.js]"]
  node_player["Audio playback<br/>[audioPlayer.js]"]
end

subgraph group_analysis["Communication analysis"]
  node_dashboard["Pressure Response Map"]
end

node_user(("Candidate"))
node_gemini{{"Google Gemini"}}
node_rime{{"Rime TTS"}}
node_browser_audio{{"Browser audio APIs"}}

node_user -->|"provides material"| node_app
node_app -->|"uploads document"| node_api
node_api -->|"sends file"| node_documents
node_documents -->|"extracts text"| node_parser
node_parser -->|"returns text"| node_documents
node_documents -->|"returns extracted text"| node_api
node_api -->|"returns text"| node_app
node_app -->|"requests questions"| node_api
node_api -->|"sends context"| node_questions
node_questions -->|"generates questions"| node_generator
node_generator -->|"requests generation"| node_gemini
node_questions -->|"returns questions"| node_api
node_api -->|"returns questions"| node_app
node_app -->|"starts simulation"| node_room
node_room -->|"requests spoken question"| node_tts_client
node_tts_client -->|"requests speech"| node_voiceapi
node_voiceapi -->|"generates audio"| node_rime_service
node_rime_service -->|"synthesizes speech"| node_rime
node_rime_service -->|"returns audio"| node_voiceapi
node_voiceapi -->|"returns audio"| node_tts_client
node_room -->|"plays question audio"| node_player
node_room -->|"starts VAD"| node_capture
node_room -->|"captures transcript"| node_stt
node_capture -->|"reads microphone"| node_browser_audio
node_stt -->|"recognizes speech"| node_browser_audio
node_capture -->|"signals speech activity"| node_room
node_stt -->|"returns transcript"| node_room
node_room -->|"stops audio on interruption"| node_player
node_room -->|"passes answer metrics"| node_dashboard
node_user -->|"answers verbally"| node_room
node_dashboard -->|"shows analysis"| node_user

click node_app "https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/App.jsx"
click node_api "https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/api.js"
click node_documents "https://github.com/sakshilanghi/nerveless/blob/main/backend/app/routes/documents.py"
click node_parser "https://github.com/sakshilanghi/nerveless/blob/main/backend/app/services/document_parser.py"
click node_questions "https://github.com/sakshilanghi/nerveless/blob/main/backend/app/routes/questions.py"
click node_generator "https://github.com/sakshilanghi/nerveless/blob/main/backend/app/services/question_generator.py"
click node_room "https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/components/SimulationRoom.jsx"
click node_voiceapi "https://github.com/sakshilanghi/nerveless/blob/main/backend/app/routes/voice.py"
click node_rime_service "https://github.com/sakshilanghi/nerveless/blob/main/backend/app/services/rime_service.py"
click node_capture "https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/voice/voiceCapture.js"
click node_stt "https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/voice/speechToText.js"
click node_tts_client "https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/voice/rimeTts.js"
click node_player "https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/voice/audioPlayer.js"
click node_dashboard "https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/components/AnalyzerDashboard.jsx"

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_api,node_browser_audio toneBlue
class node_documents,node_parser,node_questions,node_generator toneAmber
class node_room,node_voiceapi,node_rime_service,node_capture,node_stt,node_tts_client,node_player toneMint
class node_dashboard toneRose
class node_user,node_gemini,node_rime toneIndigo
```

## Components

### Setup and preparation

- [Session setup](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [HTTP API client](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Preparation services

- [Document upload route](https://github.com/sakshilanghi/nerveless/blob/main/backend/app/routes/documents.py): `backend/app/routes/documents.py`
- [Document extraction](https://github.com/sakshilanghi/nerveless/blob/main/backend/app/services/document_parser.py): `backend/app/services/document_parser.py`
- [Question route](https://github.com/sakshilanghi/nerveless/blob/main/backend/app/routes/questions.py): `backend/app/routes/questions.py`
- [Question generation](https://github.com/sakshilanghi/nerveless/blob/main/backend/app/services/question_generator.py): `backend/app/services/question_generator.py`

### Voice simulation

- [Simulation room](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/components/SimulationRoom.jsx): `frontend/src/components/SimulationRoom.jsx`
- [Voice route](https://github.com/sakshilanghi/nerveless/blob/main/backend/app/routes/voice.py): `backend/app/routes/voice.py`
- [Rime TTS proxy](https://github.com/sakshilanghi/nerveless/blob/main/backend/app/services/rime_service.py): `backend/app/services/rime_service.py`
- [Microphone VAD](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/voice/voiceCapture.js): `frontend/src/services/voice/voiceCapture.js`
- [Speech recognition](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/voice/speechToText.js): `frontend/src/services/voice/speechToText.js`
- [TTS client](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/voice/rimeTts.js): `frontend/src/services/voice/rimeTts.js`
- [Audio playback](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/services/voice/audioPlayer.js): `frontend/src/services/voice/audioPlayer.js`

### Communication analysis

- [Pressure Response Map](https://github.com/sakshilanghi/nerveless/blob/main/frontend/src/components/AnalyzerDashboard.jsx): `frontend/src/components/AnalyzerDashboard.jsx`

### Other components

- **Candidate**
- **Google Gemini**
- **Rime TTS**
- **Browser audio APIs**

## Connections

- Candidate → Session setup: provides material
- Session setup → HTTP API client: uploads document
- HTTP API client → Document upload route: sends file
- Document upload route → Document extraction: extracts text
- Document extraction → Document upload route: returns text
- Document upload route → HTTP API client: returns extracted text
- HTTP API client → Session setup: returns text
- Session setup → HTTP API client: requests questions
- HTTP API client → Question route: sends context
- Question route → Question generation: generates questions
- Question generation → Google Gemini: requests generation
- Question route → HTTP API client: returns questions
- HTTP API client → Session setup: returns questions
- Session setup → Simulation room: starts simulation
- Simulation room → TTS client: requests spoken question
- TTS client → Voice route: requests speech
- Voice route → Rime TTS proxy: generates audio
- Rime TTS proxy → Rime TTS: synthesizes speech
- Rime TTS proxy → Voice route: returns audio
- Voice route → TTS client: returns audio
- Simulation room → Audio playback: plays question audio
- Simulation room → Microphone VAD: starts VAD
- Simulation room → Speech recognition: captures transcript
- Microphone VAD → Browser audio APIs: reads microphone
- Speech recognition → Browser audio APIs: recognizes speech
- Microphone VAD → Simulation room: signals speech activity
- Speech recognition → Simulation room: returns transcript
- Simulation room → Audio playback: stops audio on interruption
- Simulation room → Pressure Response Map: passes answer metrics
- Candidate → Simulation room: answers verbally
- Pressure Response Map → Candidate: shows analysis
