Smart Retail Order & Inventory Analytics Platform
RetailPulse is a modern Inventory and Order Management System developed using ASP.NET Core MVC, ASP.NET Core Web API, Entity Framework Core, SQL Server, JWT Authentication, Repository Pattern, Service Layer Pattern, SOLID Principles, and MSTest.
The platform helps retail businesses efficiently manage products, suppliers, inventory transactions, orders, and business analytics through a secure, scalable, and maintainable architecture.
- Overview
- Business Problem
- Project Objectives
- Key Features
- Technology Stack
- System Architecture
- Project Structure
- Database Design
- Authentication & Authorization
- Frontend and Backend Connectivity
- Business Rules
- Design Patterns Used
- OOP Principles Applied
- SOLID Principles Applied
- Dashboard Features
- API Documentation
- Unit Testing
- DevOps Assets
- AI Assistance
- Installation Guide
- Running the Application
- Screenshots
- Future Enhancements
- Live Application Comparison
- Author
RetailPulse is a centralized retail operations platform that enables businesses to manage inventory, suppliers, products, stock movements, and customer orders while providing business insights through an analytics dashboard.
The application follows a layered architecture using ASP.NET Core technologies and modern software engineering best practices.
Retail businesses frequently face challenges such as:
- Manual inventory tracking
- Inaccurate stock levels
- Delayed order processing
- Lack of inventory visibility
- Limited supplier management
- Insufficient reporting capabilities
- Data inconsistencies
RetailPulse addresses these challenges through a centralized and secure inventory management platform.
The primary objectives of RetailPulse are:
- Manage products efficiently
- Manage categories and suppliers
- Track inventory transactions
- Process customer orders
- Generate business reports
- Monitor stock levels
- Provide dashboard analytics
- Implement secure authentication
- Implement role-based authorization
- Apply modern software engineering practices
- Implement RESTful APIs
- Perform unit testing
- JWT Authentication
- Role-Based Authorization
- Secure Login
- Protected API Endpoints
- Session Management
Supported Roles:
- Admin
- Manager
- Staff
The dashboard provides:
- Total Products
- Total Categories
- Total Suppliers
- Total Orders
- Total Revenue
- Low Stock Alerts
- Sales Trend Analysis
- Category Distribution Analysis
- Inventory Summary
- Recent Inventory Transactions
Features:
- Add Category
- Edit Category
- Delete Category
- View Categories
- Search Categories
Features:
- Add Supplier
- Edit Supplier
- Delete Supplier
- View Suppliers
Features:
- Add Product
- Edit Product
- Delete Product
- Product Search
- Category Mapping
- Supplier Mapping
- Inventory Tracking
Features:
- Stock In
- Stock Out
- Inventory Transaction History
- Low Stock Monitoring
- Inventory Analytics
Features:
- Create Orders
- View Orders
- Delete Orders
- Revenue Tracking
Features:
- Sales Reports
- Inventory Reports
- Dashboard Reports
- Revenue Analytics
- ASP.NET Core MVC (.NET 8)
- Razor Views
- Bootstrap 5
- SB Admin Template
- HTML5
- CSS3
- JavaScript
- Chart.js
- ASP.NET Core Web API (.NET 8)
- C#
- RESTful API Architecture
- SQL Server
- Entity Framework Core
- EF Core Migrations
- Code First Approach
- JWT Authentication
- Role-Based Authorization
- MSTest
- Moq
- Git
- GitHub
- GitHub Actions
- Docker
RetailPulse follows a layered architecture pattern.
Users
│
▼
ASP.NET Core MVC Frontend
│
▼
ASP.NET Core Web API
│
▼
Service Layer
│
▼
Repository Layer
│
▼
Entity Framework Core
│
▼
SQL Server Database
- Separation of Concerns
- Scalability
- Maintainability
- Reusability
- Testability
- Security
RetailOrderInventoryAnalytics
│
├── RetailOrderInventoryAnalytics.API
│
├── RetailOrderInventoryAnalytics.MVC
│
├── RetailOrderInventoryAnalytics.Tests
│
├── .github
│ └── workflows
│ └── dotnet.yml
│
├── AI Assets
│ └── CopilotPromptLog.txt
│
├── Dockerfile
│
└── RetailOrderInventoryAnalytics.sln
RetailOrderInventoryAnalytics.API
│
├── Controllers
│ ├── AuthController.cs
│ ├── CategoryController.cs
│ ├── SupplierController.cs
│ ├── ProductController.cs
│ ├── InventoryController.cs
│ ├── OrderController.cs
│ ├── DashboardController.cs
│ ├── ReportsController.cs
│
├── Data
│ ├── ApplicationDbContext.cs
│ └── DbSeeder.cs
│
├── Models
│ │
│ ├── Entities
│ │ ├── User.cs
│ │ ├── Role.cs
│ │ ├── Category.cs
│ │ ├── Supplier.cs
│ │ ├── Product.cs
│ │ ├── InventoryTransaction.cs
│ │ ├── Order.cs
│ │ ├── OrderItem.cs
│ │ ├── SalesForecast.cs
│ │ └── AuditLog.cs
│ │
│ ├── DTOs
│ │ ├── LoginDto.cs
│ │ ├── RegisterDto.cs
│ │ ├── UserDto.cs
│ │ ├── CategoryDto.cs
│ │ ├── SupplierDto.cs
│ │ ├── ProductDto.cs
│ │ ├── OrderDto.cs
│ │ ├── InventoryTransactionDto.cs
│ │ └── SalesForecastDto.cs
│ │
│ └── ViewModels
│
├── Repositories
│ │
│ ├── Interfaces
│ │ ├── IUserRepository.cs
│ │ ├── ICategoryRepository.cs
│ │ ├── ISupplierRepository.cs
│ │ ├── IProductRepository.cs
│ │ ├── IInventoryRepository.cs
│ │ ├── IOrderRepository.cs
│ │ └── IAuditRepository.cs
│ │
│ ├── UserRepository.cs
│ ├── CategoryRepository.cs
│ ├── SupplierRepository.cs
│ ├── ProductRepository.cs
│ ├── InventoryRepository.cs
│ ├── OrderRepository.cs
│ └── AuditRepository.cs
│
├── Services
│ │
│ ├── Interfaces
│ │ ├── IAuthService.cs
│ │ ├── ICategoryService.cs
│ │ ├── ISupplierService.cs
│ │ ├── IProductService.cs
│ │ ├── IInventoryService.cs
│ │ ├── IOrderService.cs
│ │ ├── IReportService.cs
│ │ ├── IForecastService.cs
│ │ └── IDashboardService.cs
│ │
│ ├── AuthService.cs
│ ├── CategoryService.cs
│ ├── SupplierService.cs
│ ├── ProductService.cs
│ ├── InventoryService.cs
│ ├── OrderService.cs
│ ├── ReportService.cs
│ ├── ForecastService.cs
│ └── DashboardService.cs
│
├── Helpers
│ ├── JwtHelper.cs
│ ├── PasswordHelper.cs
│
├── Middleware
│ └── ExceptionMiddleware.cs
│
├── Mappings
│ └── MappingProfile.cs
│
├── Reports
│ ├── PdfReportGenerator.cs
│ └── ExcelReportGenerator.cs
│
├── Migrations
│
├── appsettings.json
├── appsettings.Development.json
└── Program.cs
RetailOrderInventoryAnalytics.MVC
│
├── Controllers
│ ├── AccountController.cs
│ ├── DashboardController.cs
│ ├── CategoryController.cs
│ ├── SupplierController.cs
│ ├── ProductController.cs
│ ├── InventoryController.cs
│ ├── OrderController.cs
│ └── ReportsController.cs
│
├── Models
│ ├── LoginViewModel.cs
│ ├── RegisterViewModel.cs
│ ├── CategoryViewModel.cs
│ ├── SupplierViewModel.cs
│ ├── ProductViewModel.cs
│ ├── OrderViewModel.cs
│ ├── DashboardViewModel.cs
│ └── ForecastViewModel.cs
│
├── Services
│ ├── ApiService.cs
│ ├── AuthApiService.cs
│ ├── ProductApiService.cs
│ ├── CategoryApiService.cs
│ ├── SupplierApiService.cs
│ ├── InventoryApiService.cs
│ ├── OrderApiService.cs
│ └── ReportApiService.cs
│
├── Views
│ │
│ ├── Account
│ │ ├── Login.cshtml
│ │ └── Register.cshtml
│ │
│ ├── Dashboard
│ │ └── Index.cshtml
│ │
│ ├── Category
│ │ ├── Index.cshtml
│ │ ├── Create.cshtml
│ │ ├── Edit.cshtml
│ │ └── Details.cshtml
│ │
│ ├── Supplier
│ │ ├── Index.cshtml
│ │ ├── Create.cshtml
│ │ ├── Edit.cshtml
│ │ └── Details.cshtml
│ │
│ ├── Product
│ │ ├── Index.cshtml
│ │ ├── Create.cshtml
│ │ ├── Edit.cshtml
│ │ └── Details.cshtml
│ │
│ ├── Inventory
│ │ └── Index.cshtml
│ │
│ ├── Order
│ │ ├── Index.cshtml
│ │ ├── Create.cshtml
│ │ └── Details.cshtml
│ │
│ ├── Reports
│ │ └── Index.cshtml
│ │
│ └── Shared
│ ├── _Layout.cshtml
│ ├── _ValidationScriptsPartial.cshtml
│ └── Error.cshtml
│
├── wwwroot
│ ├── css
│ ├── js
│ ├── images
│ └── lib
│
├── appsettings.json
└── Program.cs
RetailOrderInventoryAnalytics.Tests
│
├── Controllers
│ ├── AuthControllerTests.cs
│ ├── ProductControllerTests.cs
│ ├── CategoryControllerTests.cs
│ └── SupplierControllerTests.cs
│
├── Services
│ ├── AuthServiceTests.cs
│ ├── ProductServiceTests.cs
│ ├── CategoryServiceTests.cs
│ ├── SupplierServiceTests.cs
│ └── InventoryServiceTests.cs
│
├── Repositories
│ ├── ProductRepositoryTests.cs
│ ├── CategoryRepositoryTests.cs
│ └── SupplierRepositoryTests.cs
│
├── TestHelpers
│ ├── MockData.cs
│ └── TestDbContextFactory.cs
│
└── Usings.cs
Stores authentication and role information.
Fields:
- UserId
- Username
- PasswordHash
- Role
Stores category information.
Fields:
- CategoryId
- CategoryName
- Description
Stores supplier information.
Fields:
- SupplierId
- SupplierName
- ContactNumber
Stores product details.
Fields:
- ProductId
- ProductName
- CategoryId
- SupplierId
- Price
- QuantityInStock
Stores customer order information.
Fields:
- OrderId
- OrderDate
- TotalAmount
Stores inventory movement history.
Fields:
- TransactionId
- ProductId
- TransactionType
- Quantity
- TransactionDate
Category (1)
│
└──────► Product (Many)
Supplier (1)
│
└──────► Product (Many)
Product (1)
│
└──────► InventoryTransaction (Many)
User Login
│
▼
Credential Validation
│
▼
JWT Token Generation
│
▼
Token Returned
│
▼
Protected API Access
Roles Supported:
- Admin
- Manager
- Staff
Role-based access is enforced across the application.
User
│
▼
MVC View
│
▼
MVC Controller
│
▼
MVC Service
│
▼
Web API
│
▼
Service Layer
│
▼
Repository Layer
│
▼
Entity Framework Core
│
▼
SQL Server
The following business rules are implemented:
- Only authenticated users can access protected modules.
- Users are assigned roles.
- Categories must exist before products can be created.
- Suppliers must exist before products can be created.
- Product names are mandatory.
- Product prices must be valid.
- Inventory quantities cannot become negative.
- Inventory transactions update stock levels.
- Orders require valid products.
- Dashboard analytics are generated from business data.
Repositories:
- UserRepository
- CategoryRepository
- SupplierRepository
- ProductRepository
- OrderRepository
- InventoryRepository
Purpose:
- Data Access Abstraction
- Loose Coupling
- Maintainability
Services:
- AuthService
- CategoryService
- SupplierService
- ProductService
- OrderService
- InventoryService
Purpose:
- Business Logic Separation
- Reusability
- Clean Architecture
Implemented through entity classes.
Implemented using interfaces.
Implemented through MVC and API controller inheritance.
Implemented through interface implementations.
Controllers, Services, and Repositories have separate responsibilities.
Implemented using interfaces and abstractions.
Interface implementations are interchangeable.
Small focused interfaces are used.
Implemented using Dependency Injection.
The Dashboard includes:
- Total Products KPI
- Total Categories KPI
- Total Suppliers KPI
- Total Orders KPI
- Total Revenue KPI
- Low Stock Alerts
- Category Distribution Chart
- Sales Trend Chart
- Inventory Analytics
- Recent Inventory Transactions
POST /api/auth/login
POST /api/auth/registerGET /api/category
GET /api/category/{id}
POST /api/category
PUT /api/category/{id}
DELETE /api/category/{id}GET /api/supplier
POST /api/supplier
PUT /api/supplier/{id}
DELETE /api/supplier/{id}GET /api/product
POST /api/product
PUT /api/product/{id}
DELETE /api/product/{id}GET /api/inventory
POST /api/inventoryGET /api/order
POST /api/order
DELETE /api/order/{id}Testing Framework:
- MSTest
Mocking Framework:
- Moq
Test Cases:
- Login with Valid Credentials
- Login with Invalid Credentials
- GetAllCategoriesAsync
- AddCategoryAsync
- DeleteCategoryAsync
- AddSupplierAsync
- GetAllSuppliersAsync
- AddProductAsync
- GetProductByIdAsync
- AddInventoryTransactionAsync
- CreateOrderAsync
- DeleteOrderAsync
- Validation Test Cases
Result:
Passed : 13
Failed : 0
File:
.github/workflows/dotnet.yml
Pipeline Tasks:
- Restore Packages
- Build Solution
- Execute Unit Tests
File:
Dockerfile
Purpose:
- Containerized Deployment
- Environment Consistency
- Portability
git clone <repository-url>dotnet restoreUpdate-Databasedotnet run --project RetailOrderInventoryAnalytics.APIdotnet run --project RetailOrderInventoryAnalytics.MVCThe application follows a layered architecture consisting of MVC Frontend, Web API, Service Layer, Repository Layer, Entity Framework Core, and SQL Server.
The database design illustrates the relationships between Users, Categories, Suppliers, Products, Orders, and Inventory Transactions.
The Login module provides secure access to the application using JWT Authentication.
The Registration module allows new users to create accounts and access the platform.
The Dashboard provides real-time business analytics and inventory insights.
Features:
- Total Products
- Total Categories
- Total Suppliers
- Total Orders
- Total Revenue
- Low Stock Alerts
- Sales Analytics
- Inventory Analytics
The Category Management module allows administrators to manage product categories.
Features:
- Add Category
- Edit Category
- Delete Category
- Search Categories
The Supplier Management module manages supplier information and contact details.
Features:
- Add Supplier
- Edit Supplier
- Delete Supplier
- View Suppliers
The Product Management module manages inventory products.
Features:
- Add Product
- Edit Product
- Delete Product
- Assign Categories
- Assign Suppliers
- Manage Stock
The Inventory module tracks stock movement and inventory transactions.
Features:
- Stock In
- Stock Out
- Inventory History
- Transaction Tracking
The Order module manages customer orders and revenue tracking.
Features:
- Create Orders
- View Orders
- Delete Orders
- Revenue Monitoring
The Reports module provides business insights and inventory analytics.
Features:
- Sales Reports
- Inventory Reports
- Revenue Analytics
- Dashboard Reports
Swagger provides interactive API documentation and endpoint testing.
User
│
▼
ASP.NET Core MVC Frontend
│
▼
ASP.NET Core Web API
│
▼
Service Layer
│
▼
Repository Layer
│
▼
Entity Framework Core
│
▼
SQL Server Database
- User logs into RetailPulse.
- JWT token is generated after successful authentication.
- Dashboard loads business analytics.
- Categories, Suppliers, and Products are managed.
- Inventory transactions update stock levels.
- Orders are processed and recorded.
- Reports and analytics are generated.
- Dashboard reflects real-time business metrics.
- Email Notifications
- Excel Export
- PDF Export
- SignalR Notifications
- AI-Based Sales Forecasting
- Cloud Deployment (Azure)
- Mobile Application
- Multi-Store Inventory Management
- Barcode Integration
- QR Code Integration
RetailPulse follows concepts used in:
- Zoho Inventory
- Odoo Inventory
- Oracle NetSuite
- SAP Inventory Management
Implemented Features:
✅ Product Management
✅ Supplier Management
✅ Inventory Tracking
✅ Order Management
✅ Dashboard Analytics
✅ Authentication
✅ Authorization
Future Enterprise Features:
- ERP Integration
- Multi-Warehouse Support
- AI Forecasting
- Real-Time Notifications
RetailPulse
Retail Order & Inventory Analytics Platform
Built using ASP.NET Core MVC, ASP.NET Core Web API, Entity Framework Core, SQL Server, JWT Authentication, Repository Pattern, SOLID Principles, MSTest, GitHub Actions, and Docker.











