| 1 | # ๐ฆ StockMaster
|
|---|
| 2 |
|
|---|
| 3 | StockMaster is a web-based inventory and sales management platform that enables businesses to manage their stock and sales processes through a single system. The system tracks product inflows and outflows in real time, records sales transactions, and automatically updates stock quantities. Users can manage suppliers, add products, and receive low-stock notifications.
|
|---|
| 4 |
|
|---|
| 5 | ---
|
|---|
| 6 |
|
|---|
| 7 | ## ๐ Features
|
|---|
| 8 |
|
|---|
| 9 | - ๐ **Real-time Inventory Tracking** - Monitor stock levels across multiple warehouses
|
|---|
| 10 | - ๐ **Sales Management** โ Record and manage sales transactions
|
|---|
| 11 | - ๐ญ **Purchase Orders** โ Create and track purchase orders from suppliers
|
|---|
| 12 | - ๐ฌ **Multi-Warehouse Support** โ Manage stock across different warehouse locations
|
|---|
| 13 | - ๐ฅ **User & Role Management** โ Admin, Inventory Manager, Sales Personnel, Warehouse Staff roles
|
|---|
| 14 | - ๐ค **Supplier Management** โ Add and manage supplier information
|
|---|
| 15 | - ๐ค **Customer Management** โ Track customer data and purchase history
|
|---|
| 16 | - ๐๏ธ **Category Management** โ Organize products into categories
|
|---|
| 17 | - โ ๏ธ **Low Stock Alerts** โ Automatic reorder level notifications
|
|---|
| 18 |
|
|---|
| 19 | ---
|
|---|
| 20 |
|
|---|
| 21 | ## ๐ ๏ธ Tech Stack
|
|---|
| 22 |
|
|---|
| 23 | | Layer | Technology |
|
|---|
| 24 | |---|---|
|
|---|
| 25 | | Framework | ASP.NET Core MVC 8.0 |
|
|---|
| 26 | | Language | C# |
|
|---|
| 27 | | Database | PostgreSQL |
|
|---|
| 28 | | ORM | Entity Framework Core |
|
|---|
| 29 | | Frontend | HTML, CSS, Bootstrap |
|
|---|
| 30 | | IDE | Visual Studio 2022 |
|
|---|
| 31 |
|
|---|
| 32 | ---
|
|---|
| 33 |
|
|---|
| 34 | ## ๐๏ธ Project Structure
|
|---|
| 35 |
|
|---|
| 36 | ```
|
|---|
| 37 | StockMaster/
|
|---|
| 38 | โโโ Controllers/ # MVC Controllers
|
|---|
| 39 | โโโ Data/ # DbContext and database configuration
|
|---|
| 40 | โโโ Migrations/ # EF Core migrations
|
|---|
| 41 | โโโ Models/ # Entity models
|
|---|
| 42 | โโโ Services/ # Business logic layer
|
|---|
| 43 | โโโ ViewModels/ # View-specific models
|
|---|
| 44 | โโโ Views/ # Razor views
|
|---|
| 45 | โโโ wwwroot/ # Static files (CSS, JS, images)
|
|---|
| 46 | โโโ appsettings.json # App configuration
|
|---|
| 47 | โโโ Program.cs # Entry point
|
|---|
| 48 | ```
|
|---|
| 49 |
|
|---|
| 50 | ---
|
|---|
| 51 |
|
|---|
| 52 | ## ๐๏ธ Database Schema
|
|---|
| 53 |
|
|---|
| 54 | The database consists of the following tables:
|
|---|
| 55 |
|
|---|
| 56 | - **users** โ System users with roles
|
|---|
| 57 | - **customer** โ Customer records
|
|---|
| 58 | - **category** โ Product categories
|
|---|
| 59 | - **supplier** โ Supplier information
|
|---|
| 60 | - **product** โ Product catalog (linked to category & supplier)
|
|---|
| 61 | - **warehouse** โ Warehouse locations
|
|---|
| 62 | - **warehouse_stock** โ Stock levels per product per warehouse
|
|---|
| 63 | - **sale** โ Sales transactions
|
|---|
| 64 | - **sale_item** โ Individual items in a sale
|
|---|
| 65 | - **purchase_order** โ Orders placed to suppliers
|
|---|
| 66 | - **purchase_order_item** โ Individual items in a purchase order
|
|---|
| 67 |
|
|---|
| 68 | ---
|
|---|
| 69 |
|
|---|
| 70 | ## โ๏ธ Getting Started
|
|---|
| 71 |
|
|---|
| 72 | ### Prerequisites
|
|---|
| 73 |
|
|---|
| 74 | - [.NET 8.0 SDK](https://dotnet.microsoft.com/download)
|
|---|
| 75 | - [PostgreSQL](https://www.postgresql.org/download/)
|
|---|
| 76 | - [Visual Studio 2022](https://visualstudio.microsoft.com/)
|
|---|
| 77 |
|
|---|
| 78 | ### Setup
|
|---|
| 79 |
|
|---|
| 80 | 1. **Clone the repository**
|
|---|
| 81 | ```bash
|
|---|
| 82 | git clone https://github.com/ceydahuseini/StockMaster.git
|
|---|
| 83 | cd StockMaster
|
|---|
| 84 | ```
|
|---|
| 85 |
|
|---|
| 86 | 2. **Configure the database connection**
|
|---|
| 87 |
|
|---|
| 88 | Update `appsettings.json` with your PostgreSQL connection string:
|
|---|
| 89 | ```json
|
|---|
| 90 | "ConnectionStrings": {
|
|---|
| 91 | "DefaultConnection": "Host=localhost;Database=stock_management;Username=your_user;Password=your_password"
|
|---|
| 92 | }
|
|---|
| 93 | ```
|
|---|
| 94 |
|
|---|
| 95 | 3. **Apply migrations**
|
|---|
| 96 | ```bash
|
|---|
| 97 | dotnet ef database update
|
|---|
| 98 | ```
|
|---|
| 99 |
|
|---|
| 100 | 4. **Run the application**
|
|---|
| 101 | ```bash
|
|---|
| 102 | dotnet run
|
|---|
| 103 | ```
|
|---|
| 104 | Or press **F5** in Visual Studio.
|
|---|
| 105 |
|
|---|
| 106 | ---
|
|---|
| 107 |
|
|---|
| 108 | ## ๐ค Default Users
|
|---|
| 109 |
|
|---|
| 110 | The system includes the following roles:
|
|---|
| 111 |
|
|---|
| 112 | | Role |
|
|---|
| 113 | |---|
|
|---|
| 114 | | Admin |
|
|---|
| 115 | | Inventory Manager |
|
|---|
| 116 | | Sales Personnel |
|
|---|
| 117 | | Warehouse Staff |
|
|---|
| 118 |
|
|---|
| 119 | ## ๐๏ธ Database Scripts
|
|---|
| 120 |
|
|---|
| 121 | - ๐ [DDL - Database Schema](./DDL.sql)
|
|---|
| 122 | - ๐ [DML - Sample Data](./DML.sql)
|
|---|
| 123 |
|
|---|
| 124 | ### ๐งช Test Account
|
|---|
| 125 |
|
|---|
| 126 | | Username | Password | Role |
|
|---|
| 127 | |---|---|---|
|
|---|
| 128 | | test_admin | admin123 | Admin |
|
|---|
| 129 |
|
|---|
| 130 | > โ ๏ธ **Note:** Default passwords are for development only. Change them before deploying to production.
|
|---|
| 131 |
|
|---|
| 132 | ---
|
|---|
| 133 |
|
|---|
| 134 | ## ๐ License
|
|---|
| 135 |
|
|---|
| 136 | This project was developed for educational purposes.
|
|---|
| 137 |
|
|---|
| 138 | ---
|
|---|
| 139 |
|
|---|
| 140 | ## ๐ฉโ๐ป Developer
|
|---|
| 141 |
|
|---|
| 142 | **Ceyda Huseini** โ [GitHub](https://github.com/ceydahuseini)
|
|---|