The problem Hostel Hub solves
Living in a university hostel with hundreds of students per building usually means dealing with broken communication and zero accountability.
At campuses like IIT Roorkee across 11 Bhawans, everyday hostel operations still run on messy paper registers, chaotic WhatsApp groups, and verbal promises:
Complaints disappear into a black hole: When a geyser breaks or the floor Wi-Fi dies, maintenance workers frequently mark the issue "Completed" in an office ledger just to clear their queue. The student only finds out the issue was ignored when they turn on the tap and the water is still cold.
Paper gate passes are easily faked: Curfew slips and late entries rely on physical paper chits or WhatsApp screenshots. Students easily share screenshots with friends, reuse old passes, or scribble fake room numbers when guards are busy.
Mess food and health tracking are untracked: Students eat three meals a day with no nutritional visibility. When water contamination or jaundice breaks out on campus, there is no log of what people ate or when symptoms began. On top of that, getting a light sick diet (like khichdi) or claiming mess rebates requires running around with physical doctor slips.
Reporting negligence feels unsafe: If an elected student secretary or hostel staff member ignores problems, students hesitate to speak up because there is no way to escalate complaints confidentially without social friction.
What HostelHub does differently:
Two-way complaint confirmation: Staff cannot close a ticket unilaterally. When work is marked done, the status moves to "Pending Confirmation." The student who reported the issue must verify the fix and give it a rating, or hit "Re-open" to send it straight back with an urgent flag.
The "+1 Facing This" button: Instead of ten students from the same floor filing ten separate tickets for a broken water cooler, residents simply tap "+1." Wardens see the total count of affected students and can prioritize high-impact repairs immediately.
Single-use digital gate tokens: Passes for late entry, guest stays, and campus events are signed with a unique cryptographic hash tied to the student's name, room, and enrollment number. When the gatekeeper enters the code, the pass burns to "USED" in the database. It cannot be screenshotted and handed to someone else.
Daily meal and macro logging: An interactive 7-day mess menu tracks calories, protein, carbs, and fats across everyday hostel items (dal, paneer, eggs, roti, idli). Students can log what they ate, vote in Sunday special meal polls, and submit sick-diet requests directly to mess and wellness secretaries.
Tiered escalation and verified anonymity: Students can file private room repairs, lodge anonymous complaints without peers finding out, or route grievances directly to the Warden Board or central Institute Admin when hostel-level staff fail to act.
Challenges I ran into
Building HostelHub meant balancing realistic campus rules with technical edge cases:
- The dual-identity problem (Secretaries are students too) In an IIT hostel, the student elected Mess Secretary or Sports Secretary still lives in a room on your floor. They eat the same meals and need late-entry passes just like everyone else. In our early data model, treating secretaries strictly as admin accounts caused immediate bugs. When switching views, a secretary got trapped in their staff queue, which filtered for student complaints and showed zero personal tickets. Worse, nothing stopped a secretary from approving their own sick diets or gate passes.
We had to rewrite our permission layer to decouple resident identity from portfolio permissions. We added strict self-approval checks (actor.id !== target.studentId) across all pass, rebate, and meal requests. If a Mess Secretary requests a rebate or sick diet, only the Warden or Assistant Warden can approve it.
- Gate pass replay and screenshot abuse Hostel gates get crowded right before the 11:00 PM curfew. If a gate pass is just a static screen, students simply take a screenshot and forward it to a friend who doesn't have permission to be out.
To fix this, we created an anti-passback verification kiosk. Each approved pass generates a salted hash tied to the student's identity and date. When a guard enters the code, the system validates the student's name and enrollment number, then commits a database state change from Approved to USED with an exact timestamp. If the same code is used again two minutes later, or entered under a different student's name, the screen flashes red and shows exactly who used it and when.
- Cleaning up nested comment trees Our hostel community board allows Reddit-style threaded discussions with multi-level replies. When a user deleted a top-level comment that already had nested replies and sub-replies underneath it, a naive filter (id !== targetId && parentId !== targetId) only deleted the direct child. Grandchild comments were left stranded in the database without parent IDs, causing UI layout errors.
We replaced that filter with an iterative breadth-first collector using a Set to trace all descendant IDs. When any comment is deleted, the engine sweeps down the entire branch and purges the parent, child, and grandchild comments together in one clean update.
- Compartmentalizing complaints without identity leaks Setting up anonymous reports was straightforward, but routing them securely was tricky. If a resident reports a Maintenance Secretary for misconduct, that secretary must not be able to view the ticket or see who filed it. If the report is against a Warden, it cannot appear on any hostel-level dashboard at all.
We set up three distinct routing tiers. Category tickets go to the relevant secretary, complaints against secretaries go exclusively to the Warden Board, and complaints against wardens go straight to the central Institute Admin. For anonymous posts, user identities are stripped before reaching hostel staff, while remaining verifiable by the central institute admin to prevent malicious spam.
Tracks Applied (2)
Open Track - Development
Open Track - Design
Technologies used
