How justmeetpatel/airesume works
Project type and purpose
• This is a full‑stack AI‑powered Resume Builder & ATS Checker.
• Frontend: Next.js 13 “App Router” with TypeScript and Tailwind CSS.
• Backend/API: Primarily implemented as Next.js API routes (app/api) plus an external Python FastAPI service (port 8000) that hosts the AI/ML resume analysis engine.
• Persistence: PostgreSQL (accessed via Prisma ORM).
• Auth: Custom auth machinery in app/api/auth (could optionally integrate Supabase or Auth.js).
File structure
Top‑level directories
• app/
– UI pages (home, FAQ, resume builder, resume checker)
– (auth)/ subfolder with sign‑in, sign‑up, reset/forgot flows
– API routes under app/api/auth/[...all]/route.ts and app/api/resume/route.ts
– Global layouts and CSS
• components/ & components/ui/
– Reusable React components and low‑level UI primitives (accordion, button, dialog, etc.)
• lib/
– Business logic and utilities: auth.ts, session.ts, resume.ts, prisma.ts, utils.ts
• prisma/
– Database schema and migrations
• hooks/
– Custom React hooks (use-mobile, use-toast)
• Config files: next.config.mjs, tailwind.config.ts, tsconfig.json, lock files
README for additional insights
• Confirms separation of frontend (Next.js) and AI backend (FastAPI).
• Mentions AI model endpoints (e.g. POST /analyze).
• Suggests local development endpoints: Next.js on :3000, FastAPI on :8000.
• Describes tech stack layers.
Main components & relationships
A. End‑User Browser (Chrome/Firefox)
– Interacts with Next.js frontend over HTTPS (port 3000).
B. Next.js Frontend (React, Tailwind)
– SSR/SSG of UI pages (app/page.tsx, layouts)
– Client‑side hydration & real‑time preview
C. Next.js API Layer (app/api)
1. Auth routes (/api/auth/*): sign‑in, sign‑up, password reset
2. Resume routes (/api/resume): create, save, fetch resume data
– These handlers call into lib/auth.ts, lib/session.ts, lib/resume.ts and into Prisma client (lib/prisma.ts)
D. Database (PostgreSQL)
– Holds user accounts, sessions, resume records
– Accessed by Prisma ORM from Node
E. External AI Service (Python FastAPI on port 8000)
– Exposes endpoints like /analyze
– Runs NLP/ML models for ATS scoring, keyword extraction, feedback generation
– Deployed as a separate microservice (could be dockerized)
F. (Optional) External Auth Provider
– Supabase or Auth.js / OAuth flows if integrated
1. Browser → Next.js Frontend: page requests, form submissions
2. Frontend → Next.js API: fetch calls for auth and resume CRUD
3. Next.js API → PostgreSQL: read/write via Prisma
4. Next.js API (or directly frontend) → FastAPI AI Service: POST resume text → get ATS score & feedback
5. Responses propagate back to frontend → rendered in UI
Architectural patterns and design principles
• Layered architecture: UI layer (React) → API/Service layer (Next.js API + FastAPI) → Data layer (DB)
• Microservices for AI logic (separation of concerns, independent scaling)
• React “App Router” for file‑based routing and layout composition
• Use of Prisma migrations ensures schema evolution is version‑controlled
• Modular UI primitives in components/ui promote reuse and consistent styling
Capturing essential details
• Be granular: separate out Auth API vs. Resume API vs. AI Service
• Asynchronous flows (e.g., file uploads, AI analysis)
• Data stores and indicate which service writes or reads from them
• Don’t overthink—focus on clear separation of concerns and the main request paths