AutoRef is an enterprise-grade, multi-tenant SaaS platform engineered to streamline and automate B2B/Job application outreach. It leverages Google Gemini LLMs to dynamically parse job descriptions and synthesize hyper-personalized referral emails based on the user's resume.
The platform integrates directly with the Gmail API (OAuth 2.0) for email dispatch and employs an intelligent event-driven background scheduler (APScheduler) for automated, multi-stage follow-up sequences and active reply detection.
This project demonstrates strong proficiency in Systems Architecture, Secure Authentication, Third-Party Integrations, and Asynchronous Processing.
AutoRef is built on a modern decoupled architecture, ensuring scalability, maintainability, and a clear separation of concerns between the presentation and data/processing layers.
graph TD
Client("💻 Next.js Client<br/>(React / Tailwind)")
subgraph FastAPI Backend
Auth("🔐 Auth Router<br/>(JWT / Google ID)")
API("⚡ REST API<br/>(Protected Endpoints)")
Scheduler("⏱️ APScheduler<br/>(Background Jobs)")
ORM("🗄️ SQLAlchemy<br/>(Data Access)")
end
subgraph External Services
Gemini("🧠 Google Gemini<br/>(LLM Engine)")
Gmail("📧 Gmail API<br/>(OAuth 2.0)")
GoogleAuth("👤 Google Identity<br/>(Sign-In)")
end
DB[("SQLite<br/>Database")]
Client <-->|Google ID Token| GoogleAuth
Client <-->|Login / Register| Auth
Client <-->|Bearer JWT| API
Auth <--> ORM
API <--> ORM
Scheduler <--> ORM
ORM <--> DB
API <-->|Prompt / Parse| Gemini
API <-->|Send Drafts| Gmail
Scheduler -.->|Auto-Send Follow-ups| Gmail
Scheduler -.->|Poll Inbox Replies| Gmail
- Robust Security: Implements JWT-based authentication with
bcryptpassword hashing and Google Sign-In (OAuth ID Tokens). - 3-Tier Dependency Injection: FastAPI routes are protected via a strictly typed dependency chain (
Authenticated → Approved → Admin). - Admin Gatekeeping: First-user bootstrap strategy auto-approves the admin; subsequent registrations enter a pending state until manually approved via the Admin Panel, strictly preventing platform abuse.
- Row-Level Isolation: 100% data isolation across tenants using strict
user_idforeign key scoping on all ORM queries.
- Semantic Parsing: Dynamically extracts Company, Role, and Skills from raw Job Description URLs/text.
- Role-Specific Prompt Engineering: Utilizes structured
role_configs(Backend/SDE, Fintech, Data Engineering) to instruct the LLM on which specific achievements to highlight from the user's profile, generating high-converting B2B copy.
- Intelligent Follow-ups:
APSchedulerorchestrates a stateful, multi-stage follow-up pipeline. - Rate-Limit Respecting: Jobs are naturally throttled (1 per minute) to respect Gmail API limits and prevent spam flagging.
- Idempotent Processing: Terminal states (
sent,failed,cancelled) ensure that transient network failures do not result in duplicate emails to recruiters.
- Event-Driven Polling: Periodically monitors the connected Gmail inbox.
- Reply Detection: Autonomously detects replies from external domains, updates the application thread state, and immediately halts pending follow-up jobs.
| Domain | Technologies |
|---|---|
| Frontend | Next.js 16, React, Tailwind CSS, Context API |
| Backend | FastAPI, Python 3, Pydantic, Passlib, python-jose |
| Database | SQLite, SQLAlchemy (ORM), Alembic |
| Background Jobs | APScheduler |
| Integrations | Google Gemini API, Gmail API, Google Sheets API |
To run AutoRef locally, spin up both the FastAPI backend and the Next.js frontend.
- Python 3.9+
- Node.js 18+
- Google Cloud Console Account (Gmail API enabled, OAuth 2.0 Credentials configured)
- Google Gemini API Key
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Configure Environment
cp .env.example .env
# --> Edit .env with your specific API Keys and JWT secrets
# Start the API Server (Auto-migrates DB on first run)
uvicorn main:app --reload --port 8000Open a new terminal window:
cd frontend
npm install
# Configure Environment
cp .env.example .env.local
# --> Edit .env.local with your backend URL and Google Client ID
# Start the Development Server
npm run devNavigate to http://localhost:3000 to access the application.
| Dashboard Analytics | Outreach Generator | Admin Access Control |
|---|---|---|
![]() |
![]() |
(Admin panel for user approval routing) |
| Target Engineering Domain | Resume Link |
|---|---|
| SDE / Backend Engineering | View PDF (Google Drive) |

