Difficulty: (7/10) - no ai, feel free to use google
Time Limit: 2hr
Evaluation: Automated test cases will be run against your backend, link will be added below after exam for reference : https://github.com/rahul-MyGit/hotel-contest-test
Tech Stack (PREFERRED)
- Node.js, Express, PostgreSQL, JWT (Authentication), bcrypt (Password hashing), Zod
Objective
Build a Hotel Booking Platform backend where:
- Hotel Owners can list their properties and manage rooms
- Customers can search hotels, book rooms, and manage bookings
- All APIs follow strict contracts so automated tests can validate them
User Roles
| Role |
Description |
customer |
Books hotel rooms |
owner |
Manages hotels and rooms |
Core Rules (Hard Rules)
- One hotel can have multiple rooms with different types
- Owners cannot book rooms in their own hotels
- Bookings allowed only for future dates