Digitise hostel operations end to end.
Hostel Management transforms the paper-and-spreadsheet nightmare of running a college hostel into a clean, real-time digital system — giving wardens, administrators, and students a single source of truth for every room, fee, and complaint.
The Story
The Problem
Most college hostels still run on manual processes: room allocation in Excel, fee collection tracked in registers, complaints submitted on paper slips. Wardens spend hours on admin. Students wait days for responses. Errors in fee records cause disputes. There is no audit trail.
Why It Matters
A hostel houses hundreds of students. When its administration is broken, real problems follow — fee disputes, untracked maintenance issues, misallocated rooms. Digitising operations isn't just efficiency; it's accountability.
The Solution
A Next.js + Supabase full-stack application with modules for room allocation, student records, fee tracking with payment history, complaint management, and a warden dashboard with real-time occupancy overview.
Product Features
Visual floor map showing room occupancy, vacancy, and maintenance status. Drag-and-drop allocation with conflict detection.
Track monthly fees, pending dues, and payment history per student. Auto-generate receipts and outstanding balance reports with one click.
Students submit complaints digitally — categorised by type (maintenance, cleanliness, security). Wardens assign and track resolution status with timestamps.
Real-time occupancy rates, vacancy trends, and revenue forecasts. Monthly and semester-wise breakdowns for administrative planning.
Wardens manage their own floors. Admins oversee the full hostel. Students access only their own profile and complaints. All enforced by Supabase RLS.
System Architecture
Technical Deep Dive
Room allocation runs a check before committing: is the room occupied? Is the student already assigned elsewhere? Is the room under maintenance? These three checks happen in a single PostgreSQL transaction — if any fails, the whole allocation rolls back. This prevents the double-allocation bugs that plagued the previous Excel-based system.
-- Atomic room allocation with conflict check
BEGIN;
SELECT 1 FROM rooms WHERE id = $1 AND status = 'vacant' FOR UPDATE;
SELECT 1 FROM students WHERE id = $2 AND room_id IS NULL FOR UPDATE;
UPDATE rooms SET status = 'occupied', student_id = $2 WHERE id = $1;
UPDATE students SET room_id = $1 WHERE id = $2;
COMMIT;Fees are computed from a base hostel fee, optional meal plan, and any ad-hoc charges (laundry, guest stay). The calculation is done server-side on demand — no denormalised balance fields that can drift. A Supabase function computes the current balance by summing charges and subtracting payments, returning a consistent view every time.
Engineering Decisions
Performance & Scale
Deployment & Infrastructure
Deployment
Next.js on Vercel. Supabase PostgreSQL with RLS. Supabase Auth for multi-role login. Supabase Storage for documents. Production database in ap-south-1 (Mumbai) for low latency.
CI/CD
GitHub Actions — TypeScript + ESLint on PR. Auto-deploy to Vercel on merge.
Monitoring
Supabase dashboard for slow queries and Auth events. Vercel Analytics for UI performance.
Challenges & Failures
What I Learned
PostgreSQL transactions are the right tool for allocation problems — optimistic locking at the application layer is not.
Computed balances from source records are always more trustworthy than stored derived fields.
RLS policy testing needs dedicated test cases — a misconfigured policy is a security and data integrity issue.
Future Roadmap
v2.0 — 2026
Screenshots
Warden dashboard — room occupancy overview
Complaint management with status tracking
Technology Stack
Frontend
Backend / DB
Database
Deployment
Ready to dive in?