A web application to aid in the stocktake process for bars. We are using three virtual machines to host two web servers and a relational database.
Stocktakes are a fundamental component of running a hospitality business. Their purpose is to track ingredients/items that the business uses on their premesis that are involved in the process of creating a product for the customer (e.g, cocktails, meals), which collectively we refer to as stock.
For each stocktake, each item will have a desired quantity for which the current quantity of that item is to maintained at. The measurement performed for each item depends on it's type, e.g, beer cans/bottles are counted individually and have an integer domain, spirits are measured by their current volume (either full, %full, or empty) by weighing the bottle and their domain is decimal.
Our aim is to provide tools that are useful to the stocktaking process. The tools that are desirable for the person performing the stocktake are different to the tools that would be used by the owner of the business.
Our aim is provide as much automation as possible for the manager during the stocktaking process:
- Provide a table of products which the manager would refer to when entering the current level of a product, which each product in the table having a desired quantity
- When the stocktake is initiated, the manager enters the current total quantity of each product.
- If the product is counted indiviually, then an integer can be entered.
- If the product is measured in volume, then amount of full products + the ratio of the currently in-use product can be entered.
- The manager can use the calculator to work out the ratio of current in-use products.
Our aim is to provide tools for the owner to monitor the stocktakes that have been performed:
- Access to view all information about current stocktake products.
- Access to all stocktakes that have been performed which will be marked with a date.
- Add/remove current stocktake products.
- Assign desired quantity to products.
- Assign weights to products measured by volume.
Virtual Machine (VM) 1 is the index of the client site, which uses 'index.php'. The client site can:
- Read all the products and desired quantities stored in the database.
- Write new stocktakes to the database using ‘submit_stocktake.php’.
The second VM is the admin site, which uses ‘admin.php’. The admin site can:
- Read the products and all related information in the database such as volume and weights.
- Read all previous stored stocktakes in the database using ‘records.php’.
- Delete stocktake products from the database using ‘delete_product.php’.
- Add new stocktake products to the database using ‘insert_product.php’.
The third VM is the MySQL server which provides the database for the application and receives queries from VM 1 & VM 2.
To install our application, you computer will need to support virtualisation. You will need to install the following:
- Vagrant (v2.2.x)
- VirtualBox (v6.1.x)
1: Other versions have not been tested, so if problems occur please install the same versions the application was built on. If problems still occur, please add the problems to our GitHub Issues.
Stocktake_demo.mp4
To begin installing our application, you will first need to clone the repo.
git clone https://github.com/timcop/Stocktake
Once you have successfully cloned the repo, cd into the repository.
cd Stocktake
Now you can start the application.
vagrant up
You now should have successfully installed and started the application. To close the application, run the following command in the same directory.
vagrant destroy
To use the application as a client, visit 192.168.2.13 in a web browser.
To use the application as an admin, visit 192.168.2.11 in a web browser.
After making changes to the source code you might want to restart a specific rather than all three VMs to test your changes. To do so, use the following commands:
vagrant destroy [name]
vagrant up [name]