Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“¦ Warehouse Inventory Management System

(ASP.NET Core 8 – Razor Pages – Clean Architecture)

A full-featured Warehouse Inventory Management System built with ASP.NET Core 8 Razor Pages and Entity Framework Core, following Clean Architecture principles.

This project demonstrates how to structure a real-world ASP.NET Core application with:

  • Domain layer
  • Application layer
  • Infrastructure layer
  • Web (UI) layer

It includes authentication, role-based access (Admin & Customer), inventory management, orders, and clean separation of concerns.

.NET 8.0 Entity Framework Core SQL Server License: MIT

πŸš€ Key Features

πŸ” Authentication & Authorization

  • ASP.NET Identity integration
  • Separate Admin and Customer roles
  • Login & Register for both roles
  • Role-based page access

πŸ“¦ Inventory Management (Admin)

  • Create and edit inventory items
  • Manage categories and suppliers
  • Track item status and stock quantity
  • View warehouse logs

πŸ›’ Orders & Cart System (Customer)

  • Browse item catalog
  • View item details
  • Add items to cart
  • Place orders
  • View order history

🧱 Clean Architecture Design

  • Domain entities isolated from UI & database
  • Repository pattern
  • Service layer for business logic
  • DTOs for data transfer
  • AutoMapper for mapping entities to DTOs

πŸ—ƒοΈ Database & Data Management

  • Entity Framework Core (Code First)
  • SQL Server database
  • Migrations support
  • Database seeding
  • Generic repository implementation

πŸ§ͺ Error Handling & Validation

  • Custom exceptions (NotFound, OperationFailed)
  • Server-side validation
  • Model binding

πŸ› οΈ Technologies

  • ASP.NET Core 8.0 (Razor Pages)
  • Entity Framework Core 8.0
  • SQL Server
  • ASP.NET Identity
  • AutoMapper
  • Clean Architecture

πŸ“Έ Snapshots / Screenshots

  • Customer Login

customer login

  • Customer Dashboard

customer dashboard

  • Catalog View (Customer) view items in catalog(customer)

  • View Item Details

view item

  • Customer Cart

customer cart

  • Admin Login

admin login

  • Admin Dashboard

admin dashboard

  • Warehouse Item List

items in warehouse

  • Add New Item

add new item to warehouse

  • Filter Items Modal

filter items modal

  • Supplier List

suppliers in warehouse

  • Add New Supplier

add new supplier to warehouse

  • Warehouse Orders List

orders in warehouse

  • Order Details View

view order details

  • Receive Shipment

recieve shipment

  • Adjust Stock Levels

adjust stock

  • Add Item-Supplier Relation

add relation to items

πŸ“‚ Project Structure (Clean Architecture – Detailed)

πŸ“¦ ASP.NET-Core-8-Warehouse-Inventory-System
β”‚
β”œβ”€β”€ Domain                        β†’ Core business layer
β”‚   β”œβ”€β”€ Entities (Item, Category, Supplier, Order, OrderItem, WarehouseLog, Status enums)
β”‚   β”œβ”€β”€ Interfaces (IRepository, IOrderItemRepository)
β”‚   └── Domain.csproj
β”‚
β”œβ”€β”€ Application                   β†’ Application contracts & DTOs
β”‚   β”œβ”€β”€ DTOs (ItemDto, OrderDto, SupplierDto, CategoryDto, ItemFilterDto, WarehouseLogDto)
β”‚   β”œβ”€β”€ Interfaces (IItemsService, IOrderService, ISupplierService, ICategoryService, IAdminService, ICustomerService)
β”‚   β”œβ”€β”€ Mappings (AutoMapper profile)
β”‚   β”œβ”€β”€ Common/Exceptions (NotFoundException, OperationFailedException)
β”‚   └── Application.csproj
β”‚
β”œβ”€β”€ Infrastructure                β†’ Implementations & data access
β”‚   β”œβ”€β”€ Data (AppDbContext, Repository, OrderItemRepository)
β”‚   β”œβ”€β”€ Services (ItemService, OrderService, SupplierService, CategoryService, WarehouseLogService, ItemStatusService)
β”‚   β”œβ”€β”€ Identity (ApplicationUser, IdentityService, AdminService, CustomerService, Role seeding)
β”‚   β”œβ”€β”€ Migrations
β”‚   └── Infrastructure.csproj
β”‚
β”œβ”€β”€ Web                           β†’ Presentation layer (Razor Pages UI)
β”‚   β”œβ”€β”€ Pages
β”‚   β”‚   β”œβ”€β”€ Admin (Auth, Items, Orders, Suppliers)
β”‚   β”‚   β”œβ”€β”€ Customer (Auth, Catalogs, Carts)
β”‚   β”‚   β”œβ”€β”€ Shared (_Layout, Sidebars)
β”‚   β”‚   └── Index.cshtml
β”‚   β”‚
β”‚   β”œβ”€β”€ wwwroot (CSS, JS, images)
β”‚   β”œβ”€β”€ Program.cs (Dependency Injection & middleware)
β”‚   β”œβ”€β”€ appsettings.json
β”‚   └── Web.csproj
β”‚
└── Warehouse.sln

🧠 Architecture Overview

This project follows Clean Architecture:

πŸ”Ή Domain Layer

Contains only business entities and repository contracts:

  • Item, Order, Supplier, WarehouseLog
  • IRepository

No dependency on EF Core or UI.

πŸ”Ή Application Layer

Defines use-cases and data transfer:

  • DTOs
  • Service interfaces
  • AutoMapper profile
  • Custom exceptions

πŸ”Ή Infrastructure Layer

Implements application contracts using:

  • EF Core (AppDbContext)
  • Repository pattern
  • Business services
  • ASP.NET Identity
  • Database migrations

πŸ”Ή Web Layer

Razor Pages UI:

  • Admin area
  • Customer area
  • Authentication pages
  • Layout & shared components
  • Dependency injection configuration

βš™οΈ Installation & Setup

  1. Clone the repository:
git clone https://github.com/Alireza-Jafari-tech/ASP.NET-Core-8-Warehouse-Inventory-System.git
cd ASP.NET-Core-8-Warehouse-Inventory-System
  1. Update connection string in Web/appsettings.json:
"ConnectionStrings": {
  "DefaultConnection": "Server=localhost;Database=WarehouseDb;Trusted_Connection=True;TrustServerCertificate=True"
}
  1. Apply migrations:
dotnet ef database update
  1. Run the application:
dotnet run --project Web
  1. Open in browser:
[http://localhost:5258]
  1. Demo Accounts:
  • Admin User:
  • Customer Account:

πŸ§‘β€πŸ’» Usage

Admin

  • Login/Register as Admin
  • Manage items, categories, suppliers
  • View and manage orders
  • Track warehouse logs

Customer

  • Register/Login
  • Browse catalog
  • Add items to cart
  • Place orders
  • View order history

🎯 Learning Goals

  • Apply Clean Architecture in ASP.NET Core
  • Implement Repository & Service patterns
  • Work with ASP.NET Identity
  • Build real-world Razor Pages UI
  • Practice EF Core migrations
  • Implement DTOs and AutoMapper
  • Understand layered architecture

πŸ“ License

This project is licensed under the MIT License. See the LICENSE file for details.

🀝 Contributing

This project is for learning purposes, but feel free to fork and improve it. Suggestions, issues, and pull requests are welcome!

About

Warehouse Inventory System built with ASP.NET Core 8 Razor Pages. Demonstrates async EF Core operations, repository/service patterns, dependency injection, and layered architecture. Supports item management, stock control, and transactional updates

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages