# prajeeth-12/project-08 architecture

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

- Interactive diagram: https://gitdiagram.com/prajeeth-12/project-08
- Repository: https://github.com/prajeeth-12/project-08

## Overview

This is the backend and React client for an AI mock-interview platform. A candidate starts an interview in the browser; the backend streams speech through a voice engine, maintains interview context, and can produce post-turn coaching and a final scorecard. The README documents Nova Sonic streaming, interruption handling, renewal, and fallback voice operation. Resume analysis, coding exercises, code review, authentication, and session persistence are distinct supporting capabilities. Several domain links are inferred from the tree and documented architecture rather than sampled call sites, so those edges are marked unverified.

Main entry points: [`backend/main.py`](https://github.com/prajeeth-12/project-08/blob/main/backend/main.py) (FastAPI application), [`backend/api/speech_api.py`](https://github.com/prajeeth-12/project-08/blob/main/backend/api/speech_api.py) (Speech WebSocket), [`backend/services/session_manager.py`](https://github.com/prajeeth-12/project-08/blob/main/backend/services/session_manager.py) (Agent session manager), [`backend/api/sessions.py`](https://github.com/prajeeth-12/project-08/blob/main/backend/api/sessions.py) (Session endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and sessions"]
  node_app["FastAPI application<br/>[main.py]"]
  node_auth["Authentication<br/>[auth_api.py]"]
  node_sessionapi["Session endpoints<br/>[sessions.py]"]
  node_speechapi["Speech WebSocket<br/>[speech_api.py]"]
  node_agentapi["Agent endpoints<br/>[agent_api.py]"]
end

subgraph group_interview["Interview agents"]
  node_manager["Agent session manager<br/>[session_manager.py]"]
  node_interviewer["Interviewer agent<br/>[interviewer.py]"]
  node_coach["Coach agent<br/>[agentic_coach.py]"]
  node_orchestrator["Agent orchestrator<br/>[orchestrator.py]"]
end

subgraph group_voice["Voice streaming"]
  node_nova["Nova Sonic engine"]
  node_geminivoice["Gemini voice engine"]
  node_voiceworker["Nova Sonic worker"]
  node_stt["Speech recognition<br/>[stt_service.py]"]
  node_tts["Speech synthesis<br/>[tts_service.py]"]
end

subgraph group_assessment["Assessment services"]
  node_resume["Resume processing<br/>[resumes.py]"]
  node_evaluation["Interview evaluation<br/>[evaluations.py]"]
  node_code["Code execution"]
  node_review["Code review<br/>[code_review.py]"]
  node_llm["LLM service<br/>[llm_service.py]"]
end

subgraph group_data["Persistence"]
  node_database[("Platform database<br/>[database.py]")]
  node_dbmanager[("Supabase manager<br/>[db_manager.py]")]
end

node_candidate(("Candidate browser"))
node_nova_service{{"Amazon Bedrock"}}
node_gemini_service{{"Google Gemini"}}
node_supabase[("Supabase")]
node_judge0{{"Judge0 sandbox"}}

node_candidate -.->|"uses"| node_app
node_app -->|"routes"| node_auth
node_app -->|"routes"| node_sessionapi
node_app -->|"routes"| node_speechapi
node_app -->|"routes"| node_agentapi
node_speechapi -.->|"delegates"| node_manager
node_manager -.->|"coordinates"| node_interviewer
node_manager -.->|"evaluates turns"| node_coach
node_interviewer -.->|"generates prompts"| node_llm
node_coach -.->|"generates feedback"| node_llm
node_speechapi -.->|"streams audio"| node_nova
node_speechapi -.->|"selects provider"| node_geminivoice
node_nova -.->|"duplex stream"| node_nova_service
node_geminivoice -.->|"live session"| node_gemini_service
node_speechapi -.->|"uses"| node_stt
node_speechapi -.->|"uses"| node_tts
node_app -->|"routes"| node_resume
node_app -.->|"routes"| node_evaluation
node_app -->|"routes"| node_code
node_app -.->|"routes"| node_review
node_sessionapi -.->|"persists sessions"| node_database
node_dbmanager -->|"reads and writes"| node_supabase
node_app -.->|"initializes"| node_dbmanager
node_code -.->|"submits code"| node_judge0
node_evaluation -.->|"stores results"| node_database

click node_app "https://github.com/prajeeth-12/project-08/blob/main/backend/main.py"
click node_auth "https://github.com/prajeeth-12/project-08/blob/main/backend/api/auth_api.py"
click node_sessionapi "https://github.com/prajeeth-12/project-08/blob/main/backend/api/sessions.py"
click node_speechapi "https://github.com/prajeeth-12/project-08/blob/main/backend/api/speech_api.py"
click node_agentapi "https://github.com/prajeeth-12/project-08/blob/main/backend/api/agent_api.py"
click node_manager "https://github.com/prajeeth-12/project-08/blob/main/backend/services/session_manager.py"
click node_interviewer "https://github.com/prajeeth-12/project-08/blob/main/backend/agents/interviewer.py"
click node_coach "https://github.com/prajeeth-12/project-08/blob/main/backend/agents/agentic_coach.py"
click node_orchestrator "https://github.com/prajeeth-12/project-08/blob/main/backend/agents/orchestrator.py"
click node_nova "https://github.com/prajeeth-12/project-08/blob/main/backend/services/nova_sonic_engine.py"
click node_geminivoice "https://github.com/prajeeth-12/project-08/blob/main/backend/services/gemini_voice_engine.py"
click node_voiceworker "https://github.com/prajeeth-12/project-08/blob/main/backend/services/nova_sonic_worker.py"
click node_stt "https://github.com/prajeeth-12/project-08/blob/main/backend/api/speech/stt_service.py"
click node_tts "https://github.com/prajeeth-12/project-08/blob/main/backend/api/speech/tts_service.py"
click node_resume "https://github.com/prajeeth-12/project-08/blob/main/backend/api/resumes.py"
click node_evaluation "https://github.com/prajeeth-12/project-08/blob/main/backend/api/evaluations.py"
click node_code "https://github.com/prajeeth-12/project-08/blob/main/backend/api/code_execution_api.py"
click node_review "https://github.com/prajeeth-12/project-08/blob/main/backend/api/code_review.py"
click node_llm "https://github.com/prajeeth-12/project-08/blob/main/backend/services/llm_service.py"
click node_database "https://github.com/prajeeth-12/project-08/blob/main/backend/database.py"
click node_dbmanager "https://github.com/prajeeth-12/project-08/blob/main/backend/database/db_manager.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_app,node_auth,node_sessionapi,node_speechapi,node_agentapi,node_candidate toneBlue
class node_manager,node_interviewer,node_coach,node_orchestrator,node_supabase toneAmber
class node_nova,node_geminivoice,node_voiceworker,node_stt,node_tts toneMint
class node_resume,node_evaluation,node_code,node_review,node_llm toneRose
class node_database,node_dbmanager,node_nova_service,node_gemini_service,node_judge0 toneIndigo
```

## Components

### API and sessions

- [FastAPI application](https://github.com/prajeeth-12/project-08/blob/main/backend/main.py): `backend/main.py`
- [Authentication](https://github.com/prajeeth-12/project-08/blob/main/backend/api/auth_api.py): `backend/api/auth_api.py`
- [Session endpoints](https://github.com/prajeeth-12/project-08/blob/main/backend/api/sessions.py): `backend/api/sessions.py`
- [Speech WebSocket](https://github.com/prajeeth-12/project-08/blob/main/backend/api/speech_api.py): `backend/api/speech_api.py`
- [Agent endpoints](https://github.com/prajeeth-12/project-08/blob/main/backend/api/agent_api.py): `backend/api/agent_api.py`

### Interview agents

- [Agent session manager](https://github.com/prajeeth-12/project-08/blob/main/backend/services/session_manager.py): `backend/services/session_manager.py`
- [Interviewer agent](https://github.com/prajeeth-12/project-08/blob/main/backend/agents/interviewer.py): `backend/agents/interviewer.py`
- [Coach agent](https://github.com/prajeeth-12/project-08/blob/main/backend/agents/agentic_coach.py): `backend/agents/agentic_coach.py`
- [Agent orchestrator](https://github.com/prajeeth-12/project-08/blob/main/backend/agents/orchestrator.py): `backend/agents/orchestrator.py`

### Voice streaming

- [Nova Sonic engine](https://github.com/prajeeth-12/project-08/blob/main/backend/services/nova_sonic_engine.py): `backend/services/nova_sonic_engine.py`
- [Gemini voice engine](https://github.com/prajeeth-12/project-08/blob/main/backend/services/gemini_voice_engine.py): `backend/services/gemini_voice_engine.py`
- [Nova Sonic worker](https://github.com/prajeeth-12/project-08/blob/main/backend/services/nova_sonic_worker.py): `backend/services/nova_sonic_worker.py`
- [Speech recognition](https://github.com/prajeeth-12/project-08/blob/main/backend/api/speech/stt_service.py): `backend/api/speech/stt_service.py`
- [Speech synthesis](https://github.com/prajeeth-12/project-08/blob/main/backend/api/speech/tts_service.py): `backend/api/speech/tts_service.py`

### Assessment services

- [Resume processing](https://github.com/prajeeth-12/project-08/blob/main/backend/api/resumes.py): `backend/api/resumes.py`
- [Interview evaluation](https://github.com/prajeeth-12/project-08/blob/main/backend/api/evaluations.py): `backend/api/evaluations.py`
- [Code execution](https://github.com/prajeeth-12/project-08/blob/main/backend/api/code_execution_api.py): `backend/api/code_execution_api.py`
- [Code review](https://github.com/prajeeth-12/project-08/blob/main/backend/api/code_review.py): `backend/api/code_review.py`
- [LLM service](https://github.com/prajeeth-12/project-08/blob/main/backend/services/llm_service.py): `backend/services/llm_service.py`

### Persistence

- [Platform database](https://github.com/prajeeth-12/project-08/blob/main/backend/database.py): `backend/database.py`
- [Supabase manager](https://github.com/prajeeth-12/project-08/blob/main/backend/database/db_manager.py): `backend/database/db_manager.py`

### Other components

- **Candidate browser**
- **Amazon Bedrock**
- **Google Gemini**
- **Supabase**
- **Judge0 sandbox**

## Connections

- Candidate browser → FastAPI application: uses
- FastAPI application → Authentication: routes (evidence: `backend/main.py`)
- FastAPI application → Session endpoints: routes (evidence: `backend/main.py`)
- FastAPI application → Speech WebSocket: routes (evidence: `backend/main.py`)
- FastAPI application → Agent endpoints: routes (evidence: `backend/main.py`)
- Speech WebSocket → Agent session manager: delegates
- Agent session manager → Interviewer agent: coordinates
- Agent session manager → Coach agent: evaluates turns
- Interviewer agent → LLM service: generates prompts
- Coach agent → LLM service: generates feedback
- Speech WebSocket → Nova Sonic engine: streams audio
- Speech WebSocket → Gemini voice engine: selects provider
- Nova Sonic engine → Amazon Bedrock: duplex stream
- Gemini voice engine → Google Gemini: live session (evidence: `backend/services/gemini_voice_engine.py`)
- Speech WebSocket → Speech recognition: uses
- Speech WebSocket → Speech synthesis: uses
- FastAPI application → Resume processing: routes (evidence: `backend/main.py`)
- FastAPI application → Interview evaluation: routes (evidence: `backend/main.py`)
- FastAPI application → Code execution: routes (evidence: `backend/main.py`)
- FastAPI application → Code review: routes (evidence: `backend/main.py`)
- Session endpoints → Platform database: persists sessions
- Supabase manager → Supabase: reads and writes (evidence: `backend/database/db_manager.py`)
- FastAPI application → Supabase manager: initializes
- Code execution → Judge0 sandbox: submits code
- Interview evaluation → Platform database: stores results
