How sigmaharsh/job-resume-analyzer works
Project Type and Purpose
• This is a full-stack web application (“Resume-Job Matcher”) that lets users upload resumes and job descriptions, parses them, and uses AI to compute match percentages, identify matched/missing skills, and suggest improvements.
File Structure Analysis
• Top-level files:
• server.js – Node.js + Express server, defines API endpoints and serves the frontend.
• README.md – project documentation.
• .gitignore – VCS ignore rules.
• Directories:
• public/index.html – static frontend interface (HTML, Tailwind CSS, Alpine.js).
• uploads/ (documented in README, though not shown in file tree) – temporary file store for resume/job uploads.
• Config:
• .env (holds GEMINI_API_KEY, PORT)
• package.json – dependencies (Express, pdf-parse, mammoth, @google-ai libraries, etc.)
Key Architecture Insights from README
• Frontend: static assets served by Express.
• Backend: Express routes: GET “/” for UI, POST “/analyze” for processing.
• Document Parsing: pdf-parse + mammoth.
• AI Analysis: external Google Gemini Flash 2.0 API.
• No persistent database; uses ephemeral “uploads/” folder.
Main Components
a. Frontend Client (Browser)
• Renders public/index.html, handles file selection and “Analyze Match” button.
• Tech: HTML + Tailwind + Alpine.js.
b. Web Server (Express.js)
• Serves static assets.
• Receives multipart/form-data at POST /analyze.
c. File Storage (uploads/)
• Temp storage of resume.docx, jobDesc.pdf.
d. Parsing Layer
• pdf-parse for PDFs, mammoth for DOC/DOCX.
• Outputs plain text for each document.
e. AI Analysis Service (External)
• Google Gemini API: takes parsed text pair, returns analysis JSON (match %, skills lists, tips).
f. Response Formatter
• Server formats AI response and sends JSON back to client.
g. Client UI Renderer
• JavaScript interprets JSON, displays match percentage, highlights skills, improvement tips.
Architectural Patterns and Principles
• Separation of Concerns: static UI vs. API logic vs. parsing vs. AI calls.
• Single Responsibility: each module handles one task (file I/O, parsing, AI, formatting).
• Layered Architecture: Presentation (Browser), API layer (Express), Business Logic (parsing + AI), External Services.
Essential Elements
• Annotations: Ports (e.g., 3001), API endpoints (/analyze).
• Environment: note .env for API key.