An enterprise-grade, institutional examination arrangement suite designed for Mid-Semester Tests (MST) and End-Semester University Examinations.
Automated Zero-Conflict Branch Interleaving • 2D Interactive Seating Studio • Live Optical QR & Photo ID Attendance • Section-Wise Print & Multi-Sheet Excel Engine
Real-time multi-branch capacity tracking, zero-conflict anti-cheat verification score, hall utilization matrix, and invigilator duty rosters.

2D classroom bench matrix with multi-branch color pills (F-1 CSE, S-1 ME, T-1 ECE), live drag-less seat reallocation, and digital attendance logger.

Camera HUD viewport with candidate face ID match, seat coordinate lookup, and real-time invigilator attendance feed.

Generates column-wise & section-wise attendance signature registers, A4 door notice charts, desk QR stickers, and multi-sheet institutional .xlsx files.

Switch between Mid-Semester Tests (MST) and End-Semester Major Theory Exams, configure college headers, and upload custom roll lists.

DeskMatrix features a hybrid enterprise architecture:
- Next.js 16 (App Router + React 19): Delivers a zero-latency Neo-Bento UI, live 2D seating manipulation, camera optical scanning, and offline-capable student lookup.
- Python Backend (FastAPI / Django + openpyxl + Pandas): Handles heavy mathematical branch interleaving, institutional database synchronization, and multi-sheet Excel generation.
┌────────────────────────────────────────────────────────┐
│ Next.js Frontend (Port 3000) │
│ • Interactive 2D Studio • Camera QR Scanner │
│ • Live Bento Dashboard • Section Print Engine │
└─────────────────────────┬──────────────────────────────┘
│ HTTP / REST JSON (CORS)
▼
┌────────────────────────────────────────────────────────┐
│ Python FastAPI Backend (Port 8000) │
│ • POST /api/seating/generate • POST /api/attendance│
│ • POST /api/export/excel • GET /api/health │
└─────────────┬───────────────────────────┬──────────────┘
│ │
▼ ▼
┌───────────────────────────┐ ┌────────────────────────┐
│ openpyxl & Pandas Engine │ │ SQLite / PostgreSQL │
│ Multi-Sheet Excel Reports │ │ Exam & Student Store │
└───────────────────────────┘ └────────────────────────┘
In web/.env.local:
NEXT_PUBLIC_PYTHON_BACKEND_URL=http://127.0.0.1:8000The frontend communicates with Python via standard REST requests:
import { requestPythonSeatingOptimization, verifyScanWithPython } from "@/lib/api";
// 1. Send Room Layout & Roll Numbers to Python Optimizer
const result = await requestPythonSeatingOptimization({
rooms: roomConfigs,
students: candidateList,
examMode: "END_SEM",
examSession: "Day 1 (Morning Session)"
});
// 2. Verify Scanned QR Admit Code with Python
const scanMatch = await verifyScanWithPython("CSE2026001", "Room 302");
console.log(scanMatch.seatCoordinate); // "Bench 1 (F-1)"Start the Python backend with CORS support:
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI(title="DeskMatrix API")
# Enable Cross-Origin Resource Sharing for Next.js
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:3000", "http://127.0.0.1:3000"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.post("/api/seating/generate")
def generate_seating(payload: dict):
# Runs multi-branch alternating matrix algorithm
return {"success": True, "rooms": allocated_rooms}- Automatically alternates students across benches so no two students from the same branch/subject sit directly adjacent:
- Seat F-1 (Left): Computer Science & Engineering (
CSE) - Seat S-1 (Middle): Mechanical Engineering (
ME) - Seat T-1 (Right): Electronics & Communication (
ECE)
- Seat F-1 (Left): Computer Science & Engineering (
- Groups attendance sheets by seating column (
F-1,S-1,T-1) and academic branch section. - Prepares official invigilator signature books with serial numbers, candidate roll codes, subject names, and signature blocks.
- Uses the device camera or USB barcode scanner to decode admit card QR codes.
- Instantly displays assigned room, desk coordinate (
Bench 9 • T-1), candidate photo, and registers live entry timestamp.
- Create classrooms of any dimension (e.g., 5 Rows × 4 Benches with 1 to 4 students per bench).
- Mark individual seats as defective or reserved for special-need candidates.
You can upload existing institutional spreadsheets:
| Room Number | Number of Rows | Number of Bench | Number of Student per Bench | Left Name | Middle Name | Right Name |
|---|---|---|---|---|---|---|
| 302 | 5 | 4 | 3 | CSE | ME | ECE |
| 304 | 6 | 3 | 2 | CSE | ME | - |
| Roll Number | Candidate Name | Branch | Subject Code |
|---|---|---|---|
| CSE2026001 | Manish Bhat | CSE | CS401 |
| CSE2026002 | Sanya Singh | CSE | CS401 |
- Node.js 18.0 or higher
- Python 3.10 or higher
- npm or pnpm
# Navigate to web workspace
cd web
# Install dependencies
npm install
# Start development server
npm run dev🌐 Open http://localhost:3000 in your browser.
# From project root
pip install fastapi uvicorn openpyxl pandas pydantic
# Run the API server
python api_server.py🚀 API documentation available at http://127.0.0.1:8000/docs.
python new_with_attendence.py| Layer | Technologies |
|---|---|
| Frontend Framework | Next.js 16 (App Router), React 19 |
| Styling & Theme | Vanilla Tailwind CSS, Bento Neo-Modern (#D2DEB1, #161618, #D4F754) |
| Icons & Visuals | Lucide React (Geometric Matrix & Institutional Markers) |
| Backend API | FastAPI / Django |
| Spreadsheet Engine | openpyxl, Pandas, xlsx |
| Camera & QR | HTML5 MediaStreams / Web Optical API |
This project is licensed under the MIT License — free for academic and commercial university use.