How abhay-2309/hireez works
Project type and purpose
• This is a full-stack, server-rendered React/Next.js 14 application (“app/” directory) that serves as an AI-powered recruitment platform.
• It combines UI pages, serverless API routes, database access via Supabase, AI integrations (Hugging Face, Vapi AI), and email services.
File structure
• “app/” holds all Next.js page routes and API route handlers (app/api/proxy/route.ts).
• “components/” contains shared UI and feature components (AuthProvider, DashboardLayout, chat & interview widgets, Shadcn UI primitives).
• “lib/” includes wrappers for Supabase, AI calls (ai.ts, vapi.ts), email logic and utilities.
• “supabase/” holds database migrations; Supabase is both DB and file storage.
• Root config files: next.config.js, tailwind.config.ts, tsconfig.json, middleware.ts for global edge logic.
• “hooks/” and “types/” supplement data flow and typings.
Extract architectural insights from README
• Data flows from Recruiter Dashboard → Resume parsing (Hugging Face API) → Supabase.
• Recruiters create interview configs stored in Supabase; secure links are emailed.
• Candidates submit forms (Supabase) or take AI-driven interviews (Vapi AI + Hugging Face scoring + Webhooks).
• Results (form responses, recordings, scores) persist in Supabase and feed back to the Recruiter Review Dashboard.
Main components
a. Frontend (Next.js 14)
• Pages (app/**) rendered server-side or client-side.
• React Context for auth and state.
• UI components (Shadcn UI + custom).
b. API/Backend (Next.js serverless functions & Lib)
• API route: resume parsing proxy, interview webhooks.
• Lib modules wrap Supabase SDK, AI service calls, email.
c. Database & Storage (Supabase)
• Postgres tables (interview_configs, interview_links, candidate_forms, candidate_emails, etc.).
• Supabase Storage for video/audio files.
d. External AI Services
• Hugging Face API for resume analysis and scoring.
• Vapi AI for interview orchestration and recording.
• Webhook endpoints back into Next.js API.
e. Email Service
• Nodemailer / Resend / EmailJS integration via lib/email.ts.
f. Third-party Clients
• Recruiter’s browser.
• Candidate’s browser.
g. CI/CD & Hosting (implied: Vercel)
Relationships and interactions
• Client → Next.js frontend pages.
• Frontend → Next.js API routes (e.g. /api/proxy).
• API routes/lib → Supabase (queries, file uploads) and external AI/email services.
• External services → Webhooks → Next.js API → Supabase.
• Supabase → Frontend via lib/supabase.ts for dashboard metrics, form data, recordings.
Architectural patterns and design principles
• Monolithic serverless architecture using Next.js “app” directory.
• Layered separation: UI layer, API layer, data layer, external integrations.
• Context-based state management for authentication and toast notifications.
• Modular components for reusability (Shadcn UI primitives).
• Edge middleware for authentication/redirects.