A cutting-edge, machine learning-driven web platform designed to seamlessly orchestrate student hostel allocations. By parsing complex behavioral profiles, sleep patterns, and academic habits, this system generates mathematically optimized roommate clusters while providing a comprehensive suite of administrative override and management tools.
- Sleek Preference Onboarding: Seamless integration with external Google Forms to securely capture over 30 behavioral/compatibility datapoints.
- Real-Time Status Tracking: Live dashboard updating students on their allocation pipeline (Not Submitted → Pending Allocation → Allocated).
- Match Insights: View assigned room details, roommate contact information, and academic branches.
- Room Change Requests: An integrated dispute pipeline allowing students to formally submit and track the status of roommate change requests natively in the dashboard.
- One-Click Data Synchronization: Instantly pull and serialize massive datasets from Google Sheets directly into the active MongoDB cluster.
- ML Engine Triggering: Fire the Python clustering algorithm to intelligently map hundreds of students into 3-person rooms based on compatibility heuristics.
- Dynamic Allocations Manager:
- Manual Swapping: A forgiving, prefix-friendly engine to forcibly swap specific students between generated rooms.
- Room Locking: Permanently freeze specific room allocations to prevent subsequent algorithmic overwrites.
- CSV Export Engine: Automatically generates rich Excel-ready reports detailing every student, their assigned room, block, and compatibility scores.
- Change Request Supervisor: A dedicated panel linking student change requests to their live runtime room placement (Original Room vs Currently Placed In).
This application is powered by a robust microservice-oriented architecture.
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS, Vanilla CSS
- Interactions: Framer Motion, Lucide React Icons
- State/Fetching: Axios, React Hooks
- Runtime: Node.js & Express.js
- Database: MongoDB (via Mongoose)
- Role: Primary system of record, authentication, synchronization pipelines, manual override handling, and data aggregation capabilities.
- Runtime: Python & FastAPI
- Libraries: Pandas, Scikit-learn
- Role: Specialized microservice dedicated exclusively to running heavy clustering, Euclidean space mapping, and unassigned pool calculation algorithms.
- Node.js (v18+)
- Python (3.9+)
- MongoDB Community Server (Running on
localhost:27017)
Ensure your local MongoDB instance is active. The application connects via:
mongodb://127.0.0.1:27017/hostel_allocator
cd backend
npm install
node server.jsThe Node.js server will spin up on http://localhost:5000.
cd backend
# Optional: Setup virtual environment (python -m venv venv)
pip install fastapi uvicorn pandas scikit-learn requests pydantic
uvicorn main:app --reload --port 8000The Python microservice will spin up on http://localhost:8000.
cd frontend
npm install
npm run devAccess the application via http://localhost:3000.
- Admin Access: Navigate to
/adminto access the protected synchronization tools and allocation workflows. - Student Access: Navigate to
/studentfor the end-user dashboard. Unauthorized access to admin panels is aggressively blocked by session tracking.