How itzv07/ats-resume-engine works
Purpose and Entry Points
This is a full-stack ATS resume analyzer and JD-specific resume builder. React mounts from src/main.tsx into the application coordinator in src/App.tsx. The Node/Express backend is server.ts, serving REST endpoints for document extraction, analysis, and optimized-resume generation.
Client Application Orchestration
src/App.tsx owns the user workflow and transitions between intake, analysis, editing/preview, comparison, and dashboard views. Shared contracts for resume profiles, ATS analysis, templates, and generation results belong in src/types.ts. UI is a browser SPA built with React, TypeScript, and Vite (vite.config.ts).
Resume and JD Intake
src/components/ResumeUploader.tsx accepts or displays source resume/JD content before requests are made. src/components/CandidateForm.tsx represents the structured candidate profile used for generation and user correction. Uploaded documents cross the browser/server boundary through the extraction API implemented in server.ts; extracted text becomes the canonical analysis input.
AI Analysis and Truthfulness Boundary
server.ts mediates all Gemini calls, keeping GEMINI_API_KEY server-side. Its analysis endpoint receives resume text plus a job description and returns structured ATS scoring, match breakdowns, missing requirements, keyword strategy, recommendations, and an extracted candidate profile. The fallback path in src/lib/fallbackAnalyzer.ts provides client-side/non-AI analysis behavior when needed. AI outputs are advisory and must remain grounded in candidate-provided facts.
Resume Generation Pipeline
Generation combines the candidate profile, original resume context, target JD, prior analysis, and a selected template. server.ts returns an optimized structured profile plus before/after scores, rationale, and highlighted changes. src/components/TemplateSelector.tsx chooses among definitions in src/data/templates.ts; src/components/ResumePreview.tsx renders the resulting editable, ATS-oriented document.
Review and Comparison Surfaces
src/components/AnalysisView.tsx presents compatibility and recommendations, supported by src/components/AtsScoreGauge.tsx for score visualization and src/components/ResumeKeywordInspector.tsx for keyword-focused review. src/components/ResumeDiffView.tsx compares original and generated resume outcomes, forming the user verification step before export.
Persistence, Identity, and Export
Session/history behavior is primarily browser-local, surfaced through src/components/DashboardView.tsx. Firebase is additionally wired through src/context/AuthContext.tsx, src/lib/firebase.ts, and src/lib/firestoreService.ts, with Firestore rules in firestore.rules; these form an optional authentication/cloud-data boundary rather than the core AI pipeline. src/utils/exportResume.ts turns the previewed resume into PDF/DOCX using client-side export libraries.
Runtime and External Services
Development and production are Node.js/Express plus Vite/React, configured through package.json, vite.config.ts, and server.ts. Google Gemini is the material external AI service. Firebase/Firestore configuration (firebase-applet-config.json, firebase-blueprint.json) supports auth/data integration. Environment setup is defined by .env.example, notably GEMINI_API_KEY and optional APP_URL.
Main entry points: App.tsx Application workflow · server.ts Extraction, analysis & generation API · ResumePreview.tsx Editable resume preview · ResumeUploader.tsx Resume & JD intake
Components 17
Browser SPA
React workflow, review, and export surfaces.
- React entry
src/main.tsx - Application workflow · Owns intake, analysis, editing, comparison, and dashboard transitions.
src/App.tsx - Shared contracts
src/types.ts - Resume & JD intake
src/components/ResumeUploader.tsx - Candidate profile editor
src/components/CandidateForm.tsx - Analysis review · Presents score, recommendations, and keyword review.
src/components/AnalysisView.tsx - Fallback analyzer · Non-AI analysis behavior when needed.
src/lib/fallbackAnalyzer.ts - Resume templates
src/data/templates.ts - Template selector
src/components/TemplateSelector.tsx - Editable resume preview · Renders the ATS-oriented generated document.
src/components/ResumePreview.tsx - Outcome comparison · Verification before export.
src/components/ResumeDiffView.tsx - Session history dashboard · Primarily browser-local session and history behavior.
src/components/DashboardView.tsx - PDF/DOCX export
src/utils/exportResume.ts
Node API
Document, analysis, and generation boundary.
- Extraction, analysis & generation API · Keeps Gemini credentials server-side and grounds AI output in candidate facts.
server.ts
Optional Cloud Services
Authentication and cloud persistence integration.
- Firebase auth context
src/context/AuthContext.tsx - Firestore service · Optional cloud-data boundary.
src/lib/firestoreService.ts
Other components
- Google Gemini
Connections 21
- React entry → Application workflow: mounts
- Application workflow → Shared contracts: uses
- Application workflow → Resume & JD intake: intake flow
- Application workflow → Candidate profile editor: corrects profile
- Application workflow → Analysis review: shows analysis
- Application workflow → Template selector: selects template
- Application workflow → Editable resume preview: edits and previews
- Application workflow → Outcome comparison: verifies result
- Application workflow → Session history dashboard: shows history
- Resume & JD intake → Extraction, analysis & generation API: uploads documents
- Extraction, analysis & generation API → Application workflow: extracted text and analysis
- Application workflow → Fallback analyzer: fallback when needed
- Analysis review → Editable resume preview: informs revisions
- Template selector → Resume templates: loads definitions
- Candidate profile editor → Extraction, analysis & generation API: generation input
- Resume templates → Extraction, analysis & generation API: selected template context
- Extraction, analysis & generation API → Google Gemini: analysis and optimization
- Editable resume preview → Outcome comparison: generated resume
- Editable resume preview → PDF/DOCX export: exports document
- Application workflow → Firebase auth context: optional identity
- Firebase auth context → Firestore service: optional cloud data