Skip to content

AI powered resume analyzer using FastAPI, LangChain & Groq

Notifications You must be signed in to change notification settings

prateekmtri/Resume-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“„ JobAI – AI-Powered Resume & Email Assistant Platform

JobAI Banner

A full-stack intelligent AI-powered platform with Authentication, Resume Scanner, and Professional Email Writer built with FastAPI, LangChain, Groq LLM, Next.js, and SQLite

FastAPI Next.js LangChain Groq SQLite

Live Demo β€’ Report Bug β€’ Request Feature


🌟 Overview

JobAI is a production-ready, full-stack career assistance platform that combines User Authentication, Resume Scanner, and Email Writer tools. Using Retrieval-Augmented Generation (RAG) and advanced AI, it provides secure, intelligent resume analysis and generates professional job application emails. Perfect for students, job seekers, and recruiters looking to leverage AI for career advancement.

✨ Key Features

πŸ” User Authentication

  • πŸ”’ Secure Sign Up & Login - JWT-based authentication
  • πŸ‘€ User Profiles - Personalized user experience
  • πŸ—„οΈ SQLite Database - Reliable data persistence
  • πŸ›‘οΈ Protected Routes - Secure access to AI features

πŸ“„ Resume Scanner

  • πŸ“€ Upload Resume - Support for PDF format
  • πŸ€– AI-Powered Analysis - Intelligent skill extraction and profiling
  • πŸ“Š Experience Summary - Automated career progression analysis
  • 🎯 RAG Architecture - Context-aware understanding using vector embeddings
  • πŸ’‘ Actionable Feedback - Personalized recommendations for improvement

βœ‰οΈ Email Writer

  • ✍️ Professional Email Generation - AI-crafted job application emails
  • 🎨 Customizable Tone - Choose between Professional, Friendly, or Formal
  • πŸ“ Adjustable Length - Short, Medium, or Long format options
  • ⚑ Instant Generation - Get perfectly formatted emails in seconds
  • 🎯 Purpose-Driven - Tailored for job applications, follow-ups, and HR communication

⚑ Core Technology

  • πŸš€ Lightning Fast - Powered by Groq LLaMA 3.3 (70B parameters)
  • 🎨 Modern UI - Beautiful Next.js interface with Tailwind CSS
  • πŸ”’ Secure & Private - Your data stays protected with authentication

πŸ—οΈ Architecture

graph TB
    A[User] -->|Sign Up/Login| B[Next.js Frontend]
    B -->|Authentication| C[FastAPI Backend]
    C -->|Verify JWT| D[SQLite Database]
    
    subgraph Authentication Flow
    C -->|Store User Data| D
    D -->|Return JWT Token| C
    end
    
    subgraph Resume Scanner Flow
    C -->|Extract Text| E[PyPDF]
    E -->|Chunk Text| F[LangChain]
    F -->|Generate Embeddings| G[HuggingFace]
    G -->|Store Vectors| H[ChromaDB]
    H -->|Retrieve Context| I[Groq LLM]
    end
    
    subgraph Email Writer Flow
    C -->|Process Request| J[Email Generator]
    J -->|AI Prompt| I
    end
    
    I -->|AI Response| B
Loading

πŸ”„ How It Works

Authentication Flow

  1. Sign Up β†’ User creates account with credentials
  2. Store β†’ User data saved in SQLite database
  3. Login β†’ User authenticates with email/password
  4. JWT Token β†’ Server generates and returns JWT token
  5. Protected Access β†’ Token required for Resume Scanner & Email Writer

Resume Scanner Flow

  1. Upload β†’ Authenticated user uploads resume (PDF format)
  2. Extract β†’ Resume converted to text using PyPDF
  3. Chunk β†’ Text split into semantic chunks
  4. Embed β†’ Chunks converted to vector embeddings
  5. Store β†’ Vectors stored in ChromaDB
  6. Query β†’ User query sent to Groq LLM
  7. Retrieve β†’ Relevant chunks retrieved from vector DB
  8. Generate β†’ AI generates detailed feedback

Email Writer Flow

  1. Input β†’ Authenticated user provides email topic and preferences
  2. Customize β†’ Select tone (Professional/Friendly/Formal) and length
  3. Generate β†’ AI crafts personalized professional email
  4. Review β†’ User reviews and copies the generated email
  5. Send β†’ Ready-to-send professional job application email

πŸ› οΈ Tech Stack

Backend

  • Framework: FastAPI
  • Database: SQLite
  • Authentication: JWT (JSON Web Tokens)
  • LLM: Groq (LLaMA 3.3 70B)
  • RAG Framework: LangChain
  • Vector Database: ChromaDB
  • Embeddings: HuggingFace (all-MiniLM-L6-v2)
  • PDF Parser: PyPDF
  • Email Generation: Custom AI Pipeline
  • Architecture: Clean layered architecture (API, Services, Models, Schemas)

Frontend

  • Framework: Next.js 14
  • Styling: Tailwind CSS
  • Language: JavaScript/TypeScript
  • HTTP Client: Fetch API
  • UI Components: Custom React Components
  • State Management: React Hooks
  • Authentication UI: Custom Login/Signup Forms
  • Protected Routes: Next.js Middleware

πŸ“Έ Screenshots

πŸ” Authentication - Sign Up

Sign Up Page Secure user registration with clean, modern UI

πŸ”‘ Authentication - Login

Login Page Simple and secure login interface

🏠 Home Page

Home Page Landing page with feature overview

πŸ“€ Resume Scanner - Upload Interface

Upload Interface Drag-and-drop resume upload with real-time processing

πŸ€– Resume Scanner - AI Analysis Results

Results Page Comprehensive AI-powered resume feedback

βœ‰οΈ Email Writer - Professional Email Generation

Email Writer Intelligent email generation with customizable options


πŸ“¦ Project Structure

JobAI/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   └── v1/
β”‚   β”‚   β”‚       β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚       └── endpoints/
β”‚   β”‚   β”‚           β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚           β”œβ”€β”€ auth.py              # Authentication endpoints
β”‚   β”‚   β”‚           β”œβ”€β”€ resume.py            # Resume upload endpoint
β”‚   β”‚   β”‚           └── email.py             # Email generation endpoint
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ core/                            # Core configurations
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ security.py                  # JWT & password hashing
β”‚   β”‚   β”‚   └── config.py                    # App configuration
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ db/                              # Database utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ database.py                  # SQLite connection
β”‚   β”‚   β”‚   └── session.py                   # Database sessions
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ langchain/                       # LangChain modules
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   └── resume_analyzer.py           # RAG pipeline logic
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ models/                          # Database models
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   └── user.py                      # User model (SQLAlchemy)
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ schemas/                         # Pydantic schemas
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ user.py                      # User request/response schemas
β”‚   β”‚   β”‚   └── email.py                     # Email request/response schemas
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ services/                        # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ auth_service.py              # Authentication logic
β”‚   β”‚   β”‚   β”œβ”€β”€ resume_service.py            # Resume processing service
β”‚   β”‚   β”‚   └── email_service.py             # Email generation service
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   └── main.py                          # FastAPI application entry
β”‚   β”‚
β”‚   β”œβ”€β”€ temp/                                # Temporary file storage
β”‚   β”œβ”€β”€ chroma_db/                           # Vector database storage
β”‚   β”œβ”€β”€ jobai.db                             # SQLite database file
β”‚   β”œβ”€β”€ requirements.txt                     # Python dependencies
β”‚   └── .env                                 # Environment variables
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ authentication/                  # Authentication pages
β”‚   β”‚   β”‚   β”œβ”€β”€ login/
β”‚   β”‚   β”‚   β”‚   └── page.js                 # Login page
β”‚   β”‚   β”‚   └── signup/
β”‚   β”‚   β”‚       └── page.js                 # Sign up page
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ components/                      # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.js                   # Navigation bar
β”‚   β”‚   β”‚   β”œβ”€β”€ ProtectedRoute.js           # Route protection
β”‚   β”‚   β”‚   └── AuthForm.js                 # Reusable auth form
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ email-writer/
β”‚   β”‚   β”‚   └── page.js                     # Email Writer page
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ resume-screener/
β”‚   β”‚   β”‚   └── page.js                     # Resume Scanner page
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”‚   β”œβ”€β”€ globals.css                      # Global styles
β”‚   β”‚   β”œβ”€β”€ layout.js                        # Root layout
β”‚   β”‚   └── page.js                          # Home page
β”‚   β”‚
β”‚   β”œβ”€β”€ node_modules/                        # Dependencies
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── screenshots/                     # Project screenshots
β”‚   β”‚
β”‚   β”œβ”€β”€ .env
β”‚   β”œβ”€β”€ .gitignore
β”‚   β”œβ”€β”€ jsconfig.json
β”‚   β”œβ”€β”€ next.config.mjs
β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ postcss.config.mjs
β”‚   └── README.md
β”‚
β”œβ”€β”€ venv/                                    # Python virtual environment
β”œβ”€β”€ .env
β”œβ”€β”€ .gitignore
└── README.md                                # This file

πŸš€ Getting Started

Prerequisites

  • Python 3.9+
  • Node.js 18+
  • npm or yarn
  • Groq API Key (Get it here)

1️⃣ Clone Repository

git clone https://github.com/prateekmtri/Resume-Scanner.git
cd Resume-Scanner

2️⃣ Backend Setup

# Navigate to backend
cd backend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Install LangChain HuggingFace (for embeddings)
pip install -U langchain-huggingface

Configure Environment Variables:

Create .env file in backend/ directory:

# Groq API Configuration
GROQ_API_KEY=your_groq_api_key_here

# JWT Secret Key (generate a strong random key)
SECRET_KEY=your_super_secret_jwt_key_here
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30

# Database Configuration
DATABASE_URL=sqlite:///./jobai.db

Create Required Folders:

# Create temp folder for file uploads
mkdir temp

# ChromaDB and SQLite database folders will be created automatically

Initialize Database:

# Run the application once to create database tables
python -m app.main

Run Backend Server:

uvicorn app.main:app --reload

Backend runs at: http://127.0.0.1:8000 πŸŽ‰

3️⃣ Frontend Setup

# Open new terminal and navigate to frontend
cd frontend

# Install dependencies
npm install

# Configure environment variables
# Create .env.local file in frontend directory
echo "NEXT_PUBLIC_API_URL=http://127.0.0.1:8000" > .env.local

# Run development server
npm run dev

Frontend runs at: http://localhost:3000 πŸŽ‰


πŸ”Œ API Documentation

Authentication Endpoints

Sign Up

POST /api/v1/auth/signup

Create a new user account.

Request:

{
  "email": "user@example.com",
  "password": "SecurePassword123",
  "full_name": "John Doe"
}

Response:

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer",
  "user": {
    "id": 1,
    "email": "user@example.com",
    "full_name": "John Doe"
  }
}

Login

POST /api/v1/auth/login

Authenticate existing user.

Request:

{
  "email": "user@example.com",
  "password": "SecurePassword123"
}

Response:

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer",
  "user": {
    "id": 1,
    "email": "user@example.com",
    "full_name": "John Doe"
  }
}

Resume Scanner Endpoints

Upload Resume

POST /api/v1/resume/upload

Upload a PDF resume and receive AI-generated feedback. Requires Authentication.

Headers:

Authorization: Bearer <your_jwt_token>

Request:

  • Method: POST
  • Content-Type: multipart/form-data
  • Body: file (PDF format)

Response:

{
  "feedback": "Your resume demonstrates strong technical skills in React, FastAPI, and backend development. Key strengths include: 1) Diverse tech stack experience with modern frameworks, 2) Clear project descriptions showing problem-solving abilities, 3) Quantifiable achievements. Recommendations: Consider adding more metrics to quantify impact, expand on leadership experiences, and include specific technologies used in each project."
}

cURL Example:

curl -X POST "http://127.0.0.1:8000/api/v1/resume/upload" \
  -H "Authorization: Bearer your_jwt_token_here" \
  -H "accept: application/json" \
  -H "Content-Type: multipart/form-data" \
  -F "file=@resume.pdf"

Email Writer Endpoints

Generate Email

POST /api/v1/email/generate

Generate a professional job application email. Requires Authentication.

Headers:

Authorization: Bearer <your_jwt_token>

Request:

  • Method: POST
  • Content-Type: application/json
  • Body:
{
  "topic": "Application for Senior Software Engineer position at Tech Corp",
  "tone": "professional",
  "length": "medium"
}

Response:

{
  "email": "Dear Hiring Manager,\n\nI am writing to express my strong interest in the Senior Software Engineer position at Tech Corp...",
  "subject": "Application for Senior Software Engineer Position"
}

cURL Example:

curl -X POST "http://127.0.0.1:8000/api/v1/email/generate" \
  -H "Authorization: Bearer your_jwt_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "Application for Senior Software Engineer",
    "tone": "professional",
    "length": "medium"
  }'

Interactive API Docs: Visit http://127.0.0.1:8000/docs for Swagger UI


πŸ” Security Features

Authentication & Authorization

  • JWT Tokens: Secure token-based authentication
  • Password Hashing: bcrypt algorithm for secure password storage
  • Protected Routes: All AI features require authentication
  • Token Expiration: Configurable token expiry time

Data Security

  • SQLite Database: Reliable local data persistence
  • Encrypted Passwords: Never store plain-text passwords
  • Secure File Handling: Temporary file storage with cleanup
  • CORS Protection: Configured CORS policies

🧠 AI Models & Technologies

Component Technology Purpose
LLM Groq LLaMA 3.3 (70B) Resume analysis & email generation
Embeddings all-MiniLM-L6-v2 (HuggingFace) Text vectorization
Vector DB ChromaDB Efficient similarity search
Framework LangChain RAG pipeline orchestration
Email AI Custom Prompt Engineering Professional email crafting
Database SQLite User data persistence
Authentication JWT Secure user authentication

🎯 Use Cases

For Job Seekers

  • βœ… Create secure account to save progress
  • βœ… Get instant AI feedback on your resume
  • βœ… Generate professional job application emails
  • βœ… Save time on email composition
  • βœ… Improve your chances of getting noticed

For Students

  • βœ… Learn what makes a strong resume
  • βœ… Practice professional communication
  • βœ… Prepare for internship applications
  • βœ… Build career readiness skills
  • βœ… Track your resume improvements over time

For Recruiters

  • βœ… Quickly assess candidate resumes
  • βœ… Generate professional responses
  • βœ… Streamline communication workflow
  • βœ… Maintain consistent messaging
  • βœ… Manage multiple candidate interactions

🌟 Why This Project Stands Out

βœ… Full-Stack Production Application - Complete authentication system with database
βœ… Production-Grade Architecture - Clean separation of concerns with layered structure
βœ… Secure Authentication - JWT-based auth with password hashing
βœ… Database Integration - SQLite for reliable data persistence
βœ… Dual AI Tools - Complete career assistance in one platform
βœ… Advanced RAG Implementation - Industry-standard vector search with ChromaDB
βœ… Ultra-Fast Inference - Groq provides 10x faster responses than traditional LLMs
βœ… Scalable Design - Modular structure with API versioning (v1)
βœ… Real-World Use Case - Solves actual problems for job seekers
βœ… Portfolio-Grade Project - Demonstrates full-stack AI/ML & software engineering skills
βœ… Professional UI/UX - Polished interface with excellent user experience

Perfect for demonstrating to recruiters and building your AI portfolio! πŸ’Ό


πŸš€ Future Enhancements

  • User dashboard with analytics
  • Resume history and version tracking
  • Email template library
  • Multi-language email support
  • LinkedIn profile optimization
  • Cover letter generation
  • Interview preparation assistant
  • Job matching recommendations
  • Resume ATS optimization score
  • PostgreSQL/MySQL integration
  • OAuth integration (Google, GitHub)
  • Email scheduling and tracking
  • Resume comparison tool
  • Collaborative resume reviews

🀝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘€ Author

Prateek Mani Tripathi
Full-Stack MERN + AI Developer


πŸ™ Acknowledgments


⭐ Show Your Support

If you found this project helpful, please give it a star ⭐
It motivates me to build more AI-powered tools!

Made with ❀️ and AI

JobAI - Empowering Your Career Journey with Artificial Intelligence

Visitors GitHub Stars GitHub Forks

About

AI powered resume analyzer using FastAPI, LangChain & Groq

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published