# ankit145ar/poc-interview architecture

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

- Interactive diagram: https://gitdiagram.com/ankit145ar/poc-interview
- Repository: https://github.com/ankit145ar/poc-interview

## Overview

This is an interview-transcription prototype. The active interface lets a user upload audio, play it while capturing its playback stream for live AssemblyAI transcription, and request suggested interview questions from the transcript. The backend also exposes a separate uploaded-audio transcription endpoint and generates questions through OpenAI. Live microphone transcription and an upload-analyzer page are additional frontend branches; the README gives no product detail, and some referenced hooks are absent from the supplied tree, so those branches are only mapped where source evidence supports them.

Main entry points: [`frontend/src/UploadPlaybackTranscriberUI.jsx`](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/UploadPlaybackTranscriberUI.jsx) (Upload playback UI), [`frontend/src/useAssemblyAI2.js`](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/useAssemblyAI2.js) (Streaming hook), [`backend/server.js`](https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js) (Streaming token route), [`frontend/src/TranscriberUI.jsx`](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/TranscriberUI.jsx) (Live transcript UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["App shell<br/>[App.jsx]"]
  node_playback_ui["Upload playback UI"]
  node_live_ui["Live transcript UI<br/>[TranscriberUI.jsx]"]
  node_live_page["Live transcription page"]
  node_upload_page["Upload analyzer page<br/>[UploadAnalyzer.jsx]"]
end

subgraph group_transcription["Transcription flows"]
  node_playback_capture["Playback capture"]
  node_live_hook["Live transcription hook<br/>[useAssemblyAI.js]"]
  node_fast_hook["Streaming hook<br/>[useAssemblyAI2.js]"]
end

subgraph group_backend["Backend services"]
  node_api["HTTP API<br/>[server.js]"]
  node_token["Streaming token route<br/>[server.js]"]
  node_questions["Question generation<br/>[server.js]"]
  node_uploaded_transcription["Uploaded audio transcription<br/>[server.js]"]
end

subgraph group_integrations["External services"]
  node_assemblyai["AssemblyAI"]
  node_openai["OpenAI"]
end

node_user(("User"))

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_playback_ui
node_user -->|"uploads audio"| node_playback_ui
node_playback_ui -->|"starts playback capture"| node_playback_capture
node_playback_capture -->|"streams audio"| node_assemblyai
node_playback_ui -->|"requests token"| node_token
node_token -->|"creates token"| node_assemblyai
node_playback_ui -->|"requests suggestions"| node_questions
node_questions -->|"generates questions"| node_openai
node_live_ui -->|"uses hook"| node_fast_hook
node_live_ui -->|"requests suggestions"| node_questions
node_fast_hook -->|"requests token"| node_token
node_fast_hook -->|"streams microphone audio"| node_assemblyai
node_live_page -.->|"uses hook"| node_fast_hook
node_upload_page -.->|"uploads audio"| node_uploaded_transcription
node_uploaded_transcription -->|"uploads and transcribes"| node_assemblyai
node_live_hook -->|"requests token"| node_token
node_live_hook -->|"streams audio"| node_assemblyai

click node_entry "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/main.jsx"
click node_app "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/App.jsx"
click node_playback_ui "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/UploadPlaybackTranscriberUI.jsx"
click node_playback_capture "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/UploadPlaybackTranscriberUI.jsx"
click node_live_hook "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/useAssemblyAI.js"
click node_fast_hook "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/useAssemblyAI2.js"
click node_live_ui "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/TranscriberUI.jsx"
click node_live_page "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/pages/LiveTranscription.jsx"
click node_upload_page "https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/pages/UploadAnalyzer.jsx"
click node_api "https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js"
click node_token "https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js"
click node_questions "https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js"
click node_uploaded_transcription "https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js"

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_entry,node_app,node_playback_ui,node_live_ui,node_live_page,node_upload_page,node_user toneBlue
class node_playback_capture,node_live_hook,node_fast_hook toneAmber
class node_api,node_token,node_questions,node_uploaded_transcription toneMint
class node_assemblyai,node_openai toneRose
```

## Components

### Frontend experience

- [React entry](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [App shell](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Upload playback UI](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/UploadPlaybackTranscriberUI.jsx): `frontend/src/UploadPlaybackTranscriberUI.jsx`
- [Live transcript UI](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/TranscriberUI.jsx): `frontend/src/TranscriberUI.jsx`
- [Live transcription page](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/pages/LiveTranscription.jsx): `frontend/src/pages/LiveTranscription.jsx`
- [Upload analyzer page](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/pages/UploadAnalyzer.jsx): `frontend/src/pages/UploadAnalyzer.jsx`

### Transcription flows

- [Playback capture](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/UploadPlaybackTranscriberUI.jsx): `frontend/src/UploadPlaybackTranscriberUI.jsx`
- [Live transcription hook](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/useAssemblyAI.js): `frontend/src/useAssemblyAI.js`
- [Streaming hook](https://github.com/ankit145ar/poc-interview/blob/main/frontend/src/useAssemblyAI2.js): `frontend/src/useAssemblyAI2.js`

### Backend services

- [HTTP API](https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js): `backend/server.js`
- [Streaming token route](https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js): `backend/server.js`
- [Question generation](https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js): `backend/server.js`
- [Uploaded audio transcription](https://github.com/ankit145ar/poc-interview/blob/main/backend/server.js): `backend/server.js`

### External services

- **AssemblyAI**
- **OpenAI**

### Other components

- **User**

## Connections

- User → React entry: opens app (evidence: `frontend/src/main.jsx`)
- React entry → App shell: renders (evidence: `frontend/src/main.jsx`)
- App shell → Upload playback UI: renders (evidence: `frontend/src/App.jsx`)
- User → Upload playback UI: uploads audio (evidence: `frontend/src/UploadPlaybackTranscriberUI.jsx`)
- Upload playback UI → Playback capture: starts playback capture (evidence: `frontend/src/UploadPlaybackTranscriberUI.jsx`)
- Playback capture → AssemblyAI: streams audio (evidence: `frontend/src/UploadPlaybackTranscriberUI.jsx`)
- Upload playback UI → Streaming token route: requests token (evidence: `frontend/src/UploadPlaybackTranscriberUI.jsx`)
- Streaming token route → AssemblyAI: creates token (evidence: `backend/server.js`)
- Upload playback UI → Question generation: requests suggestions (evidence: `frontend/src/UploadPlaybackTranscriberUI.jsx`)
- Question generation → OpenAI: generates questions (evidence: `backend/server.js`)
- Live transcript UI → Streaming hook: uses hook (evidence: `frontend/src/TranscriberUI.jsx`)
- Live transcript UI → Question generation: requests suggestions (evidence: `frontend/src/TranscriberUI.jsx`)
- Streaming hook → Streaming token route: requests token (evidence: `frontend/src/useAssemblyAI2.js`)
- Streaming hook → AssemblyAI: streams microphone audio (evidence: `frontend/src/useAssemblyAI2.js`)
- Live transcription page → Streaming hook: uses hook
- Upload analyzer page → Uploaded audio transcription: uploads audio
- Uploaded audio transcription → AssemblyAI: uploads and transcribes (evidence: `backend/server.js`)
- Live transcription hook → Streaming token route: requests token (evidence: `frontend/src/useAssemblyAI.js`)
- Live transcription hook → AssemblyAI: streams audio (evidence: `frontend/src/useAssemblyAI.js`)
