# vishwa073/prepai architecture

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

- Interactive diagram: https://gitdiagram.com/vishwa073/prepai
- Repository: https://github.com/vishwa073/prepai

## Overview

Prepwise is a browser-based interview-practice app. Users authenticate, create an interview from job details, review generated questions, practice answering, and view per-answer feedback and a session rating. The route tree and excerpts support the creation, interview, and feedback stages; the README documents voice interaction and AI insights, but the sampled code does not establish every runtime integration. Groups reflect the user journey and shared application layers.

Main entry points: [`src/App.tsx`](https://github.com/vishwa073/prepai/blob/main/src/App.tsx) (Route application), [`src/config/firebase.config.ts`](https://github.com/vishwa073/prepai/blob/main/src/config/firebase.config.ts) (Firestore client), [`src/layouts`](https://github.com/vishwa073/prepai/tree/main/src/layouts) (Layouts and guards), [`src/components/form-mock-interview.tsx`](https://github.com/vishwa073/prepai/blob/main/src/components/form-mock-interview.tsx) (Interview form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Route application<br/>[App.tsx]"]
  node_layouts["Layouts and guards"]
  node_home["Home page<br/>[home.tsx]"]
  node_loader["Loading view<br/>[loader-page.tsx]"]
  node_shared["Shared UI components"]
  node_shellcomponents["Navigation and shell<br/>[header.tsx]"]
end

subgraph group_prep["Interview preparation"]
  node_interviewform["Interview form"]
  node_createedit["Create or edit"]
  node_dashboard["Interview dashboard<br/>[dashboard.tsx]"]
  node_interviewpin["Interview card<br/>[pin.tsx]"]
  node_questiongen["Question generation"]
end

subgraph group_practice["Practice and feedback"]
  node_loadinterview["Interview briefing<br/>[mock-load-page.tsx]"]
  node_liveinterview["Mock interview"]
  node_questions["Question section"]
  node_recordanswer["Answer capture<br/>[record-answer.tsx]"]
  node_feedback["Feedback report<br/>[feedback.tsx]"]
end

subgraph group_identity["Identity and persistence"]
  node_auth["Sign-in and sign-up"]
  node_authhandler["User provisioning<br/>[auth-handler.tsx]"]
  node_firebase["Firestore client<br/>[firebase.config.ts]"]
  node_interviews[("Interview records")]
  node_answers[("Answer records")]
end

node_user(("Candidate"))
node_gemini{{"Google Gemini"}}

node_user -->|"opens"| node_app
node_app -->|"routes through"| node_layouts
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_createedit
node_app -->|"routes to"| node_loadinterview
node_app -->|"routes to"| node_liveinterview
node_app -->|"routes to"| node_feedback
node_layouts -->|"renders"| node_authhandler
node_layouts -->|"renders"| node_shellcomponents
node_createedit -->|"renders"| node_interviewform
node_interviewform -->|"generates"| node_questiongen
node_questiongen -->|"requests questions"| node_gemini
node_interviewform -->|"writes interview"| node_firebase
node_firebase -.->|"persists records"| node_interviews
node_dashboard -.->|"loads interviews"| node_firebase
node_dashboard -->|"renders cards"| node_interviewpin
node_loadinterview -->|"loads interview"| node_firebase
node_liveinterview -->|"renders"| node_questions
node_recordanswer -.->|"stores answer"| node_firebase
node_feedback -->|"loads report data"| node_firebase
node_firebase -.->|"reads answers"| node_answers
node_feedback -->|"shows interview"| node_interviewpin
node_authhandler -->|"creates user record"| node_firebase
node_authhandler -->|"shows while loading"| node_loader
node_app -.->|"uses UI"| node_shared

click node_app "https://github.com/vishwa073/prepai/blob/main/src/App.tsx"
click node_layouts "https://github.com/vishwa073/prepai/tree/main/src/layouts"
click node_home "https://github.com/vishwa073/prepai/blob/main/src/routes/home.tsx"
click node_auth "https://github.com/vishwa073/prepai/tree/main/src/routes"
click node_authhandler "https://github.com/vishwa073/prepai/blob/main/src/handlers/auth-handler.tsx"
click node_firebase "https://github.com/vishwa073/prepai/blob/main/src/config/firebase.config.ts"
click node_interviewform "https://github.com/vishwa073/prepai/blob/main/src/components/form-mock-interview.tsx"
click node_createedit "https://github.com/vishwa073/prepai/blob/main/src/routes/create-edit-page.tsx"
click node_dashboard "https://github.com/vishwa073/prepai/blob/main/src/routes/dashboard.tsx"
click node_interviewpin "https://github.com/vishwa073/prepai/blob/main/src/components/pin.tsx"
click node_questiongen "https://github.com/vishwa073/prepai/blob/main/src/components/form-mock-interview.tsx"
click node_loadinterview "https://github.com/vishwa073/prepai/blob/main/src/routes/mock-load-page.tsx"
click node_liveinterview "https://github.com/vishwa073/prepai/blob/main/src/routes/mock-interview-page.tsx"
click node_questions "https://github.com/vishwa073/prepai/blob/main/src/components/question-section.tsx"
click node_recordanswer "https://github.com/vishwa073/prepai/blob/main/src/components/record-answer.tsx"
click node_feedback "https://github.com/vishwa073/prepai/blob/main/src/routes/feedback.tsx"
click node_loader "https://github.com/vishwa073/prepai/blob/main/src/routes/loader-page.tsx"
click node_shared "https://github.com/vishwa073/prepai/tree/main/src/components/ui"
click node_shellcomponents "https://github.com/vishwa073/prepai/blob/main/src/components/header.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_app,node_layouts,node_home,node_loader,node_shared,node_shellcomponents toneBlue
class node_interviewform,node_createedit,node_dashboard,node_interviewpin,node_questiongen toneAmber
class node_loadinterview,node_liveinterview,node_questions,node_recordanswer,node_feedback toneMint
class node_auth,node_authhandler,node_firebase,node_interviews,node_answers toneRose
class node_user,node_gemini toneIndigo
```

## Components

### Application shell

- [Route application](https://github.com/vishwa073/prepai/blob/main/src/App.tsx): `src/App.tsx`
- [Layouts and guards](https://github.com/vishwa073/prepai/tree/main/src/layouts): `src/layouts`
- [Home page](https://github.com/vishwa073/prepai/blob/main/src/routes/home.tsx): `src/routes/home.tsx`
- [Loading view](https://github.com/vishwa073/prepai/blob/main/src/routes/loader-page.tsx): `src/routes/loader-page.tsx`
- [Shared UI components](https://github.com/vishwa073/prepai/tree/main/src/components/ui): `src/components/ui`
- [Navigation and shell](https://github.com/vishwa073/prepai/blob/main/src/components/header.tsx): `src/components/header.tsx`

### Interview preparation

- [Interview form](https://github.com/vishwa073/prepai/blob/main/src/components/form-mock-interview.tsx): `src/components/form-mock-interview.tsx`
- [Create or edit](https://github.com/vishwa073/prepai/blob/main/src/routes/create-edit-page.tsx): `src/routes/create-edit-page.tsx`
- [Interview dashboard](https://github.com/vishwa073/prepai/blob/main/src/routes/dashboard.tsx): `src/routes/dashboard.tsx`
- [Interview card](https://github.com/vishwa073/prepai/blob/main/src/components/pin.tsx): `src/components/pin.tsx`
- [Question generation](https://github.com/vishwa073/prepai/blob/main/src/components/form-mock-interview.tsx): `src/components/form-mock-interview.tsx`

### Practice and feedback

- [Interview briefing](https://github.com/vishwa073/prepai/blob/main/src/routes/mock-load-page.tsx): `src/routes/mock-load-page.tsx`
- [Mock interview](https://github.com/vishwa073/prepai/blob/main/src/routes/mock-interview-page.tsx): `src/routes/mock-interview-page.tsx`
- [Question section](https://github.com/vishwa073/prepai/blob/main/src/components/question-section.tsx): `src/components/question-section.tsx`
- [Answer capture](https://github.com/vishwa073/prepai/blob/main/src/components/record-answer.tsx): `src/components/record-answer.tsx`
- [Feedback report](https://github.com/vishwa073/prepai/blob/main/src/routes/feedback.tsx): `src/routes/feedback.tsx`

### Identity and persistence

- [Sign-in and sign-up](https://github.com/vishwa073/prepai/tree/main/src/routes): `src/routes`
- [User provisioning](https://github.com/vishwa073/prepai/blob/main/src/handlers/auth-handler.tsx): `src/handlers/auth-handler.tsx`
- [Firestore client](https://github.com/vishwa073/prepai/blob/main/src/config/firebase.config.ts): `src/config/firebase.config.ts`
- **Interview records**
- **Answer records**

### Other components

- **Candidate**
- **Google Gemini**

## Connections

- Candidate → Route application: opens (evidence: `src/App.tsx`)
- Route application → Layouts and guards: routes through (evidence: `src/App.tsx`)
- Route application → Home page: routes to (evidence: `src/App.tsx`)
- Route application → Sign-in and sign-up: routes to (evidence: `src/App.tsx`)
- Route application → Interview dashboard: routes to (evidence: `src/App.tsx`)
- Route application → Create or edit: routes to (evidence: `src/App.tsx`)
- Route application → Interview briefing: routes to (evidence: `src/App.tsx`)
- Route application → Mock interview: routes to (evidence: `src/App.tsx`)
- Route application → Feedback report: routes to (evidence: `src/App.tsx`)
- Layouts and guards → User provisioning: renders (evidence: `src/layouts/public-layout.tsx`)
- Layouts and guards → Navigation and shell: renders (evidence: `src/layouts/main-layout.tsx`)
- Create or edit → Interview form: renders (evidence: `src/routes/create-edit-page.tsx`)
- Interview form → Question generation: generates (evidence: `src/components/form-mock-interview.tsx`)
- Question generation → Google Gemini: requests questions
- Interview form → Firestore client: writes interview (evidence: `src/components/form-mock-interview.tsx`)
- Firestore client → Interview records: persists records
- Interview dashboard → Firestore client: loads interviews (evidence: `src/routes/dashboard.tsx`)
- Interview dashboard → Interview card: renders cards (evidence: `src/routes/dashboard.tsx`)
- Interview briefing → Firestore client: loads interview (evidence: `src/routes/mock-load-page.tsx`)
- Mock interview → Question section: renders (evidence: `src/routes/mock-interview-page.tsx`)
- Answer capture → Firestore client: stores answer (evidence: `src/components/record-answer.tsx`)
- Feedback report → Firestore client: loads report data (evidence: `src/routes/feedback.tsx`)
- Firestore client → Answer records: reads answers
- Feedback report → Interview card: shows interview (evidence: `src/routes/feedback.tsx`)
- User provisioning → Firestore client: creates user record (evidence: `src/handlers/auth-handler.tsx`)
- User provisioning → Loading view: shows while loading (evidence: `src/handlers/auth-handler.tsx`)
- Route application → Shared UI components: uses UI
