Paste a job listing URL. Get a personalised cold email in seconds.
π Live Demo β’ βοΈ Setup β’ π Deploy β’ π Docs
MailForge is a full-stack AI application that automates B2B cold email outreach.
When a company posts a job listing, it signals a need β they're hiring because they have a gap. MailForge reads that signal, extracts what they need, and writes a targeted cold email offering your services. No copy-pasting. No manual research. Just a URL and a send-ready email.
Business Use Case: A software consulting firm wants to pitch to Nike, who just posted a job for a Machine Learning Engineer. Instead of writing from scratch, a sales executive pastes the URL into MailForge β and gets a personalised outreach email with matched portfolio links in seconds.
| Feature | Description |
|---|---|
| π URL-to-Email Pipeline | Paste any job listing URL β get a send-ready cold email |
| π€ AI Extraction | LLaMA 3.1 extracts role, skills, experience, and description as structured JSON |
| π Portfolio Matching | Automatically matches your portfolio projects to the job's required skills |
| π 3-Strategy Scraping | Requests β Selenium β WebBaseLoader fallback chain for maximum compatibility |
| βοΈ Company Settings | Fully customisable sender name, company, and description β persisted in session |
| π¨ Premium Dark UI | Multi-page SaaS-level interface with smooth page transitions and micro-interactions |
| π Secure by Design | API keys backend-only, CORS restricted, input validation via Pydantic |
| π Live API Status | Real-time backend health indicator in the sidebar |
| π Copy & Download | One-click copy or download of every generated email |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER BROWSER β
β (Vercel Β· Static Frontend) β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β HTTPS POST /api/generate
ββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β FASTAPI BACKEND β
β (Render Β· Python API) β
β β
β βββββββββββββββ ββββββββββββββββββββ βββββββββββββββ β
β β Scraper ββββΆβ LLM Service ββββΆβ Portfolio β β
β β β β β β Service β β
β β 1. requests β β 1. Extract jobs β β β β
β β 2. Selenium β β (JSON output) β β Keyword β β
β β 3. Loader β β 2. Write email β β matching vs β β
β βββββββββββββββ ββββββββββ¬ββββββββββ β portfolio β β
β β β CSV β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LLM API call
βββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β GROQ API β
β LLaMA 3.1 8B Instant β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Step-by-step flow:
- User pastes a job listing URL and clicks Generate Email
- Frontend sends
POST /api/generateto the FastAPI backend - Backend scrapes the page (tries 3 strategies for maximum reliability)
- Raw HTML is cleaned and truncated to fit the LLM context window
- LLaMA 3.1 extracts structured job data (role, skills, experience, description)
- Job skills are matched against
data/portfolio.csvto find the most relevant projects - LLaMA 3.1 writes a personalised cold email referencing the job and matched portfolio
- The email, job details, and portfolio links are returned to the frontend
- User copies or downloads the result
The core workspace. Paste a URL, hit Generate, and watch the AI pipeline run in real time. Results show extracted job details on the left and the generated email on the right.
Configure your company name, your name, description, and optional portfolio link overrides. Settings persist in session storage β set once, use everywhere.
Step-by-step how-it-works guide, prerequisites checklist, and a troubleshooting reference table.
| Tech | Purpose |
|---|---|
| Vanilla JS (ES2022) | Client-side logic, routing, API calls |
| HTML5 / CSS3 | Markup and premium dark UI styling |
| Syne + Instrument Serif | Typography (Google Fonts) |
| Font Awesome 6 | Icons |
| Tech | Purpose |
|---|---|
| FastAPI | REST API framework with automatic docs |
| Pydantic v2 | Request/response validation |
| Uvicorn | ASGI server |
| LangChain 0.2 | LLM orchestration and prompt chaining |
| LangChain-Groq | Groq API integration |
| Requests + Selenium | Web scraping (strategy 1 & 2) |
| WebBaseLoader | Web scraping fallback (strategy 3) |
| Pandas | Portfolio CSV parsing |
| python-dotenv | Environment variable management |
| Tech | Purpose |
|---|---|
| Groq | Ultra-fast LLM inference API |
| LLaMA 3.1 8B Instant | Job extraction + email generation |
| Tech | Purpose |
|---|---|
| Vercel | Frontend hosting (static files) |
| Render | Backend hosting (Python/FastAPI) |
| GitHub | Source control + CI trigger |
- Python 3.11+
- A free Groq API key β console.groq.com/keys
git clone https://github.com/SamridhiiiGupta/MailForge--AI_Powered_Cold_Email_Generator.git
cd mailforge# Windows
py -3.11 -m venv venv
venv\Scripts\activate
# macOS / Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtcp .env.example .envOpen .env and fill in at minimum:
GROQ_API_KEY=your_key_here
COMPANY_NAME=Your Company
FOUNDER_NAME=Your NameEdit data/portfolio.csv with your real project links:
Techstack,Links
"Python, Django, FastAPI",https://github.com/you/your-project
"Machine Learning, TensorFlow",https://your-ml-project.com# Single command β starts both API + frontend + opens browser
python run.py| Service | URL |
|---|---|
| Frontend | http://localhost:8080 |
| API | http://localhost:8000 |
| API Docs | http://localhost:8000/docs |
MailForge uses a Vercel + Render split deployment:
- Frontend (HTML/CSS/JS) β Vercel β free, instant, zero config
- Backend (FastAPI) β Render β free tier, Python support, auto-deploys
git init
git add .
git commit -m "feat: initial MailForge commit"
git branch -M main
git remote add origin https://github.com/SamridhiiiGupta/MailForge--AI_Powered_Cold_Email_Generator.git
git push -u origin main- Go to render.com β New + β Web Service
- Connect your GitHub repo
- Render detects
render.yamlautomatically β click Apply - Add environment variables in the Render dashboard:
GROQ_API_KEYβ your Groq keyALLOWED_ORIGINSβ (fill in after Step 3)
- Click Deploy β copy the URL:
https://mailforge-jble.onrender.com
Open frontend/config.js and replace the placeholder:
window.MAILFORGE_CONFIG = {
API_URL: "https://mailforge-jble.onrender.com" // β your actual Render URL
};Then commit and push:
git add frontend/config.js
git commit -m "config: set production API URL"
git push- Go to vercel.com β Add New Project
- Import your GitHub repo
- Vercel detects
vercel.jsonβ no config needed - Click Deploy β copy the URL:
https://mailforge-ai-powered-cold-email-gen-lake.vercel.app
Go to Render dashboard β your service β Environment and update:
ALLOWED_ORIGINS = https://mailforge-ai-powered-cold-email-gen-lake.vercel.app
Click Save β Render redeploys automatically. β
pytest
# or with coverage:
pytest --cov=app --cov-report=term-missingExpected: 15 tests passing
- ChromaDB vector search β replace keyword matching with semantic portfolio search
- Multi-job support β generate emails for all jobs found on a page
- Email history β save and revisit previously generated emails
- Tone selector β formal / casual / aggressive outreach styles
- Export to Gmail/Outlook β one-click mailto or OAuth send
- Analytics dashboard β track which emails got responses
Full technical documentation available in docs/MailForge_Documentation.docx
GitHub Repository: SamridhiiiGupta/MailForge--AI_Powered_Cold_Email_Generator
MIT β see LICENSE.
Built with β and LLaMA 3.1 by Samridhi Gupta


