# piyush-eon/ai-interview-platform architecture

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

- Interactive diagram: https://gitdiagram.com/piyush-eon/ai-interview-platform
- Repository: https://github.com/piyush-eon/ai-interview-platform

## Overview

Prept is a two-sided interview-practice platform: candidates discover experts, book credit-based sessions, meet by video, and receive feedback; interviewers onboard, manage availability and earnings, and request withdrawals. The main app routes and server actions coordinate these stages, with Prisma-backed persistence. The README is only a tutorial title, so feature relationships not visible in excerpts are documented at a high level; unsampled action and call internals are not inferred.

Main entry points: [`actions/dashboard.js`](https://github.com/piyush-eon/ai-interview-platform/blob/main/actions/dashboard.js) (Dashboard operations), [`app/(main)/dashboard/page.jsx`](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/dashboard/page.jsx) (Interviewer dashboard), [`lib/prisma.js`](https://github.com/piyush-eon/ai-interview-platform/blob/main/lib/prisma.js) (Prisma database), [`app/(main)/interviewers/[id]/page.jsx`](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/interviewers/%5Bid%5D/page.jsx) (Expert profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery and onboarding"]
  node_home["Landing page<br/>[page.jsx]"]
  node_explore["Explore experts<br/>[page.jsx]"]
  node_expert_profile["Expert profile<br/>[page.jsx]"]
  node_onboarding["Role onboarding<br/>[page.jsx]"]
end

subgraph group_sessions["Bookings and interviews"]
  node_booking_actions["Booking actions<br/>[booking.js]"]
  node_slot_picker["Slot picker<br/>[SlotPicker.jsx]"]
  node_appointments["Appointments<br/>[page.jsx]"]
  node_appointment_card["Appointment card"]
  node_call_room["Video interview<br/>[CallUI.jsx]"]
  node_ai_feedback["AI feedback<br/>[aiQuestions.jsx]"]
  node_stream_webhook["Stream webhook<br/>[route.js]"]
end

subgraph group_interviewer["Interviewer operations"]
  node_dashboard["Interviewer dashboard<br/>[page.jsx]"]
  node_dashboard_actions["Dashboard operations<br/>[dashboard.js]"]
  node_availability["Availability controls"]
  node_earnings["Earnings and payouts"]
  node_payout_review["Payout approval"]
end

subgraph group_platform["Persistence and integrations"]
  node_database[("Prisma database<br/>[prisma.js]")]
  node_rate_limit["Rate limiting<br/>[arcjet.js]"]
end

node_candidate(("Candidate"))
node_interviewer_actor(("Interviewer"))
node_stream{{"Stream video"}}
node_email{{"Email delivery"}}

node_candidate -.->|"opens"| node_home
node_home -->|"browse experts"| node_explore
node_candidate -.->|"chooses role"| node_onboarding
node_explore -.->|"selects expert"| node_expert_profile
node_expert_profile -->|"requests booking"| node_booking_actions
node_expert_profile -.->|"renders"| node_slot_picker
node_booking_actions -->|"reads and writes"| node_database
node_appointments -->|"renders"| node_appointment_card
node_appointments -.->|"loads appointments"| node_database
node_appointment_card -.->|"joins session"| node_call_room
node_call_room -.->|"video session"| node_stream
node_call_room -.->|"requests analysis"| node_ai_feedback
node_stream_webhook -->|"updates records"| node_database
node_dashboard -->|"loads dashboard data"| node_dashboard_actions
node_dashboard -->|"renders"| node_availability
node_dashboard -->|"renders"| node_earnings
node_dashboard_actions -->|"reads and writes"| node_database
node_dashboard_actions -->|"checks requests"| node_rate_limit
node_interviewer_actor -.->|"manages work"| node_dashboard
node_earnings -.->|"reviews withdrawal"| node_payout_review
node_dashboard_actions -->|"sends withdrawal request"| node_email

click node_home "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/page.jsx"
click node_explore "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/explore/page.jsx"
click node_expert_profile "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/interviewers/%5Bid%5D/page.jsx"
click node_onboarding "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/onboarding/page.jsx"
click node_booking_actions "https://github.com/piyush-eon/ai-interview-platform/blob/main/actions/booking.js"
click node_slot_picker "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/interviewers/%5Bid%5D/_components/SlotPicker.jsx"
click node_appointments "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/appointments/page.jsx"
click node_appointment_card "https://github.com/piyush-eon/ai-interview-platform/blob/main/components/AppointmentCard.jsx"
click node_call_room "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/call/%5BcallId%5D/_components/CallUI.jsx"
click node_ai_feedback "https://github.com/piyush-eon/ai-interview-platform/blob/main/actions/aiQuestions.jsx"
click node_dashboard "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/dashboard/page.jsx"
click node_dashboard_actions "https://github.com/piyush-eon/ai-interview-platform/blob/main/actions/dashboard.js"
click node_availability "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/dashboard/components/AvailabilitySection.jsx"
click node_earnings "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/dashboard/components/EarningsSection.jsx"
click node_payout_review "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/payout/%5Bid%5D/_components/PayoutReviewClient.jsx"
click node_stream_webhook "https://github.com/piyush-eon/ai-interview-platform/blob/main/app/api/webhooks/stream/route.js"
click node_database "https://github.com/piyush-eon/ai-interview-platform/blob/main/lib/prisma.js"
click node_rate_limit "https://github.com/piyush-eon/ai-interview-platform/blob/main/lib/arcjet.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_home,node_explore,node_expert_profile,node_onboarding,node_interviewer_actor toneBlue
class node_booking_actions,node_slot_picker,node_appointments,node_appointment_card,node_call_room,node_ai_feedback,node_stream_webhook toneAmber
class node_dashboard,node_dashboard_actions,node_availability,node_earnings,node_payout_review toneMint
class node_database,node_rate_limit toneRose
class node_candidate,node_stream,node_email toneIndigo
```

## Components

### Discovery and onboarding

- [Landing page](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/page.jsx): `app/page.jsx`
- [Explore experts](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/explore/page.jsx): `app/(main)/explore/page.jsx`
- [Expert profile](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/interviewers/%5Bid%5D/page.jsx): `app/(main)/interviewers/[id]/page.jsx`
- [Role onboarding](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/onboarding/page.jsx): `app/(main)/onboarding/page.jsx`

### Bookings and interviews

- [Booking actions](https://github.com/piyush-eon/ai-interview-platform/blob/main/actions/booking.js): `actions/booking.js`
- [Slot picker](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/interviewers/%5Bid%5D/_components/SlotPicker.jsx): `app/(main)/interviewers/[id]/_components/SlotPicker.jsx`
- [Appointments](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/appointments/page.jsx): `app/(main)/appointments/page.jsx`
- [Appointment card](https://github.com/piyush-eon/ai-interview-platform/blob/main/components/AppointmentCard.jsx): `components/AppointmentCard.jsx`
- [Video interview](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/call/%5BcallId%5D/_components/CallUI.jsx): `app/(main)/call/[callId]/_components/CallUI.jsx`
- [AI feedback](https://github.com/piyush-eon/ai-interview-platform/blob/main/actions/aiQuestions.jsx): `actions/aiQuestions.jsx`
- [Stream webhook](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/api/webhooks/stream/route.js): `app/api/webhooks/stream/route.js`

### Interviewer operations

- [Interviewer dashboard](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/dashboard/page.jsx): `app/(main)/dashboard/page.jsx`
- [Dashboard operations](https://github.com/piyush-eon/ai-interview-platform/blob/main/actions/dashboard.js): `actions/dashboard.js`
- [Availability controls](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/dashboard/components/AvailabilitySection.jsx): `app/(main)/dashboard/components/AvailabilitySection.jsx`
- [Earnings and payouts](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/dashboard/components/EarningsSection.jsx): `app/(main)/dashboard/components/EarningsSection.jsx`
- [Payout approval](https://github.com/piyush-eon/ai-interview-platform/blob/main/app/(main)/payout/%5Bid%5D/_components/PayoutReviewClient.jsx): `app/(main)/payout/[id]/_components/PayoutReviewClient.jsx`

### Persistence and integrations

- [Prisma database](https://github.com/piyush-eon/ai-interview-platform/blob/main/lib/prisma.js): `lib/prisma.js`
- [Rate limiting](https://github.com/piyush-eon/ai-interview-platform/blob/main/lib/arcjet.js): `lib/arcjet.js`

### Other components

- **Candidate**
- **Interviewer**
- **Stream video**
- **Email delivery**

## Connections

- Candidate → Landing page: opens
- Landing page → Explore experts: browse experts (evidence: `app/page.jsx`)
- Candidate → Role onboarding: chooses role (evidence: `app/(main)/onboarding/page.jsx`)
- Explore experts → Expert profile: selects expert (evidence: `app/(main)/explore/page.jsx`)
- Expert profile → Booking actions: requests booking (evidence: `app/(main)/interviewers/[id]/page.jsx`)
- Expert profile → Slot picker: renders (evidence: `app/(main)/interviewers/[id]/page.jsx`)
- Booking actions → Prisma database: reads and writes (evidence: `actions/booking.js`)
- Appointments → Appointment card: renders (evidence: `app/(main)/appointments/page.jsx`)
- Appointments → Prisma database: loads appointments
- Appointment card → Video interview: joins session (evidence: `components/AppointmentCard.jsx`)
- Video interview → Stream video: video session
- Video interview → AI feedback: requests analysis
- Stream webhook → Prisma database: updates records (evidence: `app/api/webhooks/stream/route.js`)
- Interviewer dashboard → Dashboard operations: loads dashboard data (evidence: `app/(main)/dashboard/page.jsx`)
- Interviewer dashboard → Availability controls: renders (evidence: `app/(main)/dashboard/page.jsx`)
- Interviewer dashboard → Earnings and payouts: renders (evidence: `app/(main)/dashboard/page.jsx`)
- Dashboard operations → Prisma database: reads and writes (evidence: `actions/dashboard.js`)
- Dashboard operations → Rate limiting: checks requests (evidence: `actions/dashboard.js`)
- Interviewer → Interviewer dashboard: manages work
- Earnings and payouts → Payout approval: reviews withdrawal
- Dashboard operations → Email delivery: sends withdrawal request (evidence: `actions/dashboard.js`)
