Generate personalized cover letters from your resume and job postings using AI.
- Parse PDF resumes; scrape job URLs (Playwright) or paste/upload job text
- Gemini generates structured letter sections; LaTeX → PDF (optional logo)
- Edit via chat (natural language); guardrail blocks off-topic requests
Job input (URL/text/PDF) + resume PDF → scrape/parse → Gemini (sections) → inject into LaTeX template → pdflatex → PDF. User can edit in UI or ask for changes in chat; edits go through a guardrail, then Gemini returns revised sections; diff and recompile without another scrape.
- Frontend: Next.js, TypeScript, Tailwind.
frontend/. API routes proxy to backend. - Backend: FastAPI,
backend/. LangChain for orchestration (generate, edit, guardrail). Optional AWS RDS (Postgres + pgvector) for template storage. BearerAPI_KEY; CORS viaCORS_ORIGINS.
Backend modules: api.py — routes, LaTeX build, PDF compile. main.py — generate, edit, guardrail (Gemini). scraper.py — Playwright. resume_parser.py — PDF text. database.py — AWS RDS + pgvector (optional).
Routes: POST /generate (resume + job → PDF + sections), POST /compile (sections → PDF), POST /edit (instruction + sections → proposed sections or guardrail message), POST /latex (sections → LaTeX), GET /health.
tailored/
├── frontend/ # Next.js, app/api, components, lib
├── backend/ # api.py, main.py, scraper.py, resume_parser.py, database.py,
│ # cover_letter_template.tex, Dockerfile, requirements.txt
└── README.md
Prereqs: Node 18+, Python 3.10+, pdflatex, Gemini API key.
Backend: cd backend && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt && playwright install chromium. Add .env with GEMINI_API_KEY=.... Run: uvicorn api:app --reload --port 8000.
Frontend: cd frontend && npm install && npm run dev. App at http://localhost:3000.
| Variable | Description |
|---|---|
GEMINI_API_KEY |
Required for generate/edit. |
API_KEY |
Optional; Bearer auth on protected routes. |
CORS_ORIGINS |
Optional; comma-separated origins. |
RDS_* |
Optional; AWS RDS Postgres + pgvector (database.py). |
Backend: Docker + AWS ECS/Fargate (see Dockerfile).
- pdflatex missing:
brew install --cask basictextheneval "$(/usr/libexec/path_helper)". - Blank PDF / fonts:
sudo tlmgr update --self && sudo tlmgr install lmodern. - Scraper: Slow or missing content → raw page text still sent to AI.