# sahilbehera6531/hireready-nexus architecture

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

- Interactive diagram: https://gitdiagram.com/sahilbehera6531/hireready-nexus
- Repository: https://github.com/sahilbehera6531/hireready-nexus

## Overview

HireReady-Nexus is a Flask interview-preparation app. Candidates use its browser UI to submit text or recorded answers; the server evaluates them, updates interview state, and returns feedback, scores, and a next question. Audio answers additionally pass through confidence scoring and transcription. A separate group-discussion feature generates speaker turns and evolves its topic. The graph includes the documented discussion UI capability, though its client wiring is not shown in the excerpts; edges are limited to visible calls or explicit documentation.

Main entry points: [`server.py`](https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py) (Interview Server), [`model.py`](https://github.com/sahilbehera6531/hireready-nexus/blob/main/model.py) (Audio Pipeline), [`static/script.js`](https://github.com/sahilbehera6531/hireready-nexus/blob/main/static/script.js) (Browser Client), [`train_model.py`](https://github.com/sahilbehera6531/hireready-nexus/blob/main/train_model.py) (Model Training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interview["Mock Interview"]
  node_webui["Interview UI"]
  node_browser["Browser Client<br/>[script.js]"]
  node_flask["Interview Server<br/>[server.py]"]
  node_interview_logic["Interview Logic<br/>[gen.py]"]
  node_interview_state[("Interview State<br/>[server.py]")]
end

subgraph group_audio["Audio Evaluation"]
  node_audio_capture["Audio Capture<br/>[script.js]"]
  node_audio_upload["Audio Upload<br/>[server.py]"]
  node_audio_pipeline["Audio Pipeline<br/>[model.py]"]
  node_ffmpeg["FFmpeg"]
  node_speech_service["Speech Recognition"]
end

subgraph group_discussion["Group Discussion"]
  node_discussion_flow["Discussion Flow<br/>[server.py]"]
  node_discussion_ui["Discussion UI"]
end

subgraph group_ml["Confidence Model"]
  node_confidence_training["Model Training<br/>[train_model.py]"]
  node_ravdess[("RAVDESS Audio")]
  node_confidence_model[("Random Forest<br/>[rf_model.pkl]")]
end

node_candidate(("Candidate"))
node_groq["Groq LLM"]
node_discussion_actor(("Discussion Participant"))

node_candidate -->|"uses"| node_webui
node_webui -.->|"loads"| node_browser
node_browser -->|"posts answers"| node_flask
node_flask -->|"evaluates and generates"| node_interview_logic
node_flask -->|"updates"| node_interview_state
node_flask -->|"returns results"| node_browser
node_browser -->|"records audio"| node_audio_capture
node_audio_capture -->|"uploads recording"| node_audio_upload
node_audio_upload -->|"runs analysis"| node_audio_pipeline
node_audio_pipeline -->|"converts audio"| node_ffmpeg
node_audio_pipeline -->|"predicts confidence"| node_confidence_model
node_audio_pipeline -->|"transcribes audio"| node_speech_service
node_audio_upload -->|"scores transcript and generates feedback"| node_interview_logic
node_audio_upload -->|"updates"| node_interview_state
node_discussion_actor -->|"participates"| node_discussion_ui
node_discussion_ui -.->|"sends discussion input"| node_discussion_flow
node_discussion_flow -->|"generates turns and topic"| node_groq
node_confidence_training -->|"extracts training samples"| node_ravdess
node_confidence_training -->|"saves trained model"| node_confidence_model

click node_webui "https://github.com/sahilbehera6531/hireready-nexus/tree/main/templates"
click node_browser "https://github.com/sahilbehera6531/hireready-nexus/blob/main/static/script.js"
click node_flask "https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py"
click node_interview_logic "https://github.com/sahilbehera6531/hireready-nexus/blob/main/gen.py"
click node_interview_state "https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py"
click node_audio_capture "https://github.com/sahilbehera6531/hireready-nexus/blob/main/static/script.js"
click node_audio_upload "https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py"
click node_audio_pipeline "https://github.com/sahilbehera6531/hireready-nexus/blob/main/model.py"
click node_discussion_flow "https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py"
click node_discussion_ui "https://github.com/sahilbehera6531/hireready-nexus/tree/main/templates"
click node_confidence_training "https://github.com/sahilbehera6531/hireready-nexus/blob/main/train_model.py"
click node_ravdess "https://github.com/sahilbehera6531/hireready-nexus/tree/main/RAVDESS_dataset"
click node_confidence_model "https://github.com/sahilbehera6531/hireready-nexus/blob/main/rf_model.pkl"

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_webui,node_browser,node_flask,node_interview_logic,node_interview_state toneBlue
class node_audio_capture,node_audio_upload,node_audio_pipeline,node_ffmpeg,node_speech_service toneAmber
class node_discussion_flow,node_discussion_ui toneMint
class node_confidence_training,node_ravdess,node_confidence_model toneRose
class node_candidate,node_groq,node_discussion_actor toneIndigo
```

## Components

### Mock Interview

- [Interview UI](https://github.com/sahilbehera6531/hireready-nexus/tree/main/templates): `templates`
- [Browser Client](https://github.com/sahilbehera6531/hireready-nexus/blob/main/static/script.js): `static/script.js`
- [Interview Server](https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py): `server.py`
- [Interview Logic](https://github.com/sahilbehera6531/hireready-nexus/blob/main/gen.py): `gen.py`
- [Interview State](https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py): `server.py`

### Audio Evaluation

- [Audio Capture](https://github.com/sahilbehera6531/hireready-nexus/blob/main/static/script.js): `static/script.js`
- [Audio Upload](https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py): `server.py`
- [Audio Pipeline](https://github.com/sahilbehera6531/hireready-nexus/blob/main/model.py): `model.py`
- **FFmpeg**
- **Speech Recognition**

### Group Discussion

- [Discussion Flow](https://github.com/sahilbehera6531/hireready-nexus/blob/main/server.py): `server.py`
- [Discussion UI](https://github.com/sahilbehera6531/hireready-nexus/tree/main/templates): `templates`

### Confidence Model

- [Model Training](https://github.com/sahilbehera6531/hireready-nexus/blob/main/train_model.py): `train_model.py`
- [RAVDESS Audio](https://github.com/sahilbehera6531/hireready-nexus/tree/main/RAVDESS_dataset): `RAVDESS_dataset`
- [Random Forest](https://github.com/sahilbehera6531/hireready-nexus/blob/main/rf_model.pkl): `rf_model.pkl`

### Other components

- **Candidate**
- **Groq LLM**
- **Discussion Participant**

## Connections

- Candidate → Interview UI: uses (evidence: `README.md`)
- Interview UI → Browser Client: loads
- Browser Client → Interview Server: posts answers (evidence: `static/script.js`)
- Interview Server → Interview Logic: evaluates and generates (evidence: `server.py`)
- Interview Server → Interview State: updates (evidence: `server.py`)
- Interview Server → Browser Client: returns results (evidence: `server.py`)
- Browser Client → Audio Capture: records audio (evidence: `static/script.js`)
- Audio Capture → Audio Upload: uploads recording (evidence: `static/script.js`)
- Audio Upload → Audio Pipeline: runs analysis (evidence: `server.py`)
- Audio Pipeline → FFmpeg: converts audio (evidence: `model.py`)
- Audio Pipeline → Random Forest: predicts confidence (evidence: `model.py`)
- Audio Pipeline → Speech Recognition: transcribes audio (evidence: `model.py`)
- Audio Upload → Interview Logic: scores transcript and generates feedback (evidence: `server.py`)
- Audio Upload → Interview State: updates (evidence: `server.py`)
- Discussion Participant → Discussion UI: participates (evidence: `README.md`)
- Discussion UI → Discussion Flow: sends discussion input
- Discussion Flow → Groq LLM: generates turns and topic (evidence: `server.py`)
- Model Training → RAVDESS Audio: extracts training samples (evidence: `train_model.py`)
- Model Training → Random Forest: saves trained model (evidence: `train_model.py`)
