Skip to content

victoriajury/hotel_reservation_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

110 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hotel Reservation System

Now working on version 2.0.0 which separates the application in to a Flask REST API backend and React frontend.

Part of Open University TM470 Final IT Project

Python application using Flask framework.

image

Setup environment

Dependencies:

  • Python 3.11
  • pip
  • pipenv
$ python --version
Python 3.11.6

Install pip

https://packaging.python.org/en/latest/guides/installing-using-linux-tools/

$ sudo dnf install python3-pip python3-wheel

$ pip --version
pip 22.2.2

Install pipenv

https://pipenv.pypa.io/en/latest/index.html

$ pip install pipenv --user

$ pipenv --version
pipenv, version 2023.12.1

Create and activate the virtual environment and spawn a shell within it

pipenv shell

Install packages

pipenv install [OPTIONS] [PACKAGES]...

Steps for creating the initial Flask application

Install Flask

$ pipenv install Flask

Developing a hotel reservation application

The application builds upon steps from tutorial https://flask.palletsprojects.com/en/3.0.x/tutorial/

Run the application

Initialise database

$ flask --app reservation_system init-db
$ flask --app reservation_system dummy-data

Run app with debugger

$ flask --app reservation_system run --debug

If flask runs successfully, you should be able to click the link in terminal:

* Running on http://127.0.0.1:5000

Log in to the system as username 'admin' with password 'dev'.

Run the tests

Coverage with Pytest

$ coverage run -m pytest

View report in terminal

$ coverage report

Generate reports

This then works with Coverage Gutters VS Code extension to view coverage in module's python files.

$ coverage xml

Styles

Admin dashboard views are styled with AdminLTE (https://adminlte.io/)

TODO / Features

Booking overview (homepage)

  • Arrivals / Departures
  • Recent bookings
  • Revenue summary

Calendar

  • Calendar month view
  • Only allow future bookings
  • Prevent bookings overlapping dates or "double bookings" for same dates

Rooms / Room Types

  • Add special offers/discount rates
  • Photo uploads
  • Amenities list

Customers

  • Add new guest details at booking time (currently a guest must be created before creating a reservation)
  • Allow multiple rooms per booking

Invoicing

  • Calulate full booking price
  • Print invoice
  • Print revenue report

Users

  • Create new users
  • Update/delete users
  • Different permission levels?

Code

  • Refactor row query functions
  • Would type hints help?
  • Write tests

About

WIP: Flask app for a small hotel reservation system

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors