A modern, interactive web-based interview preparation platform for Computer Science and Engineering students. Test your knowledge across 6 core CSE subjects with MCQ-based questions, real-time timer, and instant feedback.
Project Link: InterviewBOT
- Features
- Technologies Used
- Project Structure
- Installation
- Usage
- Configuration
- API Endpoints
- Question Format
- Screenshots
- Contributing
- License
- Contact
- FAQ
- 6 Core CSE Topics: DSA, OOP, DBMS, OS, Computer Networks, AI
- 30 Questions per Topic: Total of 180+ carefully curated questions
- MCQ Format: Multiple choice questions with 4 options each
- Flexible Quiz Configuration: Choose 1-30 questions per session
- Mixed Topic Mode: Select "ALL" to get questions from all topics
- Real-time Timer: Track your time with live countdown
- Instant Feedback: Get explanations after each answer
- Score Analysis: Detailed performance metrics with percentage
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Beautiful UI: Modern gradient design with smooth animations
- Timer warning at 5 minutes
- Progress tracking with visual progress bar
- Performance categorization (Excellent/Good/Average/Needs Improvement)
- Animated score circle with percentage display
- Question-by-question navigation
- Topic-wise color coding
- Session-based quiz management
- Flask (v2.0+) - Python web framework
- Python 3.8+ - Programming language
- HTML5 - Structure
- CSS3 - Styling with modern features (Flexbox, Grid, Animations)
- JavaScript (ES6) - Interactive functionality
- Google Fonts (Poppins) - Typography
- VS Code - Code editor
- Git - Version control
interview-chatbot/
โ
โโโ app.py # Flask backend server
โโโ questions.py # Question database (180+ questions)
โ
โโโ templates/
โ โโโ index.html # Main HTML template
โ
โโโ static/
โ โโโ style.css # CSS styling
โ โโโ script.js # JavaScript logic
โ
โโโ README.md # Project documentation
โโโ requirements.txt # Python dependencies
โโโ .gitignore # Git ignore file
- Python 3.8 or higher
- pip (Python package manager)
- Git
git clone https://github.com/yourusername/cse-interview-chatbot.git
cd cse-interview-chatbot# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtrequirements.txt:
Flask==2.3.0
Werkzeug==2.3.0
python app.pyYou should see:
* Running on http://127.0.0.1:5000
* Debug mode: on
- Activate virtual environment (if using one)
- Run the Flask app:
python app.py
- Open browser and navigate to:
http://127.0.0.1:5000/
- Choose from 6 core topics or select "ALL TOPICS" for mixed questions
- Topics include:
- ๐ข DSA (Data Structures & Algorithms)
- ๐ฏ OOP (Object-Oriented Programming)
- ๐๏ธ DBMS (Database Management Systems)
- ๐ป OS (Operating Systems)
- ๐ CN (Computer Networks)
- ๐ค AI (Artificial Intelligence)
- Use the slider to select number of questions (1-30)
- Click "Start Quiz"
- Read the question carefully
- Click on your answer choice (A/B/C/D)
- Click "Submit Answer"
- View explanation and click "Next Question"
- See your score percentage
- Review correct/wrong answers
- Check time taken
- Get performance feedback
Press Ctrl + C in the terminal where Flask is running
Edit in templates/index.html:
<input type="range" id="numQuestions" min="1" max="30" value="10">- min: Minimum questions (default: 1)
- max: Maximum questions (default: 30)
- value: Default selection (default: 10)
- Add questions to
questions.py:
questions_db = {
# ... existing topics ...
"ML": [ # New topic
{
"question": "What is Machine Learning?",
"options": ["...", "...", "...", "..."],
"answer": 0,
"explanation": "..."
}
]
}- Update API in
app.py:
topics = {
# ... existing topics ...
"ML": "Machine Learning"
}- Add icon in
static/script.js:
const topicIcons = {
// ... existing icons ...
'ML': '๐ง '
};Edit in static/script.js:
// Warning at 5 minutes (300 seconds)
if (totalSeconds === 300) {
document.querySelector('.timer-container').classList.add('warning');
}Edit CSS variables in static/style.css:
:root {
--primary: #6366f1; /* Main color */
--secondary: #8b5cf6; /* Secondary color */
--success: #10b981; /* Success color */
--danger: #ef4444; /* Error color */
}GET /
Description: Serves the main HTML page
Response: HTML document
GET /api/topics
Description: Returns list of available topics
Response:
{
"DSA": "Data Structures & Algorithms",
"OOP": "Object-Oriented Programming",
"DBMS": "Database Management Systems",
"OS": "Operating Systems",
"CN": "Computer Networks",
"AI": "Artificial Intelligence"
}Example:
fetch('/api/topics')
.then(response => response.json())
.then(data => console.log(data));POST /api/questions
Description: Returns random questions based on topic and count
Request Body:
{
"topic": "DSA",
"num_questions": 10
}Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| topic | string | Yes | Topic code or "ALL" |
| num_questions | integer | No | Number of questions (default: 5) |
Response:
[
{
"question": "What is the time complexity of binary search?",
"options": ["O(n)", "O(log n)", "O(n^2)", "O(1)"],
"answer": 1,
"explanation": "Binary search divides the search space...",
"topic": "DSA"
}
]Example:
fetch('/api/questions', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
topic: 'DSA',
num_questions: 10
})
})
.then(response => response.json())
.then(questions => console.log(questions));{
"question": "Question text here?", # String: The question
"options": [ # List: 4 answer choices
"Option A",
"Option B",
"Option C",
"Option D"
],
"answer": 2, # Integer: Index of correct answer (0-3)
"explanation": "Detailed explanation..." # String: Why the answer is correct
}{
"question": "What is the time complexity of binary search?",
"options": [
"O(n)", # Index 0
"O(log n)", # Index 1 - Correct answer
"O(n^2)", # Index 2
"O(1)" # Index 3
],
"answer": 1, # Points to "O(log n)"
"explanation": "Binary search divides the search space in half each time, resulting in O(log n) complexity."
}Edit questions.py:
questions_db = {
"DSA": [
# ... existing questions ...
{
"question": "Your new question?",
"options": ["Option 1", "Option 2", "Option 3", "Option 4"],
"answer": 0, # Index of correct answer
"explanation": "Explanation of the correct answer."
}
]
}Important Notes:
- Answer index is 0-based (0, 1, 2, or 3)
- All questions must have exactly 4 options
- Explanation should be clear and educational
We welcome contributions! Here's how you can help:
-
Fork the repository
git fork https://github.com/GoldLion123RP/InterviewBOT.git
-
Create a feature branch
git checkout -b feature/AmazingFeature
-
Make your changes
- Add new questions
- Fix bugs
- Improve UI/UX
- Add new features
-
Commit your changes
git commit -m 'Add some AmazingFeature' -
Push to the branch
git push origin feature/AmazingFeature
-
Open a Pull Request
- ๐ Add more questions to existing topics
- ๐จ Improve UI/UX design
- ๐ Add new topics (Machine Learning, Cloud Computing, etc.)
- ๐ง Add difficulty levels (Easy/Medium/Hard)
- ๐ Add detailed analytics and progress tracking
- ๐ Add leaderboard functionality
- ๐พ Add user authentication and save progress
- ๐ฑ Improve mobile responsiveness
- ๐ Add multi-language support
- โฟ Improve accessibility features
- Use meaningful variable names
- Add comments for complex logic
- Follow PEP 8 for Python code
- Use ES6 features for JavaScript
- Maintain consistent indentation
- Write clear commit messages
This project is licensed under the MIT License.
MIT License
Copyright (c) 2024 CSE Interview Chatbot
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, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Project Maintainer: Your Name
- GitHub: @GoldLion123RP
- Email: goldlion123.rp@gmail.com
- LinkedIn: https://www.linkedin.com/in/rahul-pal-133a67153/
Project Link: TAP TO OPEN
- Flask documentation
- Google Fonts (Poppins)
- Icons from emoji
- Inspiration from various online quiz platforms
- All contributors who helped improve this project
- Basic quiz functionality
- 6 core CSE topics
- 30 questions per topic
- Timer feature
- Score tracking
- Responsive design
- User authentication
- Save progress
- Question difficulty levels
- Detailed analytics
- Leaderboard
- Practice mode
- AI-powered question recommendations
- Video explanations
- Community-contributed questions
- Mobile app (React Native)
- Multi-language support
- Timer doesn't pause when navigating away from page
- No question review feature after quiz completion
- Mobile landscape mode needs improvement
Report bugs: Issues Page
A: Yes, this project is licensed under MIT License.
A: Edit the questions.py file and add questions following the format shown in the documentation.
A: No, currently results are not stored. This is a planned feature for v2.0.
A: Yes, modify app.py: app.run(debug=True, port=8080)
A: Yes! It covers fundamental concepts for CSE interviews and placements.
If you find this project helpful, please consider giving it a โญ!