A production-style placement management system built to automate student clustering, exam room setups, and seating allocations, replacing manual spreadsheet-based tasks with optimized, transactional database operations.
-
$O(1)$ Constant-Time Lookups: Designed with a database index strategy on the student's uniqueroll_numberfor instant student lookup queries. - Transactional Bulk CSV Imports: Safe student and group uploads using InnoDB transaction pools. If any row fails validation (e.g. duplicate email/roll number), the database rolls back the entire batch, preserving data integrity.
-
Smart Seating Algorithm: Implemented a round-robin group interleaving algorithm running in linear
$O(n)$ time. It distributes students by group sizes to prevent adjacent seats (horizontal and vertical) from containing members of the same group. - Public Seating Locator: A secure, public lookup panel where students can input their roll number to instantly locate their allocated room and seat coordinates.
- Printable seating maps: Direct printable CSS layout support. Clicking "Print Plan" formats the active seat map into a high-contrast black-and-white grid template optimized for paper printing.
- Role-Based Access Control (RBAC): JWT authentication securing administrator operations from coordinator-only actions.
- Frontend: React (Vite), Lucide Icons, Custom Glassmorphic Dark-Mode styling (Vanilla CSS).
- Backend: Node.js, Express.js.
- Database: MySQL.
- Security & Auth: JWT (JSON Web Tokens), bcryptjs.
- File Processing: Multer (Memory Storage), CSV-Parser.
The normalized relational database schema ensures clean associations and protects reference integrity.
erDiagram
USERS {
int id PK
string username UK
string password
enum role "admin, coordinator"
timestamp created_at
}
CLUSTERS {
int id PK
string name UK
timestamp created_at
}
STUDENT_GROUPS {
int id PK
string name UK
int cluster_id FK
timestamp created_at
}
STUDENTS {
int id PK
string roll_number UK "Indexed O(1)"
string name "Search Index"
string email UK
int group_id FK
timestamp created_at
}
ROOMS {
int id PK
string name UK
int rows_count
int cols_count
timestamp created_at
}
SEAT_ALLOCATIONS {
int id PK
int room_id FK
int student_id FK "Unique"
int row_index
int col_index
timestamp allocated_at
}
CLUSTERS ||--o{ STUDENT_GROUPS : "has"
STUDENT_GROUPS ||--o{ STUDENTS : "belongs to"
ROOMS ||--o{ SEAT_ALLOCATIONS : "allocates"
STUDENTS ||--o| SEAT_ALLOCATIONS : "has seat"
To seat students such that no two students from the same group are seated horizontally or vertically adjacent:
-
Grouping & Sorting: Group students by their
group_idand sort groups descending by size. -
Stride Distribution: Pool students sequentially and place them into a target list using a step size of 2 (filling even indices
0, 2, 4...then odd indices1, 3, 5...). -
Local Resolution Pass: Map students to the room seats. For each seat, check left and top neighbors. If a group collision occurs (mathematically unavoidable only if a single group size
$> (N+1)/2$ ), search forward in the array and perform a local lookahead swap.
- Node.js (v18+)
- MySQL Server (running locally)
- Create a
.envfile in thebackend/directory:PORT=5001 JWT_SECRET=your_jwt_secret_key DB_HOST=127.0.0.1 DB_USER=root DB_PASS=your_mysql_password DB_NAME=placement_seating_system
From the root directory, run:
# Install root, backend, and frontend dependencies
npm install
npm run install:allStart both backend API and React frontend simultaneously:
npm run dev
- Frontend Access: http://localhost:5173
- Backend API: http://localhost:5001
- Username:
admin - Password:
admin123