# ๐Ÿ“ฆ StockMaster 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. --- ## ๐Ÿš€ Features - ๐Ÿ“Š **Real-time Inventory Tracking** - Monitor stock levels across multiple warehouses - ๐Ÿ›’ **Sales Management** โ€” Record and manage sales transactions - ๐Ÿญ **Purchase Orders** โ€” Create and track purchase orders from suppliers - ๐Ÿฌ **Multi-Warehouse Support** โ€” Manage stock across different warehouse locations - ๐Ÿ‘ฅ **User & Role Management** โ€” Admin, Inventory Manager, Sales Personnel, Warehouse Staff roles - ๐Ÿค **Supplier Management** โ€” Add and manage supplier information - ๐Ÿ‘ค **Customer Management** โ€” Track customer data and purchase history - ๐Ÿ—‚๏ธ **Category Management** โ€” Organize products into categories - โš ๏ธ **Low Stock Alerts** โ€” Automatic reorder level notifications --- ## ๐Ÿ› ๏ธ Tech Stack | Layer | Technology | |---|---| | Framework | ASP.NET Core MVC 8.0 | | Language | C# | | Database | PostgreSQL | | ORM | Entity Framework Core | | Frontend | HTML, CSS, Bootstrap | | IDE | Visual Studio 2022 | --- ## ๐Ÿ—‚๏ธ Project Structure ``` StockMaster/ โ”œโ”€โ”€ Controllers/ # MVC Controllers โ”œโ”€โ”€ Data/ # DbContext and database configuration โ”œโ”€โ”€ Migrations/ # EF Core migrations โ”œโ”€โ”€ Models/ # Entity models โ”œโ”€โ”€ Services/ # Business logic layer โ”œโ”€โ”€ ViewModels/ # View-specific models โ”œโ”€โ”€ Views/ # Razor views โ”œโ”€โ”€ wwwroot/ # Static files (CSS, JS, images) โ”œโ”€โ”€ appsettings.json # App configuration โ””โ”€โ”€ Program.cs # Entry point ``` --- ## ๐Ÿ—„๏ธ Database Schema The database consists of the following tables: - **users** โ€” System users with roles - **customer** โ€” Customer records - **category** โ€” Product categories - **supplier** โ€” Supplier information - **product** โ€” Product catalog (linked to category & supplier) - **warehouse** โ€” Warehouse locations - **warehouse_stock** โ€” Stock levels per product per warehouse - **sale** โ€” Sales transactions - **sale_item** โ€” Individual items in a sale - **purchase_order** โ€” Orders placed to suppliers - **purchase_order_item** โ€” Individual items in a purchase order --- ## โš™๏ธ Getting Started ### Prerequisites - [.NET 8.0 SDK](https://dotnet.microsoft.com/download) - [PostgreSQL](https://www.postgresql.org/download/) - [Visual Studio 2022](https://visualstudio.microsoft.com/) ### Setup 1. **Clone the repository** ```bash git clone https://github.com/ceydahuseini/StockMaster.git cd StockMaster ``` 2. **Configure the database connection** Update `appsettings.json` with your PostgreSQL connection string: ```json "ConnectionStrings": { "DefaultConnection": "Host=localhost;Database=stock_management;Username=your_user;Password=your_password" } ``` 3. **Apply migrations** ```bash dotnet ef database update ``` 4. **Run the application** ```bash dotnet run ``` Or press **F5** in Visual Studio. --- ## ๐Ÿ‘ค Default Users The system includes the following roles: | Role | |---| | Admin | | Inventory Manager | | Sales Personnel | | Warehouse Staff | ## ๐Ÿ—„๏ธ Database Scripts - ๐Ÿ“„ [DDL - Database Schema](./DDL.sql) - ๐Ÿ“„ [DML - Sample Data](./DML.sql) ### ๐Ÿงช Test Account | Username | Password | Role | |---|---|---| | test_admin | admin123 | Admin | > โš ๏ธ **Note:** Default passwords are for development only. Change them before deploying to production. --- ## ๐Ÿ“„ License This project was developed for educational purposes. --- ## ๐Ÿ‘ฉโ€๐Ÿ’ป Developer **Ceyda Huseini** โ€” [GitHub](https://github.com/ceydahuseini)