A client and server Restaurant ordering system
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
S&P Restaurant Management System aims to provide easy access between the customers and the restaurant. Customers can access a Flask page to order dishes which is then sent to the server via sockets. The server has an option to display the orders in a UI, allowing easy and efficient access. Each table has a separate client device which the customers of that table can access. The menu is stored in a database on the server which is dynamically refreshed for clients, preventing data inconsistency. The orders are also stored in MySQL, enabling external data analysis.
To get a local copy of S&P Restaurant Management System up and running follow these steps.
Download and install the latest version of MySQL.
Create a schema restaurant
and make sure the user that you are using to access it has SELECT
,
INSERT
, UPDATE
, DROP
- After setting up the schema, run these query in it.
CREATE TABLE menu (id VARCHAR(10), item TEXT, descr MEDIUMTEXT, price DECIMAL(10,3), img LONGTEXT) CREATE TABLE orders (id INT, table_num INT, total DECIMAL(10,3), order_done TINYINT, items TEXT)
- Clone the repo
git clone https://github.com/PalD777/SP_RestaurantManagementSystem.git
- Install necessary libraries
pip install -r requirements.txt
- Find and replace
user
andpassword
in everymysql.connector.connect
call with your own in the filesserver.py
,app.py
,sql_helper.py
- Run
sql_helper.py
withmenu
as an argument to update databasepython3 src/server/sql_helper.py menu
- To run restaurant server (Make sure the specified port is open):
python3 src/server/server.py [-h] [-u] [-p PORT] optional arguments: -h, --help Shows the help message and exits -u, --ui, --show-ui Specifies whether to show UI containing unserved orders and a remove button -p PORT, --port PORT Specifies a custom Server port [default: 9999]
- To run the client (Make sure the specified port is open):
python3 src/client/client.py [-h] [-s IP] [-p SERVER_PORT] [-f FLASK_PORT] optional arguments: -h, --help Shows the help message and exits -s IP, --sip IP, --server-ip IP Specifies Server IP Address [default: 127.0.0.1] -p SERVER_PORT, --sp SERVER_PORT, --s-port SERVER_PORT, --server-port SERVER_PORT Specifies Server port [default: 9999] -f FLASK_PORT, --fp FLASK_PORT, --f-port FLASK_PORT, --flask-ip FLASK_PORT Specifies Flask App port [default: 5000]
- To use the sql_helper:
python3 src/server/sql_helper.py modification_target positional arguments: modification_target Specifies what to modify. Possible values: menu, orders, both menu => updates the menu orders => resets orders table [WARNING: All current order data will be lost] both => does both optional arguments: -h, --help shows the help message and exits
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.