How mbessalle/ai-interviewer works
AI Interviewer is a hiring product: recruiters configure interviews and share candidate links; candidates complete account-free voice interviews, after which recruiters review transcripts, scores, communication analysis, and cross-candidate insights. The graph follows question generation, interview setup, call registration and completion, analysis, and dashboard review, alongside the trace-recording layer. README documents the end-to-end flow and major AI capabilities; source excerpts confirm selected route, database, and tracing calls. Other API and UI relationships are based on the documented workflow, not inspected component source.
Main entry points: route.ts Call Registration · responses.ts Response Queries · page.tsx Recruiter Dashboard · chat.ts Validated LLM
Components 25
Recruiter Setup
- Recruiter Dashboard
src/app/(client)/dashboard/page.tsx - Interview Details
src/app/(client)/interviews/[interviewId]/page.tsx - Question Generation
src/app/api/generate-interview-questions/route.ts - Interviewer Setup
src/app/api/create-interviewer/route.ts
Candidate Voice Interview
- Candidate Link
src/app/(user)/call/[interviewId]/page.tsx - Voice Call Interface
src/app/(user)/call/[interviewId]/interview-interface.tsx - Call Registration
src/app/api/register-call/route.ts - Call Webhook
src/app/api/response-webhook/route.ts
AI Analysis
- Validated LLM
src/lib/llm/chat.ts - Communication Analysis
src/app/api/analyze-communication/route.ts - Candidate Insights
src/app/api/generate-insights/route.ts - Response Analytics
src/services/analytics.service.ts
Data and Access
- Interviewer Queries
src/db/queries/interviewers.ts - Interview Queries
src/db/queries/interviews.ts - Response Queries
src/db/queries/responses.ts - Postgres Records
src/db/schema.ts - Server Actions
src/services/interviews.actions.ts - Access Rules
src/lib/access.ts
Tracing
- Route Tracing
src/lib/trace/route.ts - Trace Recorder
src/lib/trace/record.ts - Trace Events
src/db/schema.ts
Other components
- Recruiter
- Candidate
- OpenAI
- Retell Voice
Connections 33
- Recruiter → Recruiter Dashboard: manages interviews
- Recruiter Dashboard → Question Generation: requests questions
- Question Generation → Validated LLM: validates model reply
src/app/api/generate-interview-questions/route.ts - Validated LLM → OpenAI: calls model
- Recruiter Dashboard → Interviewer Setup: creates interviewers
- Interviewer Setup → Interviewer Queries: reads and writes
src/app/api/create-interviewer/route.ts - Interview Details → Candidate Link: shares interview link
- Candidate → Candidate Link: opens link
- Candidate Link → Voice Call Interface: starts interview
- Voice Call Interface → Call Registration: registers call
- Call Registration → Interview Queries: loads interview
src/app/api/register-call/route.ts - Call Registration → Interviewer Queries: loads interviewer
src/app/api/register-call/route.ts - Call Registration → Retell Voice: creates web call
src/app/api/register-call/route.ts - Retell Voice → Candidate: conducts voice call
- Retell Voice → Call Webhook: posts call result
- Call Webhook → Response Queries: records response
- Call Webhook → Communication Analysis: triggers analysis
- Communication Analysis → Validated LLM: validates analysis
src/app/api/analyze-communication/route.ts - Communication Analysis → Response Queries: stores analysis
- Candidate Insights → Response Queries: loads responses
src/app/api/generate-insights/route.ts - Candidate Insights → Interview Queries: loads and updates interview
src/app/api/generate-insights/route.ts - Candidate Insights → Validated LLM: validates insights
src/app/api/generate-insights/route.ts - Recruiter Dashboard → Response Analytics: views call results
- Response Analytics → Response Queries: reads responses
src/app/api/get-call/route.ts - Server Actions → Access Rules: checks permissions
- Server Actions → Interview Queries: reads and writes
- Interview Queries → Postgres Records: queries records
src/db/queries/interviews.ts - Response Queries → Postgres Records: queries records
src/db/queries/responses.ts - Route Tracing → Trace Recorder: records route
src/lib/trace/route.ts - Trace Recorder → Trace Events: persists trace steps
src/lib/trace/record.ts - Trace Recorder → Postgres Records: writes SQL traces
src/lib/trace/record.ts - Question Generation → Route Tracing: wraps route
src/app/api/generate-interview-questions/route.ts - Call Registration → Route Tracing: wraps route
src/app/api/register-call/route.ts