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!