How phanvyvan/resume-ai works
Project Type and Purpose
• Full-stack web application for resume analysis, job-description matching, and mock interviews.
• Frontend: React + TypeScript + Vite; Backend: Java Spring Boot; External AI: Google Gemini.
• Users upload CVs or paste text, get AI-driven insights and interview questions.
File Structure and Architectural Patterns
• Top level: two separate modules—frontend/ and backend/—deployed independently.
• Frontend follows a component-based structure (pages, UI components, hooks, services).
• Backend uses a classic Spring Boot layered MVC:
• Controllers (controller/) expose REST endpoints under /api/resume/*.
• Services (service/) implement business logic: file parsing, AI calls, question generation.
• Models/DTOs (model/, dto/) represent domain data and payloads.
• Config (config/) holds Web CORS and other settings.
Key Components to Illustrate
• Frontend
• UI layer: Pages (Upload, Evaluation, MockInterview, etc.)
• Component library: Shadcn/UI + Tailwind
• API client: services/geminiApi.ts → points to http://localhost:8080/api
• Backend
• REST API Gateway (Spring MVC)
• DocumentParserService (uses Apache POI/PDFBox)
• GeminiClient (wraps Google Gemini AI calls)
• MockInterviewService (generates Q&A based on CV/JD)
• JobMatchService (computes match score via Gemini)
• External Services
• Google Gemini AI (model: gemini-2.0-flash)
• Data Flow
1. User uploads file / submits text → Frontend calls /api/resume/upload or /api/resume/analyze-text.
2. Backend DocumentParserService extracts text.
3. GeminiClient sends text to Gemini AI.
4. AI responses processed into DTOs (ResumeAnalysisDTO, GradingResultDTO, InterviewQuestionDTO).
5. Frontend displays results or mock interview UI (timer, recording).
Relationships & Interactions
[Browser/React App] → [Spring Boot API] → [Gemini AI] → back to API → [React App]
• CORS boundary between frontend (port 5173/8081) and backend (port 8080).
Architectural Patterns & Principles
• Layered Architecture on the server (Controller → Service → Model/DTO).
• Component-based, mobile-first design on the client.
• Single-page application (SPA) with client-side routing (React Router).
• Clean separation of concerns: parsing, AI integration, presentation.
Essential Elements
• Clear component boundaries (Frontend vs. Backend vs. External).
• Inline notes on key frameworks (React, Spring Boot, Apache POI, PDFBox, Gemini AI).