A web-based mock interview practice platform with automated feedback
Features • Screenshots • Installation • Usage • Project Structure
AI Mock Interview Bot is a lightweight web application designed to help users practice job interviews through text-based interactions. It provides preset interview questions, collects user responses, and delivers rule-based feedback to improve interview performance.
- 📚 Students preparing for job interviews
- 💼 Job seekers wanting to practice
- 🎓 Career development training
- 🔄 Quick interview rehearsal sessions
|
|
|
|
|
Note: This is a lightweight, educational project focusing on core web development concepts with Python Flask and SQLite.
ai-project/
│
├── 📂 static/ # Static assets
│ └── style.css # Main stylesheet
│
├── 📂 templates/ # HTML templates (Jinja2)
│ ├── layout.html # Base template
│ ├── login.html # Login page
│ ├── register.html # Registration page
│ ├── dashboard.html # User dashboard
│ ├── interview.html # Interview session page
│ └── result.html # Results display page
│
├── 📄 app.py # Main Flask application
├── 📄 init_db.py # Database initialization script
├── 📄 app.db # SQLite database (created on init)
├── 📄 questions.json # Interview questions database
├── 📄 requirements.txt # Python dependencies
├── 📄 report_template.txt # Feedback report template
├── 📄 image.png # Screenshot 1
├── 📄 image-1.png # Screenshot 2
├── 📄 image-2.png # Screenshot 3
└── 📄 README.md # Project documentation
# Ensure Python 3.8+ is installed
python --version
# pip should be available
pip --version# 1) Clone the repository
git clone https://github.com/asbinthapa99/ai-project.git
cd ai-project
# 2) Create virtual environment (recommended)
python -m venv .venv
# 3) Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
# 4) Install dependencies
pip install -r requirements.txt
# 5) Initialize the database
python init_db.py
# 6) Run the application
python app.pyOpen your browser and navigate to:
http://127.0.0.1:5000
- Navigate to the registration page
- Create a new account with username and password
- Credentials are stored securely in SQLite database
- Use your credentials to log in
- Session is maintained throughout your usage
- Click "Start Mock Interview" from dashboard
- System loads 5 preset questions from
questions.json
- Type your responses in the text areas provided
- No time limit - take your time to craft answers
- All answers are text-based (no voice input)
- Submit your answers when complete
- System analyzes responses using keyword matching
- Receive rule-based feedback and tips
- Check your performance score
- Review feedback for each answer
- See areas for improvement
{
"questions": [
{
"id": 1,
"text": "Tell me about yourself",
"keywords": ["experience", "background", "skills"]
}
]
}# Rule-based feedback logic
def analyze_answer(answer, keywords):
score = 0
feedback = []
# Check for keywords
for keyword in keywords:
if keyword.lower() in answer.lower():
score += 20
feedback.append(f"Good use of '{keyword}'")
# Provide tips
if score < 60:
feedback.append("Try to be more specific")
return score, feedback- Keyword Match: 20 points per keyword found
- Answer Length: Bonus for comprehensive answers
- Total Score: Out of 100
- Grade: A (90+), B (75-89), C (60-74), D (<60)
Flask==2.3.0
Flask-SQLAlchemy==3.0.0
Werkzeug==2.3.0CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password_hash TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE interview_sessions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER,
score INTEGER,
completed_at TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id)
);- Secure password hashing using Werkzeug
- Session management with Flask sessions
- SQLite storage for user credentials
- Static question bank loaded from JSON
- Predetermined set of 5 questions
- Consistent experience for all users
- Keyword-based analysis for quick evaluation
- Static tips based on common interview best practices
- Simple scoring for easy understanding
- Score calculation based on keyword presence
- Feedback display with actionable suggestions
- Session history (basic implementation)
This project is excellent for learning:
- ✅ Flask Web Framework - Routes, templates, sessions
- ✅ SQLite Database - CRUD operations, queries
- ✅ User Authentication - Hashing, sessions, security
- ✅ HTML/CSS - Frontend design, forms
- ✅ JSON Handling - Data parsing, storage
- ✅ Python Best Practices - Code organization, structure
Want to expand this project? Consider adding:
- 🤖 Real AI integration (OpenAI API)
- 🎤 Speech recognition for voice answers
- 📊 Advanced analytics dashboard
- 📈 Progress tracking over time
- 🎯 Personalized question generation
- 📱 Mobile-responsive design improvements
- 👥 Multiple interview categories
- 📧 Email results functionality
- 🔄 Question randomization
- 💾 Export results as PDF
Problem: Database not found
# Solution: Re-initialize the database
python init_db.pyProblem: Port already in use
# Solution: Change port in app.py or kill existing process
# In app.py, change:
app.run(debug=True, port=5001) # Use different portProblem: Module not found
# Solution: Ensure virtual environment is activated
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txtMIT License
Copyright (c) 2025 Asbin Thapa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
- Flask framework documentation
- SQLite database engine
- Python community resources
- Open source contributors
Have questions or suggestions? Feel free to:
- 📧 Email: asbinthapa27@gmail.com
- 🌐 Website: asbinthapa.info.np
- 💼 LinkedIn: Asbin Thapa
- 🐙 GitHub: @asbinthapa99


