How sanishpoudel/room-reservation works
This is a small interactive hotel room-reservation application. A guest uses the command-line menu to search rooms, make or modify a reservation, view its summary, or check out; administrators can add rooms. HotelSystem coordinates room availability, date-overlap checks, guest bookings, and reservation operations. Room and reservation details are represented by domain models, while room data is read from and written to an Excel workbook. The excerpts show room-file access but do not fully establish booking persistence, so that storage flow is omitted.
Main entry points: hotel_system.py Hotel coordinator · main.py Menu and prompts · guest.py Guest account · file_operations.py Workbook access
Components 14
User interface
- Menu and prompts
main.py - Room administration
models/admin.py
Hotel operations
- Hotel coordinator
models/hotel_system.py - Room search and listing
models/hotel_system.py - Availability checks
models/hotel_system.py - Booking operations
models/hotel_system.py
Reservation domain
- Guest account
models/guest.py - User base
models/user.py - Reservation
models/reservation.py - Room
models/room.py
Room storage
- Workbook access
utils/file_operations.py - Room workbook
data/rooms.xlsx
Other components
- Guest
- Administrator
Connections 19
- Guest → Menu and prompts: chooses actions
main.py - Administrator → Menu and prompts: chooses administration
main.py - Menu and prompts → Hotel coordinator: dispatches operations
main.py - Menu and prompts → Room administration: opens admin actions
main.py - Menu and prompts → Hotel coordinator: requests room search
main.py - Menu and prompts → Hotel coordinator: looks up reservations
main.py - Room administration → Hotel coordinator: adds rooms through
models/admin.py - Hotel coordinator → Room search and listing: handles searches
models/hotel_system.py - Hotel coordinator → Availability checks: checks date overlap
models/hotel_system.py - Hotel coordinator → Booking operations: runs booking actions
models/hotel_system.py - Hotel coordinator → Guest account: creates guest records
models/hotel_system.py - Guest account → User base: inherits from
models/guest.py - Guest account → Reservation: stores bookings
models/guest.py - Reservation → Room: calculates room fees
models/reservation.py - Hotel coordinator → Room: creates room models
models/hotel_system.py - Hotel coordinator → Workbook access: reads room data
models/hotel_system.py - Room search and listing → Workbook access: loads workbook
models/hotel_system.py - Workbook access → Room workbook: reads workbook
utils/file_operations.py - Hotel coordinator → Room workbook: writes room updates
models/hotel_system.py