# aviral-xy/interprep architecture

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

- Interactive diagram: https://gitdiagram.com/aviral-xy/interprep
- Repository: https://github.com/aviral-xy/interprep

## Overview

InterPrep is a voice-first mock interview platform. Candidates authenticate, choose or generate an interview, complete a simulated interview, and review structured feedback. The graph includes documented WebRTC signaling and AI-generation capabilities; those links rely on the README where implementation files were not excerpted, so unsampled internals are not inferred.

Main entry points: [`lib/actions/auth.action.ts`](https://github.com/aviral-xy/interprep/blob/main/lib/actions/auth.action.ts) (Session actions), [`lib/actions/generate.action.ts`](https://github.com/aviral-xy/interprep/blob/main/lib/actions/generate.action.ts) (Interview generation and records), [`app/(dash)/interview/[id]/feedback/page.tsx`](https://github.com/aviral-xy/interprep/blob/main/app/(dash)/interview/%5Bid%5D/feedback/page.tsx) (Feedback report), [`app/(dash)/interview/[id]/page.tsx`](https://github.com/aviral-xy/interprep/blob/main/app/(dash)/interview/%5Bid%5D/page.tsx) (Interview session page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Candidate experience"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_dashboard["Interview dashboard<br/>[page.tsx]"]
  node_feedbackpage["Feedback report<br/>[page.tsx]"]
  node_codefeedback["Code review display"]
end

subgraph group_identity["Identity and access"]
  node_authform["Auth form<br/>[AuthForm.tsx]"]
  node_firebaseclient["Firebase client<br/>[client.ts]"]
  node_authapi["Google auth route<br/>[route.ts]"]
  node_authactions["Session actions<br/>[auth.action.ts]"]
end

subgraph group_interview["Interview runtime"]
  node_agent["Interview setup<br/>[Agent.tsx]"]
  node_generatepage["Generation page<br/>[page.tsx]"]
  node_interviewpage["Interview session page<br/>[page.tsx]"]
  node_liveinterview["Voice interview<br/>[GetInterview.tsx]"]
  node_videopanel["Video panel"]
  node_webrtc["WebRTC hook<br/>[useWebRTC.ts]"]
end

subgraph group_services["Data and AI services"]
  node_adminfirebase["Firebase Admin<br/>[admin.ts]"]
  node_generation["Interview generation and records<br/>[generate.action.ts]"]
  node_aiworkflow["AI workflow"]
  node_gemini["Gemini LLM"]
  node_vapi["Vapi voice assistant"]
  node_signaling["WebSocket signaling<br/>[server.ts]"]
end

node_candidate(("Candidate"))
node_peer(("Interview peer"))

node_candidate -->|"visits"| node_landing
node_candidate -->|"submits credentials"| node_authform
node_authform -->|"uses Google sign-in"| node_firebaseclient
node_firebaseclient -->|"posts identity"| node_authapi
node_authform -->|"calls sign-in"| node_authactions
node_authapi -->|"writes user record"| node_adminfirebase
node_authapi -->|"sets session"| node_authactions
node_authactions -->|"verifies and reads"| node_adminfirebase
node_candidate -->|"opens dashboard"| node_dashboard
node_dashboard -->|"loads current user"| node_authactions
node_dashboard -->|"loads interview lists"| node_generation
node_candidate -->|"starts interview"| node_generatepage
node_generatepage -->|"checks session"| node_authactions
node_generatepage -->|"renders setup"| node_agent
node_agent -.->|"requests generation"| node_generation
node_generation -.->|"proxies generation"| node_aiworkflow
node_aiworkflow -->|"requests questions"| node_gemini
node_candidate -->|"opens session"| node_interviewpage
node_interviewpage -->|"loads current user"| node_authactions
node_interviewpage -->|"loads interview"| node_generation
node_interviewpage -->|"renders session"| node_liveinterview
node_liveinterview -.->|"runs voice assistant"| node_vapi
node_candidate -.->|"joins video session"| node_videopanel
node_videopanel -.->|"uses connection hook"| node_webrtc
node_webrtc -->|"exchanges signaling"| node_signaling
node_signaling -->|"relays SDP and ICE"| node_peer
node_candidate -->|"reviews results"| node_feedbackpage
node_feedbackpage -->|"loads current user"| node_authactions
node_feedbackpage -->|"loads interview feedback"| node_generation
node_feedbackpage -->|"renders code review"| node_codefeedback

click node_landing "https://github.com/aviral-xy/interprep/blob/main/app/(root)/page.tsx"
click node_authform "https://github.com/aviral-xy/interprep/blob/main/components/AuthForm.tsx"
click node_firebaseclient "https://github.com/aviral-xy/interprep/blob/main/firebass/client.ts"
click node_authapi "https://github.com/aviral-xy/interprep/blob/main/app/api/google-auth/route.ts"
click node_authactions "https://github.com/aviral-xy/interprep/blob/main/lib/actions/auth.action.ts"
click node_adminfirebase "https://github.com/aviral-xy/interprep/blob/main/firebass/admin.ts"
click node_dashboard "https://github.com/aviral-xy/interprep/blob/main/app/(dash)/dashboard/page.tsx"
click node_agent "https://github.com/aviral-xy/interprep/blob/main/components/Agent.tsx"
click node_generatepage "https://github.com/aviral-xy/interprep/blob/main/app/(dash)/interview/page.tsx"
click node_generation "https://github.com/aviral-xy/interprep/blob/main/lib/actions/generate.action.ts"
click node_interviewpage "https://github.com/aviral-xy/interprep/blob/main/app/(dash)/interview/%5Bid%5D/page.tsx"
click node_liveinterview "https://github.com/aviral-xy/interprep/blob/main/components/GetInterview.tsx"
click node_videopanel "https://github.com/aviral-xy/interprep/blob/main/components/VideoInterviewPanel.tsx"
click node_webrtc "https://github.com/aviral-xy/interprep/blob/main/hooks/useWebRTC.ts"
click node_signaling "https://github.com/aviral-xy/interprep/blob/main/backend/server.ts"
click node_feedbackpage "https://github.com/aviral-xy/interprep/blob/main/app/(dash)/interview/%5Bid%5D/feedback/page.tsx"
click node_codefeedback "https://github.com/aviral-xy/interprep/blob/main/components/FeedbackCodeReview.tsx"

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_landing,node_dashboard,node_feedbackpage,node_codefeedback,node_peer toneBlue
class node_authform,node_firebaseclient,node_authapi,node_authactions toneAmber
class node_agent,node_generatepage,node_interviewpage,node_liveinterview,node_videopanel,node_webrtc toneMint
class node_adminfirebase,node_generation,node_aiworkflow,node_gemini,node_vapi,node_signaling toneRose
class node_candidate toneIndigo
```

## Components

### Candidate experience

- [Landing page](https://github.com/aviral-xy/interprep/blob/main/app/(root)/page.tsx): `app/(root)/page.tsx`
- [Interview dashboard](https://github.com/aviral-xy/interprep/blob/main/app/(dash)/dashboard/page.tsx): `app/(dash)/dashboard/page.tsx`
- [Feedback report](https://github.com/aviral-xy/interprep/blob/main/app/(dash)/interview/%5Bid%5D/feedback/page.tsx): `app/(dash)/interview/[id]/feedback/page.tsx`
- [Code review display](https://github.com/aviral-xy/interprep/blob/main/components/FeedbackCodeReview.tsx): `components/FeedbackCodeReview.tsx`

### Identity and access

- [Auth form](https://github.com/aviral-xy/interprep/blob/main/components/AuthForm.tsx): `components/AuthForm.tsx`
- [Firebase client](https://github.com/aviral-xy/interprep/blob/main/firebass/client.ts): `firebass/client.ts`
- [Google auth route](https://github.com/aviral-xy/interprep/blob/main/app/api/google-auth/route.ts): `app/api/google-auth/route.ts`
- [Session actions](https://github.com/aviral-xy/interprep/blob/main/lib/actions/auth.action.ts): `lib/actions/auth.action.ts`

### Interview runtime

- [Interview setup](https://github.com/aviral-xy/interprep/blob/main/components/Agent.tsx): `components/Agent.tsx`
- [Generation page](https://github.com/aviral-xy/interprep/blob/main/app/(dash)/interview/page.tsx): `app/(dash)/interview/page.tsx`
- [Interview session page](https://github.com/aviral-xy/interprep/blob/main/app/(dash)/interview/%5Bid%5D/page.tsx): `app/(dash)/interview/[id]/page.tsx`
- [Voice interview](https://github.com/aviral-xy/interprep/blob/main/components/GetInterview.tsx): `components/GetInterview.tsx`
- [Video panel](https://github.com/aviral-xy/interprep/blob/main/components/VideoInterviewPanel.tsx): `components/VideoInterviewPanel.tsx`
- [WebRTC hook](https://github.com/aviral-xy/interprep/blob/main/hooks/useWebRTC.ts): `hooks/useWebRTC.ts`

### Data and AI services

- [Firebase Admin](https://github.com/aviral-xy/interprep/blob/main/firebass/admin.ts): `firebass/admin.ts`
- [Interview generation and records](https://github.com/aviral-xy/interprep/blob/main/lib/actions/generate.action.ts): `lib/actions/generate.action.ts`
- **AI workflow**
- **Gemini LLM**
- **Vapi voice assistant**
- [WebSocket signaling](https://github.com/aviral-xy/interprep/blob/main/backend/server.ts): `backend/server.ts`

### Other components

- **Candidate**
- **Interview peer**

## Connections

- Candidate → Landing page: visits (evidence: `app/(root)/page.tsx`)
- Candidate → Auth form: submits credentials (evidence: `components/AuthForm.tsx`)
- Auth form → Firebase client: uses Google sign-in (evidence: `components/AuthForm.tsx`)
- Firebase client → Google auth route: posts identity (evidence: `firebass/client.ts`)
- Auth form → Session actions: calls sign-in (evidence: `components/AuthForm.tsx`)
- Google auth route → Firebase Admin: writes user record (evidence: `app/api/google-auth/route.ts`)
- Google auth route → Session actions: sets session (evidence: `app/api/google-auth/route.ts`)
- Session actions → Firebase Admin: verifies and reads (evidence: `lib/actions/auth.action.ts`)
- Candidate → Interview dashboard: opens dashboard (evidence: `app/(dash)/dashboard/page.tsx`)
- Interview dashboard → Session actions: loads current user (evidence: `app/(dash)/dashboard/page.tsx`)
- Interview dashboard → Interview generation and records: loads interview lists (evidence: `app/(dash)/dashboard/page.tsx`)
- Candidate → Generation page: starts interview (evidence: `app/(dash)/interview/page.tsx`)
- Generation page → Session actions: checks session (evidence: `app/(dash)/interview/page.tsx`)
- Generation page → Interview setup: renders setup (evidence: `app/(dash)/interview/page.tsx`)
- Interview setup → Interview generation and records: requests generation
- Interview generation and records → AI workflow: proxies generation (evidence: `README.md`)
- AI workflow → Gemini LLM: requests questions (evidence: `README.md`)
- Candidate → Interview session page: opens session (evidence: `app/(dash)/interview/[id]/page.tsx`)
- Interview session page → Session actions: loads current user (evidence: `app/(dash)/interview/[id]/page.tsx`)
- Interview session page → Interview generation and records: loads interview (evidence: `app/(dash)/interview/[id]/page.tsx`)
- Interview session page → Voice interview: renders session (evidence: `app/(dash)/interview/[id]/page.tsx`)
- Voice interview → Vapi voice assistant: runs voice assistant (evidence: `README.md`)
- Candidate → Video panel: joins video session (evidence: `README.md`)
- Video panel → WebRTC hook: uses connection hook (evidence: `README.md`)
- WebRTC hook → WebSocket signaling: exchanges signaling (evidence: `README.md`)
- WebSocket signaling → Interview peer: relays SDP and ICE (evidence: `README.md`)
- Candidate → Feedback report: reviews results (evidence: `app/(dash)/interview/[id]/feedback/page.tsx`)
- Feedback report → Session actions: loads current user (evidence: `app/(dash)/interview/[id]/feedback/page.tsx`)
- Feedback report → Interview generation and records: loads interview feedback (evidence: `app/(dash)/interview/[id]/feedback/page.tsx`)
- Feedback report → Code review display: renders code review (evidence: `app/(dash)/interview/[id]/feedback/page.tsx`)
