Ai-Powered-Interview-sysetm

AI-Powered Interview System (NeuroHire)

A Flask + MySQL + Socket.IO web app for conducting live, proctored technical interviews with:


Table of contents


Tech stack


Repository structure

app.py                  # Flask app + Socket.IO events
config.py               # Env-based configuration
extensions.py           # sqlite helpers + socketio
routes/
  auth.py               # login/logout/setup-admin
  main.py               # dashboard/add-candidate/schedule/interview/resume endpoints
templates/              # Jinja templates (UI)
static/js/              # webrtc/editor/chat/face detection
schema.sql              # Database schema
init_db.py              # Initialize DB from schema.sql
update_db.py            # Apply schema updates (adds missing columns/tables)
update_db_join_status.py# Adds join-status column (older DB support)
uploads/resumes/        # Stored candidate resumes (gitignored recommended)

Interview system features

Roles

Scheduling & access control

Live interview room

Proctoring / cheat detection


Database schema

The schema is defined in schema.sql. Core tables:


Configuration

Environment variables are loaded via python-dotenv (.env) and read in config.py.

Required/commonly used

Optional

Upload limit


1) Start containers

docker compose up --build

2) Open the app

The app uses SQLite by default; the database file is created on first run (python init_db.py or when the app starts with an existing schema).


Run locally

python -m venv .venv
.\.venv\Scripts\activate

2) Install dependencies

pip install -r requirements.txt

3) Configure .env (optional)

Set SECRET_KEY. Optionally set DATABASE_PATH to a custom SQLite file path (default: instance/interview_system.db).

4) Initialize the DB

python init_db.py

If you already created the DB earlier and need new columns/tables:

python update_db.py
python update_db_join_status.py

5) Run the server

python app.py

The server is configured to bind to 0.0.0.0:5000 (LAN/Docker friendly).


Run without Docker (Windows)

Prerequisites

1) Create & activate a virtual environment

cd c:\xampp1\htdocs\Ai-Powered-Interview-sysetm
python -m venv .venv
.\.venv\Scripts\Activate.ps1

2) Install dependencies

pip install -r requirements.txt

3) Configure .env (optional)

Create/update .env in the project root. Example:

SECRET_KEY=dev
# Optional: custom SQLite path (default: instance/interview_system.db)
# DATABASE_PATH=./data/interview_system.db
MAX_CONTENT_LENGTH=10485760

4) Initialize the database schema

python init_db.py

If you already had a DB and need to add the newer columns/tables:

python update_db.py
python update_db_join_status.py

5) Run the server

python app.py

Open:

Note: the server binds to 0.0.0.0, so you can also access it from another device on your LAN using your PC’s IP (e.g. http://192.168.x.x:5000).


Usage walkthrough

1) Create the first admin

2) Login

3) Add a candidate (with resume)

Resumes are stored on disk under uploads/resumes/ and the path is stored in MySQL.

4) Schedule an interview

5) Join the interview room

6) Candidate join approval (waiting room)

7) View resume in the interview room


Key HTTP routes

Auth

App


Socket.IO events

Room membership / join approval

WebRTC signaling

Collaborative editor

Chat

Proctoring alerts


Resume upload & preview details

Resume serving endpoint is scoped to the interview:


Troubleshooting

Database issues

Resume button not visible in interview room

PDF preview is blank

WebRTC video not connecting



License

Add a license if you plan to publish/distribute this project.