This project is a resume generator that:
- Scrapes a job description (uses SerpAPI with fallback scraping)
- Parses uploaded resumes (PDF/DOCX)
- Calls an AI (OpenRouter online or local Ollama) to generate an ATS-optimized LaTeX resume
- Compiles/Previews LaTeX on the client using
latex.jsand previews viareact-pdf(subject to local tool compatibility)
Quick setup
- Install dependencies:
cd d:/cv-generator; npm install- Create
.envfrom.env.exampleand set keys:
SERPAPI_KEY— required for SerpAPI scrapingOPENROUTER_API_KEY— optional; if present, the app will use OpenRouter onlineOLLAMA_MODEL— optional; used when Ollama is running locally
OpenRouter mode
- Add
OPENROUTER_API_KEYto.env. The serverless/api/generateroute will call OpenRouter athttps://openrouter.ai/api/v1/chat/completions.
Ollama local mode
- Run Ollama locally (example):
ollama runor follow Ollama docs. The app will callhttp://localhost:11434/api/generateifOPENROUTER_API_KEYis not set.
SerpAPI usage
- Provide
SERPAPI_KEYin.env. The/api/scraperoute attempts SerpAPI first, then falls back to direct scraping.
LaTeX → PDF rendering
- The app generates LaTeX code. To create PDFs, compile the downloaded
.texfile with a LaTeX distribution like TeX Live or MiKTeX. - Client-side PDF preview is not implemented due to compatibility issues; use the LaTeX file with external tools.
Run the app
npm run dev
# then open http://localhost:3000 (or 3001 if port conflict)Notes
- This scaffold uses base64 file upload for serverless API routes.
- You may want to secure the SerpAPI and OpenRouter keys in production.
- The AI prompt is in
lib/aiGenerator.js. Tweak instructions for tone, length, or formatting. - PDF preview requires server-side LaTeX compilation (not implemented here).
- If no AI backend is configured, the app returns a sample LaTeX for testing.