AI-powered B2B lead generation built with Flask + Google Gemini. Users sign in, describe their offering, target client, and region, and the app returns 10 structured leads with a clean Excel download.
- Backend: Flask, Flask-Login, Flask-SQLAlchemy
- DB: SQLite (
leadforge.db, auto-created on first run) - AI: Google Gemini (
gemini-2.5-flash— free tier, no credit card) - Excel: openpyxl
- Frontend: HTML + Tailwind CSS via CDN
- Deploy: Render.com (free tier)
cd leadgen-ai
pip install -r requirements.txt
cp .env.example .env # then edit .env and set GEMINI_API_KEY
python app.pyOpen http://localhost:5000.
Get a free Gemini API key at https://aistudio.google.com/app/apikey
- Push this folder to a GitHub repo.
- In Render, create a new Web Service → "Use existing render.yaml".
- Set the
GEMINI_API_KEYenvironment variable in the Render dashboard. - Deploy. Render runs
gunicorn app:app.
leadgen-ai/
├── app.py
├── requirements.txt
├── render.yaml
├── .env.example
├── .gitignore
├── README.md
├── templates/
│ ├── login.html
│ ├── register.html
│ ├── dashboard.html
│ └── results.html
└── static/
| Route | Method | Purpose |
|---|---|---|
/ |
GET | Redirect to login or dashboard |
/login |
GET/POST | Sign in |
/register |
GET/POST | Create account |
/dashboard |
GET | Lead-generation form (auth) |
/generate |
POST | Call Gemini, store leads (auth) |
/results |
GET | Preview generated leads (auth) |
/download |
GET | Download leads as .xlsx (auth) |
/logout |
GET | Sign out |