An intelligent interview preparation platform powered by AI that helps job seekers prepare for interviews by generating personalized interview questions based on their resume.
Built with FastAPI, LangChain, LangGraph, MongoDB, and React, this project demonstrates end-to-end skills in Python backend development, modern frontend integration, AI orchestration, and database handling.
Features • Demo • Architecture • Installation • API Documentation
- Features
- Live Demo
- Tech Stack
- Project Structure
- Chatbot Architecture
- Installation & Setup
- Configuration
- Contributing
- Intelligent Conversation: Powered by Google Gemini and LangGraph for natural interactions
- RAG-Based Responses: Retrieval Augmented Generation using indexed website content
- Contextual Help: Real-time assistance during interviews without revealing answers
- Multi-turn Setup: Interactive questionnaire to configure personalized interviews
- Chat History: Persistent conversation storage with session management
- Three Conversation Modes:
- Normal Chat - Answer questions about the platform using RAG
- Interview Setup - Interactive multi-turn questionnaire
- Contextual Help - Explanations during interviews
- Upload resumes (PDF/Docx) which are parsed into structured JSON using LangChain
- Secure storage of parsed resumes in MongoDB
- Resume-based question generation
- MCQ Tests: Multiple choice question tests with various difficulty levels
- Mock Interviews: AI-conducted voice/text interviews with realistic scenarios
- Technical & Behavioral: Comprehensive coverage of different interview types
- Role-Specific: Customized questions based on target job roles
- Company-Specific: Questions tailored to target companies (FAANG, startups, etc.)
- Dashboard: Comprehensive performance metrics and insights
- Score Tracking: Detailed scoring for each interview session
- PDF Reports: Downloadable performance summaries
- Progress Visualization: Charts and graphs showing improvement
- Secure JWT-based authentication
- Profile management
- Session history tracking
Backend API: https://interview-bot-bali.onrender.com/docs
Frontend: https://interview-bot-wine.vercel.app
| Technology | Purpose | Version |
|---|---|---|
| FastAPI | High-performance async API framework | 0.116+ |
| LangGraph | AI conversation flow and state management | 0.2+ |
| LangChain | LLM integration and orchestration | 0.3+ |
| Google Gemini | Large language model for AI responses | 1.5 Pro |
| ChromaDB | Vector database for RAG implementation | 0.4+ |
| MongoDB | Database for user data and chat history | Latest |
| Motor | Async MongoDB driver | 3.7+ |
| PyJWT | JWT token authentication | 2.10+ |
| PyPDF | Resume PDF processing | 5.9+ |
| ReportLab | PDF report generation | 4.0+ |
| Sentence Transformers | Text embeddings | 2.3+ |
| BeautifulSoup4 | Web scraping for content indexing | 4.12+ |
| Passlib & Bcrypt | Password hashing | 1.7.4 |
| Technology | Purpose | Version |
|---|---|---|
| React | UI framework | 19.1+ |
| Vite | Build tool and dev server | 7.1+ |
| Redux Toolkit | State management | 2.8+ |
| React Router | Client-side routing | 7.8+ |
| Tailwind CSS | Utility-first styling | 4.1+ |
| Radix UI | Accessible component primitives | Latest |
| React Hook Form | Form handling | 7.62+ |
| Lucide React | Icon library | 0.540+ |
| React Speech Recognition | Voice input for interviews | 4.0+ |
| React Toastify | Toast notifications | 11.0+ |
- Google Gemini 1.5 Pro - Main LLM for chatbot and question generation
- all-MiniLM-L6-v2 - Sentence embeddings for RAG
- ChromaDB - Vector similarity search
- LangGraph - Stateful conversation graphs
- LangChain - LLM orchestration and tools
┌──────────────┐
│ USER │
└──────┬───────┘
│
├─────────────────────────────────────────────────┐
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Upload Resume │ │ Start Chat │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Parse PDF │ │ Send Message │
│ (PyPDF/ │ │ to Chatbot │
│ LangChain) │ └────────┬────────┘
└────────┬────────┘ │
│ ▼
▼ ┌──────────────────────┐
┌─────────────────┐ │ LangGraph Workflow │
│ Extract Skills │ │ • Intent Detection │
│ & Experience │ │ • Mode Routing │
└────────┬────────┘ │ • State Update │
│ └────────┬─────────────┘
│ │
│ ┌────────┴────────┐
│ │ │
│ ▼ ▼
│ ┌─────────────┐ ┌──────────────┐
│ │ RAG Search │ │ Multi-turn │
│ │ (ChromaDB) │ │ Dialogue │
│ └─────────────┘ └──────────────┘
│ │ │
│ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Store in │ │ Generate │
│ MongoDB │ │ Response │
│ (Resume DB) │ │ (Gemini LLM) │
└────────┬────────┘ └────────┬────────┘
│ │
│ ▼
│ ┌─────────────────┐
│ │ Save to Chat │
│ │ History │
│ └────────┬────────┘
│ │
└────────────┬───────────────────────────────┘
│
▼
┌──────────────────┐
│ Start Interview │
└────────┬─────────┘
│
┌───────────┴───────────┐
│ │
▼ ▼
┌──────────────────┐ ┌─────────────────┐
│ MCQ Test │ │ Mock Interview │
│ • Time-bound │ │ • AI Questions │
│ • Auto-score │ │ • Voice/Text │
└────────┬─────────┘ └────────┬────────┘
│ │
└───────────┬───────────┘
│
▼
┌──────────────────┐
│ Generate Report │
│ (ReportLab PDF) │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Store Results │
│ (MongoDB) │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Display on │
│ Dashboard │
└──────────────────┘
interview-bot/
│
├── backend/ # Main FastAPI Application (Port 8000)
│ ├── connections/ # Database connection modules
│ │ └── mongodb.py # MongoDB connection setup
│ │
│ ├── models/ # Pydantic models & schemas
│ │ ├── auth.py # User authentication models
│ │ ├── schemas.py # Request/response schemas
│ │ └── __init__.py
│ │
│ ├── routers/ # API route handlers
│ │ ├── auth.py # Authentication endpoints
│ │ │ • POST /signup # User registration
│ │ │ • POST /login # User login
│ │ │ • GET /me # Get current user
│ │ │
│ │ ├── bot.py # Interview bot endpoints
│ │ │ • POST /parse-resume # Upload & parse resume
│ │ │ • POST /generate-questions # Generate interview questions
│ │ │ • POST /start-interview # Start interview session
│ │ │ • POST /submit-answer # Submit MCQ answer
│ │ │
│ │ ├── mock.py # Mock interview endpoints
│ │ │ • POST /start-mock # Start mock interview
│ │ │ • POST /next-question # Get next mock question
│ │ │ • POST /submit-response # Submit response
│ │ │ • GET /mock-feedback # Get interview feedback
│ │ │
│ │ ├── dashboard.py # Analytics endpoints
│ │ │ • GET /stats # Get user statistics
│ │ │ • GET /recent-tests # Get recent test history
│ │ │ • GET /download-report # Download PDF report
│ │ │
│ │ ├── main_router.py # General utility endpoints
│ │ │ • GET /health # Health check
│ │ │ • POST /contact # Contact form
│ │ │
│ │ └── __init__.py
│ │
│ ├── utils/ # Utility functions
│ │ ├── exception.py # Custom exception handlers
│ │ ├── logger.py # Logging configuration
│ │ ├── main_utils.py # Common utility functions
│ │ ├── prompts.py # LLM prompt templates
│ │ └── __init__.py
│ │
│ ├── main.py # FastAPI application entry point
│ ├── validate_env.py # Environment variable validation
│ ├── verify_setup.py # Setup verification script
│ ├── requirements.txt # Python dependencies
│ ├── pyproject.toml # UV package manager config
│ ├── uv.lock # Dependency lock file
│ ├── .env # Environment variables
│ ├── .gitignore
│ └── README.md
│
├── chatbot/ # AI Chatbot Microservice (Port 8001)
│ ├── backend/
│ │ ├── langgraph_agent/ # LangGraph conversation agent
│ │ │ ├── state.py # Conversation state definitions
│ │ │ │ • ChatState class
│ │ │ │ • Message models
│ │ │ │ • Interview parameters
│ │ │ │
│ │ │ ├── nodes.py # LangGraph node functions
│ │ │ │ • intent_detection_node()
│ │ │ │ • normal_chat_node()
│ │ │ │ • setup_interview_node()
│ │ │ │ • contextual_help_node()
│ │ │ │
│ │ │ ├── graph.py # LangGraph workflow definition
│ │ │ │ • create_graph()
│ │ │ │ • State transitions
│ │ │ │ • Conditional routing
│ │ │ │
│ │ │ ├── knowledge_base.py # RAG implementation
│ │ │ │ • Website content scraping
│ │ │ │ • Text chunking & embedding
│ │ │ │ • ChromaDB vector storage
│ │ │ │ • Semantic search
│ │ │ │
│ │ │ └── __init__.py
│ │ │
│ │ ├── database.py # MongoDB client for chatbot
│ │ ├── main.py # Chatbot FastAPI app
│ │ │ • POST /chat # Main chat endpoint
│ │ │ • GET /sessions/{user_id} # Get user sessions
│ │ │ • GET /history/{user_id}/{session_id} # Get chat history
│ │ │ • DELETE /session/{user_id}/{session_id} # Delete session
│ │ │ • POST /index-website # Re-index website content
│ │ │
│ │ ├── page_capture.py # Website scraping utility
│ │ ├── run_indexing.py # Manual indexing script
│ │ ├── test_chatbot.py # Chatbot test suite
│ │ ├── verify_chatbot.py # Chatbot verification
│ │ ├── requirements.txt # Chatbot dependencies
│ │ ├── .env # Chatbot environment vars
│ │ └── .env.example
│ │
│ ├── ARCHITECTURE.md # Detailed chatbot architecture
│ ├── QUICKSTART.md # Quick setup guide
│ └── README.md # Chatbot documentation
│
├── frontend/ # React Application (Port 5173)
│ ├── src/
│ │ ├── assets/ # Static assets (images, icons)
│ │ │
│ │ ├── components/ # Reusable UI components
│ │ │ ├── ui/ # Radix UI components
│ │ │ │ ├── button.jsx
│ │ │ │ ├── card.jsx
│ │ │ │ ├── dialog.jsx
│ │ │ │ └── ...
│ │ │ ├── Chatbot.jsx # Floating chat widget
│ │ │ ├── Chatbot.css # Chat widget styles
│ │ │ ├── Header.jsx # Site header
│ │ │ ├── Footer.jsx # Site footer
│ │ │ └── ...
│ │ │
│ │ ├── features/ # Feature-specific components
│ │ │ ├── auth/ # Authentication features
│ │ │ ├── interview/ # Interview features
│ │ │ └── dashboard/ # Dashboard features
│ │ │
│ │ ├── hooks/ # Custom React hooks
│ │ │ ├── useAuth.js # Authentication hook
│ │ │ ├── useInterview.js # Interview hook
│ │ │ └── ...
│ │ │
│ │ ├── layout/ # Layout components
│ │ │ ├── RootLayout.jsx # Main layout wrapper
│ │ │ ├── AuthLayout.jsx # Auth pages layout
│ │ │ └── DashboardLayout.jsx # Dashboard layout
│ │ │
│ │ ├── lib/ # Utility libraries
│ │ │ └── utils.js # Helper functions
│ │ │
│ │ ├── pages/ # Page components
│ │ │ ├── Home.jsx # Landing page
│ │ │ ├── Login.jsx # Login page
│ │ │ ├── Signup.jsx # Registration page
│ │ │ ├── Dashboard.jsx # User dashboard
│ │ │ ├── TestPage.jsx # MCQ test page
│ │ │ ├── MockPage.jsx # Mock interview page
│ │ │ └── ...
│ │ │
│ │ ├── services/ # API service layer
│ │ │ ├── api.js # Axios instance
│ │ │ ├── authService.js # Auth API calls
│ │ │ ├── botService.js # Interview API calls
│ │ │ └── chatService.js # Chatbot API calls
│ │ │
│ │ ├── store/ # Redux store
│ │ │ ├── store.js # Store configuration
│ │ │ ├── slices/ # Redux slices
│ │ │ │ ├── authSlice.js
│ │ │ │ ├── interviewSlice.js
│ │ │ │ └── chatSlice.js
│ │ │ └── index.js
│ │ │
│ │ ├── main.jsx # App entry point
│ │ └── styles.css # Global styles
│ │
│ ├── public/ # Public static files
│ ├── index.html # HTML template
│ ├── package.json # NPM dependencies
│ ├── vite.config.js # Vite configuration
│ ├── tailwind.config.js # Tailwind CSS config
│ ├── components.json # shadcn/ui config
│ ├── .env # Frontend environment vars
│ └── .gitignore
│
├── index_website.py # Website indexing CLI tool
├── test_knowledge.py # Chatbot knowledge testing
├── DASHBOARD_FIX_NOTE.js # Dashboard fix notes
├── INDEX_WEBSITE.bat # Windows batch script
├── INSTALL_REPORTLAB.bat # ReportLab installer
├── README.md # Main project README (this file)
├── .gitignore
└── LICENSE
┌─────────────────────────────────────────────────────────────────┐
│ USER INTERFACE │
│ (React Frontend) │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Floating Chat Widget (Chatbot.jsx) │ │
│ │ • Message display │ │
│ │ • Input textarea │ │
│ │ • Session management │ │
│ │ • Interview launch button │ │
│ └────────────────────────────────────────────────────────┘ │
└───────────────────────────┬─────────────────────────────────────┘
│
│ HTTP POST /chat
│ {user_id, message, session_id}
▼
┌─────────────────────────────────────────────────────────────────┐
│ CHATBOT BACKEND │
│ (FastAPI + LangGraph) │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ main.py (API) │ │
│ │ • /chat endpoint │ │
│ │ • Load conversation state │ │
│ │ • Invoke LangGraph │ │
│ │ • Save to MongoDB │ │
│ └─────────────────────┬────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ LangGraph Workflow (graph.py) │ │
│ │ │ │
│ │ ┌─────────────────────────────────────────┐ │ │
│ │ │ Intent Detection Node │ │ │
│ │ │ • Classify user message │ │ │
│ │ │ • Route to appropriate mode │ │ │
│ │ └──────────┬──────────────────────────────┘ │ │
│ │ │ │ │
│ │ ┌────────┴────────┬──────────────┐ │ │
│ │ │ │ │ │ │
│ │ ▼ ▼ ▼ │ │
│ │ ┌────────┐ ┌─────────┐ ┌──────────┐ │ │
│ │ │ Normal │ │ Setup │ │ Help │ │ │
│ │ │ Chat │ │Interview│ │Contextual│ │ │
│ │ │ Node │ │ Node │ │ Node │ │ │
│ │ └───┬────┘ └────┬────┘ └────┬─────┘ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ └────────┬───────┴────────┬─────┘ │ │
│ │ │ │ │ │
│ │ ▼ ▼ │ │
│ │ ┌─────────────┐ ┌──────────────┐ │ │
│ │ │ RAG Search │ │Multi-turn Q&A│ │ │
│ │ │ (ChromaDB) │ │ State Mgmt │ │ │
│ │ └─────────────┘ └──────────────┘ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Google Gemini LLM (nodes.py) │ │
│ │ • Intent classification │ │
│ │ • Response generation │ │
│ │ • Context understanding │ │
│ └──────────────────────────────────────────────────────────┘ │
└────────────────┬──────────────────────────┬───────────────────┘
│ │
▼ ▼
┌──────────────────────┐ ┌────────────────────────┐
│ ChromaDB │ │ MongoDB │
│ (Vector Store) │ │ (Chat History) │
│ │ │ │
│ • Website content │ │ • Messages │
│ • Text embeddings │ │ • Sessions │
│ • Semantic search │ │ • Conversation state │
└──────────────────────┘ └────────────────────────┘
User: "How do I upload my resume?"
↓
Intent Detection → "normal"
↓
Search ChromaDB for relevant content
↓
Retrieve top matching documents
↓
Generate response using context + Gemini
↓
Return answer: "To upload your resume, go to..."
User: "I want to start an interview"
↓
Intent Detection → "setup"
↓
Check current setup_step in state
↓
Ask next question in sequence:
Step 1: "Would you like MCQ or Mock interview?"
Step 2: "What type? (Technical/Behavioral/HR/Mixed)"
Step 3: "What role are you preparing for?"
Step 4: "What difficulty level? (Easy/Medium/Hard)"
Step 5: "How many questions?"
Step 6: "Any target companies? (e.g., FAANG)"
Step 7: "Ready to start?"
↓
Collect answer → Save to state.interview_params
↓
Move to next step
↓
When complete (all steps done):
Return interview_params + should_launch_interview=true
User is in interview with question: "Explain REST API"
User asks in chat: "What is REST?"
↓
Intent Detection → "help"
↓
Get current_question from state
↓
Search knowledge base + use interview context
↓
Generate helpful explanation (no direct answer)
↓
Return: "REST stands for Representational State Transfer..."
- Python: 3.9 or higher
- Node.js: 16.x or higher
- MongoDB: Atlas account (free tier works)
- Google Gemini API: API key from Google AI Studio
git clone https://github.com/Himanshu0518/Interview-Bot.git
cd Interview-Botcd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies using uv (recommended)
pip install uv
uv sync
# Or install with pip
pip install -r requirements.txt
# Create .env file
cp .env.example .envEdit backend/.env:
MONGODB_URL="mongodb+srv://username:password@cluster.mongodb.net/"
GOOGLE_API_KEY="your-gemini-api-key"
MONGODB_DATABASE_NAME="InterviewBot"
JWT_SECRET_KEY="your-secret-key-minimum-32-characters-long"
JWT_ALGORITHM="HS256"
ACCESS_TOKEN_EXPIRE_MINUTES=30cd ../chatbot/backend
# Install chatbot dependencies
pip install -r requirements.txt
# Create .env file
cp .env.example .envEdit chatbot/backend/.env:
GOOGLE_API_KEY="your-gemini-api-key"
MONGODB_URL="mongodb+srv://username:password@cluster.mongodb.net/"
MONGODB_DATABASE_NAME="InterviewBot"
WEBSITE_BASE_URL="http://localhost:5173"
EMBEDDING_MODEL="all-MiniLM-L6-v2"Important: Index website content (one-time setup)
# Make sure frontend is running first, then:
python -m langgraph_agent.knowledge_basecd ../../frontend
# Install dependencies
npm install
# Create .env file
cp .env.example .envEdit frontend/.env:
VITE_BASE_URL="http://localhost:8000"
VITE_CHATBOT_URL="http://localhost:8001"You need three terminals running simultaneously:
Terminal 1 - Main Backend:
cd backend
uv run uvicorn main:app --reload --port 8000
# Or with regular Python:
# uvicorn main:app --reload --port 8000Backend runs at: http://localhost:8000
Terminal 2 - Chatbot Backend:
cd chatbot/backend
python main.pyChatbot runs at: http://localhost:8001
Terminal 3 - Frontend:
cd frontend
npm run devFrontend runs at: http://localhost:5173
Visit http://localhost:5173 in your browser. You should see the InterviewBot landing page.
# MongoDB Configuration
MONGODB_URL="mongodb+srv://username:password@cluster.mongodb.net/"
MONGODB_DATABASE_NAME="InterviewBot"
# Google Gemini API
GOOGLE_API_KEY="your-gemini-api-key"
# JWT Configuration
JWT_SECRET_KEY="your-very-long-secret-key-minimum-32-characters"
JWT_ALGORITHM="HS256"
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Optional: CORS Origins
CORS_ORIGINS="http://localhost:5173,http://localhost:3000"# Google Gemini API
GOOGLE_API_KEY="your-gemini-api-key"
# MongoDB Configuration
MONGODB_URL="mongodb+srv://username:password@cluster.mongodb.net/"
MONGODB_DATABASE_NAME="InterviewBot"
# Website Configuration
WEBSITE_BASE_URL="http://localhost:5173"
# Embedding Model
EMBEDDING_MODEL="all-MiniLM-L6-v2"
# ChromaDB Configuration (optional)
CHROMA_DB_PATH="./chroma_db"# API Endpoints
VITE_BASE_URL="http://localhost:8000"
VITE_CHATBOT_URL="http://localhost:8001"
# Optional: Analytics
VITE_GA_TRACKING_ID="your-google-analytics-id"We welcome contributions from the community! Here's how you can help:
- Report Bugs: Open an issue with detailed reproduction steps
- Suggest Features: Share your ideas for new features
- Improve Documentation: Help make docs clearer
- Write Code: Submit pull requests for bug fixes or features
- Test: Help test new features and report issues
- Fork the repository
git clone https://github.com/yourusername/Interview-Bot.git
cd Interview-Bot- Create a feature branch
git checkout -b feature/AmazingFeature- Make your changes
# Write code
# Add tests
# Update documentation- Commit your changes
git add .
git commit -m 'Add some AmazingFeature'- Push to the branch
git push origin feature/AmazingFeature- Open a Pull Request
- Go to GitHub repository
- Click "New Pull Request"
- Describe your changes
- Wait for review
Built by passionate students from IIIT Una combining AI with real-world solutions.
|
Full Stack Developer 🎓 BTech ECE @ IIIT Una 💡 AI/ML, Web Development |
ML Engineer 🎓 BTech ECE @ IIIT Una 💡 AI/ML, GenAI, Web Development |
Thanks to all contributors who have helped improve this project!