The Inventory Management System centralizes control of suppliers, purchases, and multi-location inventory with real-time stock tracking. It enables granular management of items, suppliers, and procurement workflows while providing actionable insights through automated stock alerts, inventory valuation reports, trend analysis (monthly comparisons), and visual analytics of best-selling products/materials. Designed for operational agility, the system empowers data-driven decisions across procurement, waste reduction, and inventory optimization.
Laravel (PHP)
MySQL (Secure & relational data storage)
Vue.js (Inertia.js), Tailwind CSS
Inertia.js
Authentication (Laravel Breeze), Data Encryption
| Category | Technologies |
|---|---|
| Back-end | Laravel (PHP) |
| Database | MySQL (Secure & relational data storage) |
| Front-end | Vue.js (Inertia.js), Tailwind CSS |
| API Communication | Inertia.js |
| Security | Authentication (Laravel Breeze), Data Encryption |
The system follows an MVC (Model-View-Controller) architecture using Laravel for backend logic and Vue.js with Inertia.js for a seamless single-page application (SPA) frontend experience. The database is structured with normalized tables for efficient data handling.
To ensure efficient data management, the database schema follows a relational model.
🔹 Main Database Tables
Stores user information and roles.
Contains supplier details.
Tracks purchase invoices and associated items.
Contains Product details
Contains Items details
Pivot table between (Products-items) to store the components (ingredients) for each product.
Stores inventory items with stock levels.
Tracks item usage (raw materials/products) across interactions like orders, waste, adjustments, and purchases.
| Table Name | Description |
|---|---|
| users | Stores user information and roles. |
| suppliers | Contains supplier details. |
| purchases | Tracks purchase invoices and associated items. |
| Products | Contains Products details |
| Item | Contain Items details |
| Products_components | Pivot table between (Products-items) to store the components (ingredients) for each product. |
| inventory | Stores inventory items with stock levels. |
| Inventory_logs | Tracks item usage (raw materials/products) across interactions like orders, waste, adjustments, and purchases. |
📌 Example Table: inventory_logs
Type: INT
Description: Primary key
Type: MORPHS
Description: Polymorphic relation (itemable_id, itemable_type)
Type: DECIMAL(10,2)
Description: Quantity consumed/adjusted
Type: ENUM
Description: Interaction type (order, waste-gift, etc.)
Type: TIMESTAMP
Description: Timestamp of usage
| Column Name | Type | Description |
|---|---|---|
| id | INT | Primary key |
| itemable | MORPHS | Polymorphic relation (itemable_id, itemable_type) |
| quantity_used | DECIMAL(10,2) | Quantity consumed/adjusted |
| source | ENUM | Interaction type (order, waste-gift, etc.) |
| used_at | TIMESTAMP | Timestamp of usage |
Method: GET
Description: List all purchases
Method: GET
Description: View single purchase details
Method: POST
Description: Create new purchase
Method: PUT/PATCH
Description: Update an item
Method: DELETE
Description: Delete an Item
Method: GET
Description: View product details, components, and cost
Method: POST
Description: Adjust inventory levels
Method: POST
Description: Create new supplier
Method: POST
Description: Record waste/gift transaction
| Endpoint | Method | Description |
|---|---|---|
| /purchase | GET | List all purchases |
| /purchase/{id} | GET | View single purchase details |
| /purchase | POST | Create new purchase |
| /item/{id} | PUT/PATCH | Update an item |
| /item/{id} | DELETE | Delete an item |
| /product/{id} | GET | View product details, components, and cost |
| /inventory/{id}/adjust | POST | Adjust inventory levels |
| /supplier | POST | Create new supplier |
| /waste-gift | POST | Record waste/gift transaction |