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! ⭐









