Skip to content

An ASP.NET Core MVC inventory management system with advanced partial fulfillment tracking, real-time stock monitoring, and automated status management. Features Excel export, DataTables integration, and role-based access control for efficient lab supply and purchase order management.

License

Notifications You must be signed in to change notification settings

Karinateii/InventoryManagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Laboratory Inventory Management System

License: MIT

Web application for managing laboratory supplies, suppliers, and purchase orders. Built with ASP.NET Core MVC and Entity Framework Core.

Features

  • Track lab supplies with quantity monitoring and reorder alerts
  • Manage supplier information and contact details
  • Create and track purchase orders with partial fulfillment support
  • Upload product images
  • Role-based access control (Admin/User roles)
  • Responsive Bootstrap UI with DataTables
  • AJAX operations and form validation

Tech Stack

Backend: ASP.NET Core 8.0 MVC, Entity Framework Core, SQL Server, ASP.NET Core Identity

Frontend: Bootstrap 5, jQuery, DataTables, SweetAlert2

Patterns: Repository Pattern, Unit of Work, Dependency Injection

Architecture

Layered architecture with clear separation:

Presentation → Models → Data Access → Database

See ARCHITECTURE.md for details.

Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/Karinateii/InventoryManagement.git
    cd InventoryManagement
  2. Configure the database connection

    Update the connection string in appsettings.json:

    {
      "ConnectionStrings": {
        "DefaultConnection": "Server=(LocalDb)\\MSSQLLocalDb;Database=LIMS;Trusted_Connection=True;TrustServerCertificate=True;"
      }
    }
  3. Restore NuGet packages

    dotnet restore
  4. Apply database migrations

    cd InventoryManagement
    dotnet ef database update
  5. Run the application

    dotnet run
  6. Access the application

    Navigate to: https://localhost:5001

Screenshots

Dashboard

Admin Dashboard

Lab Supplies Management

Lab Supplies List

Create Lab Supply

Purchase Orders with Partial Fulfillment Tracking

Purchase Orders

Create Purchase Order

Stock Adjustment

Stock Adjustment

Supplier Management

Suppliers List

Authentication

Login Page

Project Structure

InventoryManagement/
├── Inventory.DataAccess/          # Data access layer
│   ├── Data/
│   │   └── AppDbContext.cs        # EF Core DbContext
│   ├── Migrations/                # EF Core migrations
│   └── Repository/                # Repository implementations
│       ├── IRepository/           # Repository interfaces
│       ├── Repository.cs          # Generic repository
│       ├── LabSupplyRepository.cs
│       ├── SupplierRepository.cs
│       └── UnitOfWork.cs
│
├── Inventory.Models/              # Domain models and ViewModels
│   ├── Models/
│   │   ├── LabSupply.cs
│   │   ├── Supplier.cs
│   │   ├── PurchaseOrder.cs
│   │   └── ErrorViewModel.cs
│   ├── ViewModels/
│   │   └── LabSupplyVM.cs
│   └── ApplicationUser.cs         # Extended Identity user
│
├── Inventory.Utility/             # Cross-cutting concerns
│   ├── SD.cs                      # Static constants
│   └── EmailSender.cs             # Email service
│
└── InventoryManagement/           # Main web application
    ├── Areas/
    │   ├── Admin/                 # Admin area
    │   │   ├── Controllers/
    │   │   └── Views/
    │   ├── Identity/              # Identity scaffolded pages
    │   └── User/                  # User area
    ├── Controllers/               # Root controllers
    ├── Views/                     # Razor views
    ├── wwwroot/                   # Static files
    │   ├── css/
    │   ├── js/
    │   └── images/
    ├── appsettings.json
    └── Program.cs                 # Application entry point

Database Schema

Core Entities

LabSupply

  • SupplyID (PK)
  • SupplyName
  • QuantityOnHand
  • ReorderPoint
  • ImageURL
  • SupplierID (FK → Supplier)

Supplier

  • SupplierID (PK)
  • SupplierName
  • ContactPerson
  • ContactEmail

PurchaseOrder

  • OrderID (PK)
  • SupplyID (FK → LabSupply)
  • OrderDate
  • QuantityOrdered
  • OrderStatus

Relationships

  • One-to-Many: Supplier → LabSupplies
  • One-to-Many: LabSupply → PurchaseOrders

Routes

Lab Supplies

Method Endpoint Description
GET /Admin/LabSupplies/Index List all supplies
GET /Admin/LabSupplies/Upsert/{id?} Create/Edit form
POST /Admin/LabSupplies/Upsert Create/Update supply
GET /Admin/LabSupplies/GetAll JSON data for DataTables
DELETE /Admin/LabSupplies/Delete/{id} Delete supply (AJAX)

Suppliers

Method Endpoint Description
GET /Admin/Suppliers/Index List all suppliers
GET /Admin/Suppliers/Create Create form
POST /Admin/Suppliers/Create Create supplier
GET /Admin/Suppliers/Edit/{id} Edit form
POST /Admin/Suppliers/Edit Update supplier
GET /Admin/Suppliers/Delete/{id} Delete confirmation
POST /Admin/Suppliers/Delete Delete supplier

Purchase Orders

Method Endpoint Description
GET /PurchaseOrders/Index List all orders
GET /PurchaseOrders/Create Create form
POST /PurchaseOrders/Create Create order
GET /PurchaseOrders/Edit/{id} Edit form
POST /PurchaseOrders/Edit Update order
GET /PurchaseOrders/Delete/{id} Delete confirmation
POST /PurchaseOrders/Delete Delete order

Development

Building the Project

dotnet build

Running Tests

dotnet test

Creating a New Migration

cd Inventory.DataAccess
dotnet ef migrations add MigrationName --startup-project ../InventoryManagement

Contributing

Pull requests are welcome. For major changes, please open an issue first.

License

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

Author

Doutimiwei Ebenezer

About

An ASP.NET Core MVC inventory management system with advanced partial fulfillment tracking, real-time stock monitoring, and automated status management. Features Excel export, DataTables integration, and role-based access control for efficient lab supply and purchase order management.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published