A comprehensive desktop application for managing retail shop operations with role-based access control.
- Overview
- Features
- System Architecture
- Technology Stack
- Database Schema
- User Roles & Permissions
- Installation
- Configuration
- Usage Guide
- Project Structure
- Screenshots
- Contributing
- License
Super Shop Management System is a robust Windows Forms application built with C# and .NET Framework 4.7.2 designed to streamline retail shop operations. The system implements a comprehensive role-based access control (RBAC) mechanism supporting three distinct user types: Admin, Manager, and Cashier.
The application follows a layered architecture pattern with clear separation of concerns, implementing the Repository pattern for data access and Service layer for business logic encapsulation.
- Secure user registration with email and password validation
- SHA-256 password hashing for enhanced security
- Role-based access control (Admin, Manager, Cashier)
- User approval workflow for new registrations
- Session management for logged-in users
- Admin Dashboard: System-wide sales overview, trending products/categories, revenue analytics
- Manager Dashboard: Category-specific performance metrics, stock monitoring
- Cashier Dashboard: Personal sales statistics, daily/weekly/monthly summaries
- Intuitive Point of Sale (POS) interface
- Real-time cart management with quantity updates
- Customer lookup by phone number
- Automatic new customer registration
- Discount application support
- Payment processing with change calculation
- Order history with detailed item breakdown
- Complete product CRUD operations
- Category-based product organization
- Stock level monitoring and alerts
- Stock request workflow (Cashier β Manager)
- Price management (purchase & selling prices)
- Unit-based inventory tracking
- User registration with role assignment
- Pending user approval system
- User profile management (Admin, Manager, Cashier profiles)
- Shift management for cashiers
- Category creation and assignment to managers
- Comprehensive supplier information tracking
- Contact person and company details management
- Filterable order history (Today, This Week, Last Week, This Month, All Time)
- Cashier-specific order filtering for admins
- Detailed order view with line items
- Sales summary statistics
The application follows a 3-Tier Architecture pattern:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PRESENTATION LAYER β
β βββββββββββββββ βββββββββββββββ ββββββββββββββββββββββββββββββββ
β β Forms β β Controls β β Controllers ββ
β β - Login β β - Dashboard β β - MainDashboardController ββ
β β - Register β β - Products β β ββ
β β - Main β β - Sales β β ββ
β β - Onboardingβ β - Orders β β ββ
β βββββββββββββββ βββββββββββββββ ββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BUSINESS LAYER β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β Services ββ
β β - AuthService - ProductService - CustomerService ββ
β β - CategoryService - SalesService - SupplierService ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β Common ββ
β β - Constants - SessionManager - Utilities ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA ACCESS LAYER β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β Repositories ββ
β β - UserRepository - ProductRepository ββ
β β - AdminRepository - CategoryRepository ββ
β β - ManagerRepository - SupplierRepository ββ
β β - CashierRepository - SalesRepository ββ
β β - CustomerRepository - DashboardRepository ββ
β β - PurchaseDetailsRepository - StockRequestRepository ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β DbConnection ββ
β β SQL Server Database Connection Manager ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SQL SERVER DATABASE β
β SuperShopDB β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Technology |
|---|---|
| Framework | .NET Framework 4.7.2 |
| Language | C# |
| UI Framework | Windows Forms (WinForms) |
| Database | Microsoft SQL Server / SQL Server Express |
| ORM | ADO.NET (SqlClient) |
| Security | SHA-256 Password Hashing |
| Architecture | 3-Tier Architecture, Repository Pattern |
| Table | Description |
|---|---|
| Users | Stores user authentication data (username, password hash, email, role, status) |
| Admins | Admin profile information |
| Managers | Manager profile with assigned categories |
| Cashiers | Cashier profile including shift type and sales count |
| Categories | Product categories with manager assignment |
| Products | Product inventory with pricing and stock levels |
| Suppliers | Supplier contact and company information |
| Customers | Customer details for sales tracking |
| Sales | Sales transactions with amounts and discounts |
| SalesDetails | Line items for each sale |
| PurchaseDetails | Purchase tracking linking cashier, customer, and sales |
| StockRequests | Stock replenishment requests workflow |
// Core entities in the system
User β UserId, UserName, Password, Email, Role, JoinDate, IsActive
Admin β AdminId, UserId, FullName, Phone, Address
Manager β ManagerId, UserId, FullName, Phone, Address
Cashier β CashierId, UserId, FullName, Phone, ShiftType, TotalSalesCount
Product β ProductId, ProductName, CategoryId, SupplierId, PurchasePrice, SellingPrice, Quantity, Unit
Category β CategoryId, CategoryName, ManagerId
Supplier β SupplierId, SupplierName, CompanyName, ContactPerson, Phone, Email, Address
Customer β CustomerId, CustomerName, Phone, Address, AddDate
Sales β SalesId, TotalAmount, Discount, NetAmount, PaidAmount, ChangeAmount
StockRequestβ RequestId, ProductId, RequestedQuantity, CashierId, ManagerId, Status, Notes| Module | Access |
|---|---|
| Dashboard | β Full analytics view |
| Users | β Create, Read, Update, Delete |
| Pending Users | β Approve/Reject registrations |
| Categories | β Full CRUD |
| Suppliers | β Full CRUD |
| Products | β Full CRUD |
| Customers | β View all customers |
| Orders/Reports | β View all orders with filtering |
| Module | Access |
|---|---|
| Dashboard | β Category-specific analytics |
| Categories | β Manage assigned categories |
| Suppliers | β Full CRUD |
| Products | β Manage products in assigned categories |
| Stock Management | β Approve/Reject stock requests |
| Customers | β View all customers |
| Orders/Reports | β View all orders with filtering |
| Module | Access |
|---|---|
| Dashboard | β Personal sales statistics |
| New Sale | β Point of Sale interface |
| Products | π Read-only view |
| Customers | β View and create customers |
| Orders | β View own orders |
- Windows 10/11 (64-bit recommended)
- Visual Studio 2019/2022 with .NET Desktop Development workload
- SQL Server 2017+ or SQL Server Express
- .NET Framework 4.7.2 Runtime
-
Clone the Repository
git clone https://github.com/Rezuanul-Islam-Fahim/Super-Shop-Management-System.git cd Super-Shop-Management-System -
Database Setup
Option A: Restore from Backup
-- Open SQL Server Management Studio (SSMS) -- Right-click "Databases" β "Restore Database" -- Select "Device" β Browse β Select "SuperShopDB.bak" -- Click OK to restore
Option B: Run SQL Scripts
- Create a new database named
SuperShopDB - Execute the queries in
SqlQueries.sqlto create tables and sample data
- Create a new database named
-
Configure Connection String
Update the connection string in
SuperShopManagement/DataAccess/DbConnection.cs:private static readonly string _connectionString = "Data Source=.\\SQLEXPRESS;Initial Catalog=SuperShopDB;Integrated Security=True";
Or in
App.config:<connectionStrings> <add name="SuperShopDb" connectionString="Data Source=.;Initial Catalog=SuperShopDB;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
-
Build and Run
- Open
SuperShopManagement.slnin Visual Studio - Build the solution (Ctrl+Shift+B)
- Press F5 to run the application
- Open
The application supports two connection string formats:
| Server Type | Connection String |
|---|---|
| SQL Server Express (Local) | Data Source=.\SQLEXPRESS;Initial Catalog=SuperShopDB;Integrated Security=True |
| SQL Server (Default Instance) | Data Source=.;Initial Catalog=SuperShopDB;Integrated Security=True |
| SQL Server (Named Instance) | Data Source=ServerName\InstanceName;Initial Catalog=SuperShopDB;Integrated Security=True |
| SQL Server (With Credentials) | Data Source=.;Initial Catalog=SuperShopDB;User ID=sa;Password=YourPassword |
- Passwords are hashed using SHA-256 before storage
- Minimum password length: 6 characters
- Email validation using regex pattern matching
- Phone validation: 10-15 digits with optional formatting characters
- Launch the Application β Onboarding screen appears
- Register an Admin User β First user should be an Admin
- Login β Use registered credentials
- Approve Users β Admin must approve any new user registrations
- Navigate to New Sale module
- Search for existing customer by phone or enter new customer details
- Select products from dropdown and set quantity
- Click Add to Cart to add items
- Apply discount if applicable
- Enter paid amount
- Click Confirm Sale to complete transaction
- Cashier identifies low stock during sales
- Cashier submits stock request with quantity and notes
- Manager reviews pending requests in Stock Management
- Manager approves or rejects requests
- Approved requests automatically update product quantities
Super-Shop-Management-System/
βββ π README.md # Project documentation
βββ π SuperShopManagement.sln # Visual Studio solution file
βββ π SqlQueries.sql # Database scripts reference
βββ π SuperShopDB.bak # Database backup file
βββ π Screenshots/ # Application screenshots
β
βββ π SuperShopManagement/ # Main project folder
βββ π App.config # Application configuration
βββ π Program.cs # Application entry point
βββ π SuperShopManagement.csproj # Project file
β
βββ π Common/ # Shared utilities
β βββ π Constants.cs # Application constants & messages
β βββ π SessionManager.cs # User session management
β βββ π Utilities.cs # Helper functions (hashing, validation)
β
βββ π DataAccess/ # Data access layer
β βββ π DbConnection.cs # Database connection manager
β βββ π Repositories/ # Repository pattern implementations
β βββ π AdminRepository.cs
β βββ π CashierRepository.cs
β βββ π CategoryRepository.cs
β βββ π CustomerRepository.cs
β βββ π DashboardRepository.cs
β βββ π ManagerRepository.cs
β βββ π ProductRepository.cs
β βββ π PurchaseDetailsRepository.cs
β βββ π SalesRepository.cs
β βββ π StockRequestRepository.cs
β βββ π SupplierRepository.cs
β βββ π UserRepository.cs
β
βββ π Models/ # Entity models
β βββ π Admin.cs
β βββ π Cashier.cs
β βββ π Category.cs
β βββ π Customer.cs
β βββ π Manager.cs
β βββ π Product.cs
β βββ π PurchaseDetails.cs
β βββ π Sales.cs
β βββ π SalesDetails.cs
β βββ π StockRequest.cs
β βββ π Supplier.cs
β βββ π User.cs
β
βββ π Services/ # Business logic layer
β βββ π AuthService.cs # Authentication & registration
β βββ π CategoryService.cs
β βββ π CustomerService.cs
β βββ π ProductService.cs
β βββ π SalesService.cs
β βββ π SupplierService.cs
β
βββ π UI/ # User interface layer
β βββ π Controllers/
β β βββ π MainDashboardController.cs # Navigation controller
β β
β βββ π Forms/ # Windows Forms
β βββ π LoginForm.cs
β βββ π RegisterForm.cs
β βββ π OnboardingForm.cs
β βββ π MainDashboardForm.cs
β βββ π OrderDetailForm.cs
β βββ π CreateUpdateCategory.cs
β βββ π CreateUpdateProduct.cs
β βββ π CreateUpdateSupplier.cs
β β
β βββ π Controls/ # User controls
β βββ π admin/
β β βββ π AdminDashboardControl.cs
β β βββ π AdminUserControl.cs
β β βββ π PendingUsersControl.cs
β βββ π manager/
β β βββ π ManagerDashboardControl.cs
β β βββ π ProductStockControl.cs
β βββ π cashier/
β β βββ π CashierDashboardControl.cs
β β βββ π NewSaleControl.cs
β βββ π common/
β βββ π CategoryManagementControl.cs
β βββ π CustomerUserControl.cs
β βββ π OrdersControl.cs
β βββ π ProductUserControl.cs
β βββ π SupplierUserControl.cs
β
βββ π Properties/ # Assembly information
βββ π AssemblyInfo.cs
βββ π Resources.resx
βββ π Settings.settings
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow C# naming conventions
- Use meaningful variable and method names
- Add XML documentation for public methods
- Write unit tests for new features
This project is open source and available under the MIT License.
Rezuanul Islam Fahim
- GitHub: @Rezuanul-Islam-Fahim
M. Shahriar Hasan Limon
- GitHub: @Shahriar398
β Star this repository if you find it helpful! β









