How kotraharidutt/jd-agent works
Job Agent is a resume-to-job-description gap analyzer. A user submits resume text, target companies, role, and timeline; the agent structures the resume, searches and evaluates company job descriptions, then synthesizes priorities and actions for the report. The sampled source establishes the frontend-to-analysis API flow, validation, authentication, rate limiting, and OpenAI request handling. Some agent implementation is excerpted, so the graph limits internal stage links to the documented and visible workflow; no persistent product data store is evident.
Main entry points: analyze.ts Analyze endpoint · ReportPanel.tsx Report panel · jobAgent.ts Job agent · App.tsx App controller
Components 23
User interface
- App controller
src/App.tsx - Analysis inputs
src/components/InputPanel.tsx - Progress display
src/components/ProgressTracker.tsx - Report panel
src/components/ReportPanel/ReportPanel.tsx - Company gap cards
src/components/ReportPanel/CompanyCards.tsx - Company ranking
src/components/ReportPanel/CompanyRanking.tsx - Priority gaps
src/components/ReportPanel/PriorityGapsList.tsx - Today action
src/components/ReportPanel/TodayAction.tsx
Analysis workflow
- Job agent
src/agents/jobAgent.ts - Resume profiling
src/agents/jobAgent.ts - Company JD analysis
src/agents/jobAgent.ts - Cross-company synthesis
src/agents/jobAgent.ts - Validated LLM client
src/api/llmClient.ts
Data contracts
- Analysis schemas
src/schemas/index.ts - Request validation
src/schemas/analyzeRequest.ts
Analysis API
- Analyze endpoint
api/analyze.ts - API key check
api/middleware/auth.ts - Rate limiting
api/middleware/rateLimit.ts - Safe error handling
api/lib/errorHandler.ts - Server configuration
src/lib/config/env.ts
Other components
- Job seeker
- OpenAI Responses API
- Web search tool
Connections 26
- Job seeker → Analysis inputs: enters details
- Analysis inputs → App controller: submits analysis
- App controller → Job agent: runs workflow
- Job agent → App controller: returns report
- App controller → Progress display: updates status
- App controller → Report panel: provides report
- Report panel → Company gap cards: renders company gaps
- Report panel → Company ranking: renders ranking
- Report panel → Priority gaps: renders priorities
- Report panel → Today action: renders next action
- Job agent → Resume profiling: parses resume
- Job agent → Company JD analysis: analyzes companies
- Job agent → Cross-company synthesis: synthesizes reports
- Resume profiling → Validated LLM client: requests extraction
- Company JD analysis → Validated LLM client: requests JD analysis
- Cross-company synthesis → Validated LLM client: requests synthesis
- Validated LLM client → Analysis schemas: validates response
- Validated LLM client → Analyze endpoint: posts analysis request
- Analyze endpoint → API key check: checks API key
- Analyze endpoint → Rate limiting: checks client limit
- Analyze endpoint → Request validation: validates body
- Analyze endpoint → Server configuration: loads server settings
- Analyze endpoint → OpenAI Responses API: sends model request
- OpenAI Responses API → Analyze endpoint: returns response
- OpenAI Responses API → Web search tool: uses optional search
- Analyze endpoint → Safe error handling: sanitizes failures