Skip to content

PalD777/SP_RestaurantManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

S&P Restaurant Management System

A client and server Restaurant ordering system
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Acknowledgments

About The Project

Product Name Screen Shot

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.

(back to top)

Built With

(back to top)

Getting Started

To get a local copy of S&P Restaurant Management System up and running follow these steps.

Prerequisites

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)

Installation

  1. Clone the repo
    git clone https://github.com/PalD777/SP_RestaurantManagementSystem.git
  2. Install necessary libraries
    pip install -r requirements.txt
  3. Find and replace user and password in every mysql.connector.connect call with your own in the files server.py, app.py, sql_helper.py
  4. Run sql_helper.py with menu as an argument to update database
    python3 src/server/sql_helper.py menu

(back to top)

Usage

  • 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
    

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Acknowledgments

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published