# ResumeLens ResumeLens is a web app that grades a resume against a job description. - Backend: Go HTTP API (`/api/analyze`) - Frontend: React + Vite - AI provider: OpenAI (server-side only) ## What the project does 1. Accepts a PDF resume upload and job description text. 2. Extracts text from the PDF on the backend. 3. Sends resume text + job description to the LLM. 4. Returns structured JSON with score and feedback. ## Tech stack - Go 1.25.x - Node 20+ - React 19 + Vite 7 - Docker + Docker Compose (optional) ## Prerequisites - `go` installed - `node` and `npm` installed - `OPENAI_API_KEY` set for real analysis calls Example: ```bash export OPENAI_API_KEY="your_key_here" ``` ## Run locally ### 1) Start backend API From repo root: ```bash go run ./cmd/server ``` Backend listens on `http://localhost:3000`. ### 2) Start frontend In another terminal: ```bash cd web npm ci npm run dev ``` Frontend runs on Vite default port (usually `http://localhost:5173`). By default in development, frontend calls backend at `http://localhost:3000`. ## Run with Docker Compose From repo root: ```bash docker compose up --build ``` - Frontend is exposed at `http://localhost:3005` - Frontend proxies `/api` traffic to the backend container - Backend uses values from root `.env` ## API contract `POST /api/analyze` with `multipart/form-data`: - `resume`: PDF file - `job_description`: plain text Returns JSON analysis result. Notes: - Request size is capped at 10 MB. - Rate limit is 10 analyze requests per hour per IP. ## Tests Run all default Go tests: ```bash go test ./... ``` Run tests with race detector: ```bash go test -race ./... ``` There is an opt-in live OpenAI consistency test. It is skipped by default. ```bash RUN_LIVE_OPENAI_TESTS=1 OPENAI_API_KEY="your_key_here" go test ./internal/services -run TestCallLLM_Live_ScoreConsistencyPlusMinus10 -v ``` Frontend checks: ```bash cd web npm run lint npm run build ``` ## Handoff notes - Verification strategy doc: `doc/verification-strategy.md` - Main backend entrypoint: `cmd/server/main.go` - API route mount: `internal/api/routes.go` - Analyze handler: `internal/handlers/analyze.go` - LLM service: `internal/services/analyzer.go` If analysis fails in a fresh environment, first check that `OPENAI_API_KEY` is set in the backend process environment.