ο»Ώ# π¦ 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.
β¨ 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
- .NET 8 SDK
- Visual Studio 2022 or VS Code
- SQLite (embedded database - no additional setup required)
π₯οΈ 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
- Receive Items: Use barcodes above to receive items to RECEIVE location
- Putaway Stock: Move items from RECEIVE to storage locations (Z001-A001-01, etc.)
- Check Inventory: View stock levels and locations in Inventory Management
- Pick Orders: Pick items from storage locations for orders
- Adjust Stock: Make quantity adjustments with reason tracking
- 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
- Domain First: Define entities and business rules in
Wms.Domain - Use Cases: Implement application logic in
Wms.Application - Data Layer: Add repository methods in
Wms.Infrastructure - UI Layer: Create forms/views in respective UI projects
- 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
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - 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
- GitHub: @RealAhmedOsama
- LinkedIn: Ahmed Osama
- Email: Contact via GitHub
π 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!