GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - Oh011/Inventory_system: Inventory & Order Management System built with ASP.NET Core, Clean Architecture, CQRS, SignalR, and EF Core with real-time stock control, purchase orders, invoicing, PDF exports, and domain event-driven workflows.

BranchesTags
Open more actions menu

Latest commit

 

History

57 Commits
57 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
images
images
 
 
src
src
 
 
.dockerignore
.dockerignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
InventorySystem.sln
InventorySystem.sln
 
 
README.md
README.md
 
 

Repository files navigation

-Inventory_System

Inventory & Order Management System built with ASP.NET Core & Clean Architecture. Features include role-based authentication, product & category management, purchase orders, sales invoicing, real-time stock control, PDF export, notifications, and reporting.

Designed for scalability, testability, and real-world business workflows such as product tracking, sales invoicing, stock adjustment, and purchase order lifecycle handling โ€” including Domain Events, Background Services, and Real-Time Notifications using SignalR.

๐Ÿ“„ API Documentation: View PDF


๐Ÿ› ๏ธ Tech Stack

  • Backend: ASP.NET Core 8, EF Core
  • Real-time: SignalR
  • Database: SQL Server
  • PDF generation: QuestPDF
  • Patterns: Clean Architecture, CQRS, Domain Events

โš™๏ธ Requirements & Setup (Without Docker)

โœ… Requirements

Make sure you have installed:

  • .NET 8 SDK
  • SQL Server (LocalDB or full instance)
  • Visual Studio 2022 or Visual Studio Code

๐Ÿš€ Setup Steps

1. Clone the repository

git clone https://github.com/Oh011/Inventory_system.git
cd Inventory_System

2.Configure appsettings.json

In src/InventorySystem.Api/appsettings.json, update the configuration:

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=YOUR_SQL_SERVER;Database=InventorySystem;Trusted_Connection=True;TrustServerCertificate=True;MultipleActiveResultSets=True"
  },

  "JwtOptions": {
    "Issuer": "your-app",
    "Audience": "your-app-users",
    "SecretKey": "your-super-secret-key"
  },

  "SmtpOptions": {
    "Host": "smtp.yourmail.com",
    "Port": 587,
    "UserName": "[email protected]",
    "Password": "your-email-password",
    "EnableSsl": true
  },

  "LinkOptions": {
    "BaseUrl": "http://localhost:4200"
  }
}

3. Apply EF Core migrations

dotnet ef database update --project src/InventorySystem.Infrastructure --startup-project src/InventorySystem.Api
4. Run the API
cd src/InventorySystem.Api
dotnet run

๐Ÿ–ฅ๏ธ API Endpoints & Test Account

You can explore all API endpoints using Swagger:
Swagger UI

Test Account

Use the following credentials to test authentication and API calls:

  • Email: [email protected]
  • Password: Admin#123
  • DeviceId: A1

๐Ÿ“‚ Project Structure

src/
โ”œโ”€โ”€ InventorySystem.Api            # Presentation layer (controllers, middlewares, config)
โ”œโ”€โ”€ InventorySystem.Application    # CQRS commands, queries, DTOs, validators
โ”œโ”€โ”€ InventorySystem.Domain         # Entities, Enums, Domain Events
โ”œโ”€โ”€ InventorySystem.Infrastructure # EF Core, Repositories, Identity, Services
โ””โ”€โ”€ Shared                         # Shared DTOs, constants, error models

๐Ÿ—„๏ธ ERD (Entity Relationship Diagram)

The diagram below shows the core tables and relationships of the Inventory & Order Management System.
It focuses on the main entities like Products, Categories, Customers, Employees, Orders, and Suppliers.

ERD Diagram

Note: Some technical or auxiliary tables (like notifications, logs, or Identity internal tables) are omitted for clarity.


๐Ÿ—๏ธ Architecture Highlights

  • โœ… Clean Architecture (Domain, Application, Infrastructure, WebAPI)
  • โœ… CQRS with MediatR for commands and queries
  • โœ… Domain Events for triggering side effects like:
    • ๐Ÿ“ง Sending emails when a Purchase Order is Created, Received, or Cancelled
    • ๐Ÿ”” Sending real-time SignalR notifications
    • ๐Ÿ“‰ Automatically checking for low-stock products after stock adjustments
  • โœ… SignalR for real-time notifications (e.g., low stock alerts, PO updates)
  • โœ… Background Services for deferred or long-running domain operations
  • โœ… SQL atomic updates to guarantee stock integrity at the database level.
  • โœ… Role-based Authorization (Admin, Manager, Sales, Warehouse)
  • โœ… Soft Deletion, Optimistic Concurrency, FluentValidation pipeline
  • โœ… Applied the Observer pattern with Domain Events, SignalR, and Background Services to decouple workflows (e.g., triggering real-time notifications and emails when purchase orders are created or updated).

๐Ÿ”ฅ Key Features

  • ๐Ÿ” Authentication & Refresh Tokens
  • ๐Ÿงพ Sales Invoicing
  • ๐Ÿ“ฆ Inventory Control with value reports & manual adjustments
  • ๐Ÿ›’ Purchase Orders (create, cancel, receive, export to PDF)
  • ๐Ÿง Employee, Customer & Supplier Management
  • ๐Ÿ“Š Sales Reports + PDF export
  • ๐Ÿ”” Real-time Notifications with SignalR
  • ๐Ÿ“ƒ Stock Adjustment Logs + PDF export

๐Ÿ“ฌ Notable Domain Events

  • ๐ŸŸก PurchaseOrderStatusChangedDomainEvent:

    • Sends SignalR notifications to warehouse users
    • Emails supplier with the order details
  • ๐Ÿ”ด ProductStockDecreasedDomainEvent:

    • Automatically triggers low stock warning
    • Sends SignalR notification to managers

๐Ÿง  How CQRS Works Here

  • Commands โ†’ Handlers โ†’ Services for business logic
  • Queries โ†’ Handlers for read-only views
  • MediatR decouples the flow
  • Validators run in the pipeline before command handlers

PDF Previews

Purchase Order PDF: Purchase Order PDF

Sales Invoice PDF: Sales Invoice PDF

Sales Report PDF: Sales Report PDF


๐Ÿ“ก Real-Time with SignalR

  • NotificationHub broadcasts:
    • ๐Ÿ”” New domain event-based notifications
    • ๐Ÿ“‰ Low-stock warnings
    • โœ… Purchase order status updates

About

Inventory & Order Management System built with ASP.NET Core, Clean Architecture, CQRS, SignalR, and EF Core with real-time stock control, purchase orders, invoicing, PDF exports, and domain event-driven workflows.

smartinventory.runasp.net

Topics

aspnetcoreclean-architecturecqrsdomain-eventsdotnetef-coreinventory-managementmediatrquestpdfreal-timesignalrsql-serverwebapi

Resources

Readme
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.