JDCRecomendable / database-project-avcol

Sample online shop logistics management database project for Avondale College, Auckland.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Database Project for Avondale College

About

  • Sample database for logistical management of an online shop
  • Provide a focused, web-based software for use in logistics

Pre-Requisites

  • Python 3
  • MySQL Server 8.0.16 or higher OR MariaDB 10.2 or higher
  • MySQL Connector/Python 8.0 or higher
  • Flask web application framework 1.1.1
  • WTForms module 2.2.1
  • PyFPDF 1.7.2

Setup

  1. Install MySQL 8.0.16 and above OR MariaDB 10.2 and above.
  2. Start the database server. On macOS, this can be done in System Preferences. On GNU/Linux:
systemctl start mysql
# or
systemctl start mariadb
  1. Create a schema to be used. Example:
mysql> CREATE SCHEMA online_shop;
  1. Create a user for accessing the database. Example:
mysql> CREATE USER 'online_shop_admin'@'localhost'
    -> IDENTIFIED BY '<password>';
  1. Grant the user privileges to the schema to be used:
mysql> GRANT ALL PRIVILEGES
    -> ON online_shop.*
    -> TO 'online_shop_admin'@'localhost'
    -> WITH GRANT OPTION;
  1. Install the following Python modules for the backend:
pip3 install Flask==1.1.1
pip3 install WTForms==2.2.1
pip3 install mysql-connector-python
pip3 install fpdf==1.7.2
  1. To generate the config file (config.cfg), execute main.py:
cd /path/to/database_package_directory/
python3 main.py

Running

  1. Open config.cfg and set up the necessary parameters as per specifications of the database engine. Also need to set the IP address for the web-interface:
[SYSTEM]
is_initialised = 0

[DATABASE]
schema = online_shop
username = online_shop_admin
password = <password>
host = 127.0.0.1

[WEB_INTERFACE]
host = 0.0.0.0
port = 5000

[LOGGER]
max_number_of_lines = 50000
  1. Run the database engine. On macOS, this can be done in System Preferences. On GNU/Linux:
systemctl start mysql
# or
systemctl start mariadb
  1. Execute main.py.
  2. Point any browser to the web-interface.

About

Sample online shop logistics management database project for Avondale College, Auckland.

License:GNU General Public License v3.0


Languages

Language:Python 63.9%Language:HTML 32.9%Language:TSQL 3.2%