A web application built with React and Flask, designed for inventory management. It allows users to manage product inventories in different warehouses efficiently.
- Perform CRUD operations (Create, Read, Update, Delete) on products, locations, and product movements.
- View detailed product balance reports per location.
- Data validation for user inputs, ensuring correct product quantities and locations.
- Frontend: ReactJs, Material Design for Bootstrap, HTML, CSS.
- Backend: Python (Flask).
- Database: MySQL.
Open your terminal and run the following commands:
git clone https://github.com/ameentalahmeh/inventory-manager.git
cd inventory-manager
-
Create a Virtual Environment:
python -m venv .venv
-
Activate the Virtual Environment:
-
On Windows:
.\.venv\Scripts\activate
-
On macOS/Linux:
source .venv/bin/activate
-
-
Install Required Python Packages:
Ensure you're in the root directory (
inventory-manager
), then run:pip install -r server/requirements.txt
-
Install MySQL (if not already installed):
-
Windows: Download and install from here.
-
macOS/Linux: Use Homebrew or apt package managers:
brew install mysql # macOS sudo apt install mysql-server # Ubuntu/Debian
-
-
Start the MySQL Server:
-
On Windows, start MySQL from the MySQL Workbench or through the services panel.
-
On macOS/Linux, start MySQL using the terminal:
sudo service mysql start
-
-
Load the Initial Database Schema:
-
Navigate to the
server/database/data
folder where theproducts_store_db.sql
file is located, and run the following command:mysql -u root products_store_db < server/database/data/products_store_db.sql
-
-
Configure Flask to Use MySQL:
-
In the
server
folder, there should be adb.yaml
file that holds the db details. -
Update the database connection details in the
db.yaml
file:mysql_host: 'localhost' mysql_user: 'root' mysql_password: mysql_database: 'products_store_db'
Replace
username
andpassword
with your MySQL credentials. -
-
Run the following command to start the Flask server:
cd server python app.py
Flask will start the server at
http://127.0.0.1:5000/
.
-
Navigate to the
client
folder:cd client
-
Install all dependencies:
npm install
-
Start the Client and Server concurrently:
npm run dev
The app will run at
http://localhost:3000
and access the flask app via proxy inpackage.json
file.
- Locations page
- Create location
- Edit location
- Report page
- No enough products at location
- No changes made
- Required inputs are empty
- Inputs with invalid formats