diff --git a/README.md b/README.md index 70b41fb..3e08472 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# python_projects_grocery_webapp +# Grocery Store X In this python project, we will build a grocery store management application. It will be 3 tier application, 1. Front end: UI is written in HTML/CSS/Javascript/Bootstrap 2. Backend: Python and Flask @@ -12,7 +12,31 @@ Download mysql for windows: https://dev.mysql.com/downloads/installer/ `pip install mysql-connector-python` -### Exercise +### Database Setup + +1. **Install MySQL**: Download and install MySQL from [https://dev.mysql.com/downloads/installer/](https://dev.mysql.com/downloads/installer/). +2. **Create Database**: Create a database named `grocery_store`. You can do this using a MySQL client (like MySQL Workbench or the command line client) with the following command: + ```sql + CREATE DATABASE grocery_store; + ``` +3. **User Permissions**: The application connects to MySQL using the username `root` and password `root` (as configured in `backend/sql_connection.py`). Ensure this user exists and has the necessary permissions on the `grocery_store` database. **Note:** For a production environment, it is strongly recommended to create a dedicated user with restricted permissions and use a more secure password management strategy. + +### Running the Application + +1. **Install Dependencies**: + ```bash + pip install Flask mysql-connector-python + ``` +2. **Start the Backend Server**: + Navigate to the project's root directory in your terminal and run: + ```bash + python backend/server.py + ``` + The server will start on `http://127.0.0.1:5000`. +3. **Access the Frontend**: + Open the `ui/index.html` file in your web browser. + +### Exercise The grocery management system that we built is functional but after we give it to users for use, we got following feedback. The exercise for you to address this feedback and implement these features in the application, 1. **Products Module**: In products page that lists current products, add an edit button next to delete button that allows to edit current product diff --git a/ui/index.html b/ui/index.html index e1368f1..8048c03 100644 --- a/ui/index.html +++ b/ui/index.html @@ -2,7 +2,7 @@ - GSMS + Grocery Store X @@ -44,7 +44,7 @@
-

Grocery Store Management System

+

Grocery Store X

diff --git a/ui/manage-product.html b/ui/manage-product.html index 3e5bc1f..9fcc5f7 100644 --- a/ui/manage-product.html +++ b/ui/manage-product.html @@ -2,7 +2,7 @@ - GSMS + Grocery Store X @@ -43,7 +43,7 @@
-

Manage Products

+

Grocery Store X - Manage Products

diff --git a/ui/order.html b/ui/order.html index 1278122..f31df38 100644 --- a/ui/order.html +++ b/ui/order.html @@ -2,7 +2,7 @@ - GSMS + Grocery Store X @@ -43,7 +43,7 @@
-

New Order +

Grocery Store X - New Order