How sirithreddy175-boop/interviewflowai works
Purpose and Runtime
This is a TanStack Start/React TypeScript application for browsing candidates and running AI-assisted interview sessions. It is served through the TanStack Start server runtime, with Vite-based development/build tooling and Netlify deployment configuration in netlify.toml.
Primary startup and routing entry points:
• src/start.ts
• src/server.ts
• src/router.tsx
• src/routes/__root.tsx
Route and UI Layer
TanStack file routes define the user-facing flows:
• Landing/dashboard: src/routes/index.tsx
• Candidate browsing: src/routes/candidates.tsx
• Interview experience: src/routes/interview.tsx
• Interview backend endpoint: src/routes/api/interview.ts
The generated route manifest, src/routeTree.gen.ts, connects route files to the router. The application is a client-rendered React interface with server-capable API routes rather than a standalone REST service.
Candidate and Curriculum Domain Data
Candidate records and the interview curriculum are local domain data sources:
• src/data/candidates.ts
• src/data/curriculum.ts
• src/lib/interview/curriculum-service.ts
The candidate route and interview flow consume this data to select a candidate and determine interview topics/questions. curriculum-service.ts forms the boundary between static curriculum content and the interview engine.
Interview Session Orchestration
The central interview domain is implemented as server-side orchestration:
• src/lib/interview/engine.server.ts
• src/lib/interview/session-store.server.ts
• src/lib/interview/types.ts
The engine coordinates session initialization, interview progression, answer handling, and feedback-oriented state transitions. The session store separates mutable interview state from route/API handling. Shared types and constants constrain the data exchanged among the UI, API, engine, and AI provider:
• src/lib/interview/constants.ts
• src/lib/interview/types.ts
AI Integration Boundary
AI generation/evaluation is isolated behind:
• src/lib/interview/ai-service.server.ts
• src/routes/api/interview.ts
The API route accepts browser requests, invokes the server-only interview engine, and returns session/interview results. Keeping AI access in .server.ts modules prevents provider credentials and model calls from entering client bundles. Prompt-related project guidance is also present in AI_PROMPTS.md.
Client Interaction and Presentation
The browser-side service encapsulates calls to the interview API:
• src/services/interview-api.ts
Interview-specific presentation components render candidate context and resulting assessment:
• src/components/interview/CandidateCard.tsx
• src/components/interview/CandidateProfile.tsx
• src/components/interview/FeedbackReport.tsx
These components sit above the shared UI component library in src/components/ui/, keeping domain views distinct from reusable controls.
Persistence, Auth, and Error Boundaries
Supabase integration provides typed client/server access and auth request attachment/middleware:
• src/integrations/supabase/client.ts
• src/integrations/supabase/client.server.ts
• src/integrations/supabase/auth-middleware.ts
Database schema changes are represented in:
• supabase/migrations/20260808063713_570c7932-53f8-4464-add9-0ac4ed07b7af.sql
Error capture and error-page behavior are centralized outside feature code:
• src/lib/error-capture.ts
• src/lib/error-page.ts
• src/lib/lovable-error-reporting.ts
Components 20
Application Runtime
- TanStack Start entry
src/start.ts - Server runtime
src/server.ts - Application router
src/router.tsx - Route manifest
src/routeTree.gen.ts
Browser UI
- Root layout
src/routes/__root.tsx - Dashboard & candidates
src/routes/candidates.tsx - Interview experience
src/routes/interview.tsx - Interview views · Candidate context and feedback presentation.
src/components/interview/FeedbackReport.tsx - Interview API client
src/services/interview-api.ts
Interview Domain
- Interview API endpoint
src/routes/api/interview.ts - Interview engine · Advances sessions, handles answers, and produces feedback state.
src/lib/interview/engine.server.ts - Session store · Holds mutable interview session state.
src/lib/interview/session-store.server.ts - Curriculum service
src/lib/interview/curriculum-service.ts - Curriculum data
src/data/curriculum.ts - Candidate data
src/data/candidates.ts - AI service · Keeps model calls and credentials out of browser bundles.
src/lib/interview/ai-service.server.ts
Platform Integrations
- Supabase auth middleware
src/integrations/supabase/auth-middleware.ts - Supabase clients · Separate browser and server clients.
src/integrations/supabase/client.server.ts - Supabase schema
supabase/migrations/20260808063713_570c7932-53f8-4464-add9-0ac4ed07b7af.sql - Error handling · Centralizes capture and error-page behavior.
src/lib/error-capture.ts
Connections 21
- TanStack Start entry → Server runtime: boots
- Server runtime → Supabase auth middleware: applies
- Server runtime → Application router: serves
- Application router → Route manifest: uses
- Route manifest → Root layout: registers
- Route manifest → Dashboard & candidates: registers
- Route manifest → Interview experience: registers
- Route manifest → Interview API endpoint: registers
- Dashboard & candidates → Candidate data: reads
- Interview experience → Candidate data: selects
- Interview experience → Interview views: renders
- Interview experience → Interview API client: calls
- Interview API client → Interview API endpoint: browser requests
- Interview API endpoint → Interview engine: invokes
- Interview engine → Session store: reads and updates
- Interview engine → Curriculum service: selects topics
- Curriculum service → Curriculum data: reads
- Interview engine → AI service: generates and evaluates
- Supabase auth middleware → Supabase clients: attaches auth
- Supabase clients → Supabase schema: accesses
- Root layout → Error handling: uses