When building HostelHub, one of the core challenges was helping students find hostels that actually match their needs instead of just browsing an endless list. To solve this, I implemented a content-based recommendation engine using K-Nearest Neighbors (KNN).
The system scores hostels based on four weighted features: price similarity (40%), city match (30%), hostel type (15%), and room type (15%). These weights were chosen after testing how students actually prioritize their search — price and location mattered far more than other factors in practice.
Each hostel is represented as a feature vector, and when a student sets their preferences, the engine calculates distances between their ideal profile and every available hostel, returning the closest matches. This is all implemented in Django using scikit-learn, integrated directly into the hostel browsing views.
Beyond the algorithm itself, the real lesson was in tuning the weights. A naive equal-weight model gave irrelevant results — a hostel could be extremely close on room type but wildly outside the student's budget. Adjusting weights based on real usage patterns made the recommendations feel genuinely useful rather than just technically correct.
This project also pushed me to think about system design beyond just "does it work" — handling multi-role access (Student/Owner/Admin), integrating eSewa for payments, and keeping the recommendation logic fast enough to run on every search without noticeable lag.