An end-to-end Inventory Management System for a multi-facility company, designed using MySQL for the backend, ReactJS for the frontend, and NodeJS as the server-side runtime. The system handles stock tracking, factory orders, inventory transfers, sales, and analytics across stores and warehouses.
The database includes the following relations:
facility: Stores info about stores and warehouses.employee: Details of employees (including admin).brand: Info about footwear brands.category: Footwear category mapping.product: Details of each product.stock: Tracks product quantities per facility.inventory_transactions: Tracks warehouse-store transfers.factory_orders: Orders sent to the factory.customer: Store customer records.sales: Sales data.alerts: Auto-alerts for low stock.
All relations are in 3NF, ensuring minimal redundancy and improved integrity.
Key constraints for data integrity:
- Enforces positive values on price, quantity, reorder levels.
- Ensures logical transaction and stock operations.
stock_alert_trigger: Auto-generates restock alerts.update_stock_after_transaction: Updates stock on transaction completion.update_stock_after_order: Updates stock after factory delivery.
apply_sale: Handles sale transactions.RequestInventoryTransaction: Creates warehouse-store requests.MarkTransactionAsCompleted: Marks transactions as done.AcceptFactoryOrder: Finalizes factory orders.
- Time-Based: For fast range queries.
- Hash-Based: For quick equality lookups on key attributes.
- Frontend: ReactJS (using
shadcnfor visual components). - Backend: NodeJS (with
bcryptfor password hashing). - Database: MySQL
- Full access to view/update employees, products, facilities, brands.
- Analytical dashboard for sales & performance monitoring.
- Can view store-level stock & customer data.
- Can perform sales via a provided sale form.
- Can view/manage local stock, employees, customers, and transaction status.
- Can initiate inventory transactions with status flow:
Sent→Accepted→Completed
- Can view/manage warehouse stock, employees, and transaction status.
- Can mark inventory transactions as Accepted.
- Can view factory orders and their statuses.
- Can initiate factory orders with status flow:
Sent→Completed
ER Diagram is available here.
-
Clone the repo
git clone <your-repo-url> cd inventory-management-system
-
Install Dependencies
cd backend npm install cd ../frontend npm install
-
Start Backend Server
cd backend npm run start -
Start Frontend Server
cd frontend npm run dev -
Ensure MySQL is running and the database is initialized using provided schema files.