A full-stack application for practicing mock interviews with AI-powered feedback, real-time face detection, and tab-switch monitoring.
- π€ AI-Powered Mock Interviews - Practice with realistic interview questions
- πΉ Real-time Face Detection - MediaPipe and OpenCV integration for face monitoring
β οΈ Tab Switch Detection - Monitors and warns when users switch tabs or applications- π― Interview Analytics - Track your performance and get feedback
- π¬ Voice & Text Input - Answer questions via typing or voice recording
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- Python (v3.8 - v3.12) - Download
- Git - Download
- Webcam - For face detection feature
- npm or yarn - Comes with Node.js
π‘ New to the project? Check out QUICK_START.md for a faster setup guide!
git clone <your-repository-url>
cd BE_ProjectWindows:
python -m venv venv
venv\Scripts\activateLinux/Mac:
python3 -m venv venv
source venv/bin/activatecd backend
pip install --upgrade pip
pip install -r requirements.txtNote: If you encounter issues with MediaPipe installation:
- Make sure you're using Python 3.8-3.12
- Try installing protobuf first:
pip install protobuf>=4.25.3 - Then install MediaPipe:
pip install mediapipe==0.10.21
python -c "import mediapipe; import flask; print('All dependencies installed successfully!')"cd InterviewAInpm installAlternative with yarn:
yarn installnpm run build-
Activate your virtual environment (if not already activated):
# Windows venv\Scripts\activate # Linux/Mac source venv/bin/activate
-
Navigate to backend directory:
cd backend -
Start the Flask server:
python app.py
The backend will start on
http://localhost:5000
-
Open a new terminal window/tab
-
Navigate to frontend directory:
cd InterviewAI -
Start the development server:
npm run dev
The frontend will start on
http://localhost:8080(or the port specified in vite.config.ts)
Open your browser and navigate to:
http://localhost:8080
BE_Project/
βββ backend/ # Python Flask backend
β βββ app.py # Main Flask application
β βββ requirements.txt # Python dependencies
β βββ README.md # Backend-specific documentation
β
βββ InterviewAI/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ pages/ # Page components
β β βββ ...
β βββ package.json # Node.js dependencies
β βββ vite.config.ts # Vite configuration
β
βββ venv/ # Python virtual environment (gitignored)
βββ .gitignore # Git ignore rules
βββ README.md # This file
GET /health- Health check endpointPOST /detect-faces- Face detection endpoint{ "image": "base64_encoded_image_string" }
The backend runs on http://localhost:5000 by default. To change this, edit backend/app.py:
app.run(host='0.0.0.0', port=5000, debug=True)The frontend runs on http://localhost:8080 by default. To change this, edit InterviewAI/vite.config.ts:
server: {
host: "::",
port: 8080,
}If your backend runs on a different URL, update InterviewAI/src/hooks/useFaceDetection.ts:
const API_URL = 'http://localhost:5000/detect-faces';MediaPipe not installing:
- Ensure Python version is 3.8-3.12
- Install protobuf first:
pip install protobuf>=4.25.3 - Then install MediaPipe:
pip install mediapipe==0.10.21
Port already in use:
- Change the port in
backend/app.py - Or kill the process using port 5000
Import errors:
- Make sure virtual environment is activated
- Reinstall dependencies:
pip install -r requirements.txt
Node modules not installing:
- Delete
node_modulesandpackage-lock.json - Run
npm installagain
Port already in use:
- Change the port in
InterviewAI/vite.config.ts - Or kill the process using the port
CORS errors:
- Ensure backend is running
- Check that backend CORS is enabled in
backend/app.py
Face detection not working:
- Ensure backend server is running on port 5000
- Check browser console for errors
- Verify camera permissions are granted
Camera not accessible:
- Grant camera permissions in browser
- Check if another application is using the camera
- Try refreshing the page
Both servers support hot-reload:
- Backend: Set
debug=Trueinapp.py(already set) - Frontend: Vite automatically supports hot-reload
Frontend:
cd InterviewAI
npm run buildThe built files will be in InterviewAI/dist/
Backend: The backend doesn't require building. For production, consider using:
- Gunicorn (Linux/Mac)
- Waitress (Windows)
- Docker containerization
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
[Add your license here]
For issues and questions:
- Check the Troubleshooting section
- Review backend and frontend specific READMEs
- Open an issue on GitHub
- MediaPipe for face detection
- OpenCV for image processing
- React and Vite for frontend framework
- Flask for backend framework