Skip to content

🏭 Modern Warehouse Management System built with .NET 8 | Clean Architecture | WinForms Desktop + ASP.NET Core Web | Enterprise-ready inventory management with barcode scanning, stock tracking, and comprehensive reporting

Notifications You must be signed in to change notification settings

RealAhmedOsama/Warehouse-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“¦ Warehouse Management System (WMS)

A modern, enterprise-grade Warehouse Management System built with .NET 8, featuring both WinForms desktop application and ASP.NET Core web interface using Clean Architecture principles.

.NET License Build Status PRs Welcome

✨ Overview

This Warehouse Management System provides comprehensive inventory management capabilities through two interfaces:

  • πŸ–₯️ WinForms Desktop Application: Professional, scanner-optimized interface for warehouse operations
  • 🌐 ASP.NET Core Web Application: Modern, responsive web interface with Bootstrap 5 styling

Built using Clean Architecture principles with Domain-Driven Design, the system ensures maintainability, testability, and scalability for enterprise-grade warehouse operations.

🎯 Core Features

πŸ“‹ Inventory Management

  • Item Master Data: Complete SKU lifecycle with barcode support
  • Location Hierarchy: Zone β†’ Aisle β†’ Bin structure support
  • Stock Tracking: Real-time inventory levels with location visibility
  • Lot & Serial Tracking: Optional batch and serial number management
  • Multi-Barcode Support: Multiple barcodes per item with validation

πŸ“¦ Warehouse Operations

  • Receiving Process: Scanner-optimized receiving with lot/expiry tracking
  • Putaway Operations: Efficient location-to-location transfers
  • Picking Workflow: Order-based picking with quantity validation
  • Stock Adjustments: Comprehensive adjustment tracking with audit trail
  • Movement History: Complete transaction audit with timestamps

πŸ“Š Reporting & Analytics

  • Dashboard KPIs: Real-time metrics and low-stock alerts
  • Movement Reports: Comprehensive filtering and export capabilities
  • Stock Reports: Current levels, availability, and location details
  • Audit Trail: Complete movement history with user tracking
  • CSV Export: Data export for external analysis

Movement Processing πŸ”„

  • Receipt processing with validation
  • Putaway with location verification
  • Pick processing with availability checks
  • Stock adjustments with audit trail
  • Movement history preservation

Business Rules Enforcement βœ…

  • Item validation (active status, barcode lookup)
  • Location validation (active, receivable/pickable)
  • Quantity validation (positive numbers, availability)
  • Lot requirement enforcement
  • Serial number requirement enforcement

Reporting Capabilities πŸ“ˆ

  • Movement reports by date range
  • Filtering by item, type, and user
  • Real-time stock level reporting
  • CSV export functionality
  • Complete audit trail visibility

User Experience 🎨

  • Scanner-optimized workflow
  • Keyboard navigation (F1-F5 shortcuts)
  • Audio feedback for success/error
  • Responsive UI with progress indicators
  • Clear error messages and validation

πŸ—οΈ Architecture

Clean Architecture Implementation

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   WinForms UI   β”‚   β”‚  ASP.NET Core   β”‚
β”‚   (Desktop)     β”‚   β”‚   (Web MVC)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚   Application   β”‚  ← Use Cases, DTOs, Results
            β”‚     Layer       β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚     Domain      β”‚  ← Entities, Value Objects, Services
            β”‚     Layer       β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚ Infrastructure  β”‚  ← Data Access, External Services
            β”‚     Layer       β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technical Implementation Highlights

Domain Layer

  • Value Objects: Barcode, Quantity with business rules
  • Entities: Rich domain models with encapsulated behavior
  • Repository Contracts: Clean abstraction for data access
  • Domain Services: Complex business operations

Application Layer

  • Use Cases: Single responsibility command handlers
  • Result Pattern: Consistent error handling across operations
  • DTOs: Clean data contracts between layers
  • Validation: Input validation with detailed error messages

Infrastructure Layer

  • EF Core: Code-first with fluent API configurations
  • Repository Pattern: Generic base with specialized implementations
  • Unit of Work: Transaction management and consistency
  • Stock Movement Service: Centralized inventory operations

UI Layer

  • Scanner-First Design: Optimized for barcode workflow
  • Service Integration: Dependency injection for loose coupling
  • Error Handling: User-friendly messages with logging
  • Async Operations: Non-blocking UI with progress feedback

πŸ“‚ Project Structure

πŸ“ Warehouse Management System/
β”œβ”€β”€ 🎯 Wms.Domain/                    # Domain Layer
β”‚   β”œβ”€β”€ Entities/                     # Domain Entities (Item, Location, Stock, etc.)
β”‚   β”œβ”€β”€ ValueObjects/                 # Value Objects (Barcode, Quantity)
β”‚   β”œβ”€β”€ Enums/                       # Domain Enumerations (MovementType)
β”‚   β”œβ”€β”€ Services/                    # Domain Services (IStockMovementService)
β”‚   └── Repositories/                # Repository Interfaces
β”œβ”€β”€ πŸš€ Wms.Application/              # Application Layer
β”‚   β”œβ”€β”€ UseCases/                    # Application Use Cases
β”‚   β”‚   β”œβ”€β”€ Receiving/               # Receiving Operations
β”‚   β”‚   β”œβ”€β”€ Inventory/               # Stock Management
β”‚   β”‚   β”œβ”€β”€ Items/                   # Item Management
β”‚   β”‚   β”œβ”€β”€ Locations/               # Location Management
β”‚   β”‚   β”œβ”€β”€ Picking/                 # Picking Operations
β”‚   β”‚   └── Reports/                 # Reporting
β”‚   β”œβ”€β”€ DTOs/                        # Data Transfer Objects
β”‚   └── Common/                      # Shared Application Logic
β”œβ”€β”€ πŸ”§ Wms.Infrastructure/           # Infrastructure Layer
β”‚   β”œβ”€β”€ Data/                        # Database Context & Configurations
β”‚   β”œβ”€β”€ Repositories/                # Repository Implementations
β”‚   └── Services/                    # External Service Implementations
β”œβ”€β”€ πŸ–₯️ Wms.WinForms/                 # WinForms Desktop Application
β”‚   β”œβ”€β”€ Forms/                       # Application Forms
β”‚   β”‚   β”œβ”€β”€ DashboardForm.cs         # KPI Dashboard
β”‚   β”‚   β”œβ”€β”€ ReceivingForm.cs         # Item Receiving
β”‚   β”‚   β”œβ”€β”€ PutawayForm.cs           # Putaway Operations
β”‚   β”‚   β”œβ”€β”€ PickingForm.cs           # Order Picking
β”‚   β”‚   β”œβ”€β”€ InventoryForm.cs         # Stock Management
β”‚   β”‚   β”œβ”€β”€ ItemManagementForm.cs    # Item Master Data
β”‚   β”‚   └── LocationManagementForm.cs # Location Setup
β”‚   β”œβ”€β”€ Common/                      # UI Helpers & Utilities
β”‚   └── Program.cs                   # Application Entry Point
β”œβ”€β”€ 🌐 Wms.ASP/                      # ASP.NET Core Web Application
β”‚   β”œβ”€β”€ Controllers/                 # MVC Controllers
β”‚   β”œβ”€β”€ Views/                       # Razor Views
β”‚   β”œβ”€β”€ Models/                      # View Models
β”‚   β”œβ”€β”€ wwwroot/                     # Static Assets
β”‚   └── Program.cs                   # Web Application Entry Point
└── πŸ§ͺ Test Projects/                # Unit & Integration Tests
    β”œβ”€β”€ Wms.Domain.Tests/            # Domain Layer Tests
    β”œβ”€β”€ Wms.Application.Tests/       # Application Layer Tests
    └── Wms.Infrastructure.Tests/    # Infrastructure Layer Tests

πŸš€ Getting Started

Prerequisites

πŸ–₯️ Running the Desktop Application

# Clone the repository
git clone https://github.com/RealAhmedOsama/Warehouse-Management-System.git
cd "Warehouse Management System"

# Restore NuGet packages
dotnet restore

# Run the WinForms application
dotnet run --project "Warehouse Management System/Wms.WinForms.csproj"

🌐 Running the Web Application

# Navigate to the web project
cd Wms.ASP

# Run the web application
dotnet run

# Open browser to https://localhost:5001 or http://localhost:5000

πŸ§ͺ Running Tests

# Run all tests
dotnet test

# Run tests with coverage
dotnet test --collect:"XPlat Code Coverage"

# Run specific test project
dotnet test Wms.Domain.Tests/

πŸ“Š Database Schema

Core Entities

Entity Description Key Properties
Warehouse Physical warehouse facilities Code, Name, IsActive
Item Product/SKU master data SKU, Name, UOM, RequiresLot/Serial
Location Hierarchical storage locations Code, Name, IsReceivable/Pickable
Stock Current inventory levels Item + Location + Available/Allocated Qty
Movement Transaction history Type, Item, Location, Quantity, Timestamp
Lot Batch/lot tracking Number, ExpiryDate, ManufacturedDate

Relationships

  • Warehouse β†’ Locations (1:Many)
  • Item β†’ Stock (1:Many)
  • Location β†’ Stock (1:Many)
  • Item β†’ Movements (1:Many)
  • Location β†’ Movements (1:Many)
  • Item β†’ Lots (1:Many)

Sample Data & Testing

Test Items Available

  • WIDGET-001: Basic item (Barcode: 123456789012)
  • GADGET-001: Lot-controlled item (Barcode: 234567890123)
  • TOOL-001: Standard item (Barcode: 345678901234)
  • PART-001: Serial-controlled item (Barcode: 456789012345)
  • CABLE-001: Ethernet Cable 5ft (Barcode: 567890123456)
  • SENSOR-001: Temperature Sensor with Serial (Barcode: 678901234567)

Test Locations Available

  • RECEIVE: Receiving dock (receivable only)
  • Z001: Zone 1 (receivable and pickable)
  • Z001-A001: Aisle 1 (receivable and pickable)
  • Z001-A002: Aisle 2 (receivable and pickable)
  • Z001-A001-01: Bin 01 (receivable and pickable)
  • Z001-A001-02: Bin 02 (receivable and pickable)

Complete Test Workflow

  1. Receive Items: Use barcodes above to receive items to RECEIVE location
  2. Putaway Stock: Move items from RECEIVE to storage locations (Z001-A001-01, etc.)
  3. Check Inventory: View stock levels and locations in Inventory Management
  4. Pick Orders: Pick items from storage locations for orders
  5. Adjust Stock: Make quantity adjustments with reason tracking
  6. Generate Reports: View complete movement history and export data

🎨 User Interface

πŸ–₯️ WinForms Desktop Features

  • Modern Bootstrap-Inspired Design: Professional UI with consistent blue color scheme
  • Keyboard Shortcuts: F1-F8 shortcuts for rapid warehouse operations
  • Real-time Updates: Live dashboard with KPI monitoring every 5 minutes
  • Barcode Integration: Optimized for handheld barcode scanners
  • Audio Feedback: Success/error sounds for scanner operations
  • Print Support: Label and report printing capabilities (planned)

🌐 Web Application Features

  • Responsive Design: Mobile-first Bootstrap 5 implementation
  • Progressive Enhancement: Works on all devices and screen sizes
  • Real-time Alerts: Modern toast notifications for user feedback
  • AJAX Support: Smooth user experience without page reloads
  • Export Capabilities: CSV export for reports and data analysis
  • Container Layout: Centered content for better user experience

UI Enhancement Features

Modern Design System

  • Bootstrap 5-inspired color scheme with consistent primary, secondary, success, warning, danger, and info colors
  • Typography system with proper font hierarchy (H1-H6, body text, small text)
  • Card-based layouts with shadows and rounded corners for better visual organization
  • Modern input controls with focus states and validation styling
  • Responsive button styling with proper hover and disabled states

Form Navigation Shortcuts

Form Shortcut Primary Function
Dashboard - System overview and KPIs
Receiving F1=Receive, F2=Clear Barcode-based receiving
Putaway F1=Putaway, F2=Clear Location transfers
Picking F1=Pick, F2=Clear Order fulfillment
Inventory F1=Refresh, F2=Adjust, F3=Summary Stock management
Items F1=Refresh, F2=Add, F3=Edit Item master data
Locations F1=Refresh, F2=Add, F3=Edit Location master data
Reports F1=Generate, F2=Export Movement reporting

βš™οΈ Configuration

Database Configuration

{
  "ConnectionStrings": {
    "DefaultConnection": "Data Source=warehouse.db"
  }
}

Application Settings

{
  "WMS": {
    "Dashboard": {
      "RefreshIntervalSeconds": 300,
      "LowStockThreshold": 10
    },
    "Barcode": {
      "ScanTimeout": 5000,
      "ValidationEnabled": true
    }
  }
}

πŸ“š API Reference

Key Use Cases

// Receiving an item
var result = await receiveItemUseCase.ExecuteAsync(new ReceiveItemDto
{
    ItemSku = "WIDGET-001",
    LocationCode = "RECEIVE",
    Quantity = 100,
    LotNumber = "LOT123",
    ReferenceNumber = "PO-456"
}, userId);

// Getting stock levels
var stock = await getStockUseCase.ExecuteAsync(new GetStockQuery
{
    ItemSku = "WIDGET-001",
    LocationCode = "A001"
});

// Creating a new item
var item = await createItemUseCase.ExecuteAsync(new CreateItemDto
{
    Sku = "NEW-001",
    Name = "New Product",
    UnitOfMeasure = "EA",
    RequiresLot = true
}, userId);

πŸ”§ Development

Adding New Features

  1. Domain First: Define entities and business rules in Wms.Domain
  2. Use Cases: Implement application logic in Wms.Application
  3. Data Layer: Add repository methods in Wms.Infrastructure
  4. UI Layer: Create forms/views in respective UI projects
  5. Testing: Add unit tests for all layers

Code Standards

  • C# 12 language features with nullable reference types enabled
  • Entity Framework Core code-first approach with fluent API
  • SOLID Principles applied throughout the architecture
  • Clean Code practices with meaningful names and documentation
  • Async/Await pattern for all I/O operations

Architecture Benefits

Maintainability

  • Clear separation of concerns across layers
  • Testable business logic isolated in domain layer
  • Dependency injection enables flexible component composition
  • Centralized error handling with Result pattern

Extensibility

  • New use cases easily added to application layer
  • Additional repositories and services integrated via interfaces
  • UI layers can be added without affecting business logic
  • Plugin architecture ready for third-party integrations

Data Integrity

  • Domain-driven validation rules prevent invalid states
  • Immutable movement history ensures audit trail
  • Transaction management with automatic rollback capability
  • Concurrency handling prevents data conflicts

Performance

  • Async operations prevent UI thread blocking
  • Efficient data access patterns with EF Core
  • Minimal memory footprint with proper disposal
  • Optimized queries with includes and projections

πŸš€ Deployment

Desktop Application

  • Self-contained: Single executable with all dependencies
  • ClickOnce: Automatic updates and easy distribution (planned)
  • MSI Installer: Traditional Windows installation package (planned)

Web Application

  • Self-hosted: Kestrel web server for development
  • IIS Integration: Production deployment on Windows Server
  • Docker Support: Containerized deployment (planned)
  • Cloud Ready: Azure App Service compatible

πŸ“ˆ Performance & Monitoring

  • Serilog Integration: Comprehensive structured logging
  • Performance Counters: Database query and operation timing
  • Error Tracking: Detailed exception logging with context
  • Health Checks: Application health monitoring endpoints (web)

πŸ§ͺ Testing Strategy

  • Unit Tests: Domain logic and use case testing
  • Integration Tests: Database and repository testing
  • UI Tests: Form behavior and workflow testing (planned)
  • Performance Tests: Load testing for web interface (planned)

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow existing code style and architectural patterns
  • Add comprehensive unit tests for new functionality
  • Update documentation for API changes
  • Ensure all tests pass before submitting PR
  • Follow semantic versioning for breaking changes

πŸ“ Changelog

Version 2.0.0 (Current)

  • βœ… Added ASP.NET Core web interface
  • βœ… Modern Bootstrap 5 UI design system
  • βœ… Responsive web design for mobile/tablet
  • βœ… Enhanced error handling with Result pattern
  • βœ… Comprehensive logging with Serilog
  • βœ… Improved database seeding and initialization

Version 1.0.0

  • βœ… Initial WinForms desktop application
  • βœ… Core warehouse operations (receive, putaway, pick)
  • βœ… Item and location management
  • βœ… Stock tracking and adjustments
  • βœ… Movement reporting and audit trail

πŸ“„ License

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

πŸ‘¨β€πŸ’» Author

Ahmed Osama

πŸ™ Acknowledgments

  • Microsoft for the excellent .NET ecosystem and tooling
  • Entity Framework Team for the powerful ORM capabilities
  • Bootstrap Team for the amazing responsive CSS framework
  • Serilog Community for structured logging excellence
  • Open Source Community for inspiration and best practices

πŸ”— Related Documentation


πŸš€ Ready to streamline your warehouse operations?

Get Started Now β€’ View Features β€’ Check Architecture


Built with ❀️ using .NET 8, Clean Architecture, and modern design principles

⭐ Star this repo if you find it helpful!

About

🏭 Modern Warehouse Management System built with .NET 8 | Clean Architecture | WinForms Desktop + ASP.NET Core Web | Enterprise-ready inventory management with barcode scanning, stock tracking, and comprehensive reporting

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published