Skip to content

Repository files navigation

SmartPOS System

SmartPOS is a C# Windows Forms desktop application designed for retail billing, inventory management, sales tracking, user management, and low-stock reporting.

The project was developed as a course project for CS-412 – Visual Programming during the fourth semester.


Features

Authentication

  • User login system
  • Admin and User roles
  • Role-based access control
  • User Management is available only to administrators
  • Default demo accounts are created automatically

Inventory Management

  • Add new products
  • Update existing products
  • Delete products
  • Search products by Product ID or Product Name
  • Manage product:
    • Product ID
    • Product Name
    • Category
    • Quantity
    • Price

Billing and Sales

  • Select products from available inventory
  • Automatically display current stock
  • Automatically display product price
  • Enter quantity to sell
  • Calculate total bill
  • Save sales transactions
  • Generate a customer receipt
  • Automatically reduce inventory quantity after a successful sale

Sales Records

  • View previous sales history
  • Search sales records
  • View:
    • Bill Number
    • Customer Name
    • Product Name
    • Quantity Sold
    • Total Amount
    • Sale Date
  • Export sales records to CSV

User Management

Administrators can:

  • Add users
  • Update users
  • Delete users using soft deletion
  • Search and filter users
  • Assign Admin or User roles

Reports

  • Generate low-stock reports
  • Set a custom low-stock threshold
  • View products whose stock is below the selected threshold
  • Export low-stock reports to CSV

Tech Stack

Component Technology
Programming Language C#
User Interface Windows Forms
Framework .NET 10
Database SQLite
Database Provider System.Data.SQLite
Native SQLite Library SourceGear.sqlite3
IDE Visual Studio

NuGet Packages

The project currently uses:

System.Data.SQLite 2.0.4
SourceGear.sqlite3 3.53.4

Project Structure

SmartPOS-System/
│
├── Database/
│   ├── DatabaseSetup.sql
│   ├── DbConnection.cs
│   ├── DEPLOYMENT.md
│   └── UserRepository.cs
│
├── Forms/
│   ├── Form1.cs
│   ├── Form1.Designer.cs
│   ├── Form1.resx
│   ├── LoginForm.cs
│   ├── LoginForm.Designer.cs
│   ├── LowStockReportForm.cs
│   └── UserManagementForm.cs
│
├── Models/
│   ├── Product.cs
│   ├── SaleRecord.cs
│   └── User.cs
│
├── Program.cs
├── SmartPOS_System.csproj
├── SmartPOS_System.sln
├── .gitattributes
├── .gitignore
├── LICENSE
└── README.md

Database

SmartPOS uses a local SQLite database named:

SmartPOS.db

The database is automatically created when the application runs for the first time.

It contains three main tables:

  • Products
  • Sales
  • Users

The database file is excluded from GitHub through .gitignore.

The database schema is also provided in:

Database/DatabaseSetup.sql

Default Login Credentials

Administrator

Username: StoreAdmin
Password: Store123

Standard User

Username: StoreUser
Password: User123

These accounts are provided for demonstration and educational purposes only.


Installation and Setup

1. Clone the Repository

git clone https://github.com/hashim212-cs/SmartPOS-System.git

2. Open the Project Folder

cd SmartPOS-System

3. Restore NuGet Packages

dotnet restore SmartPOS_System.sln

4. Open the Solution

Open:

SmartPOS_System.sln

in Visual Studio.

5. Build the Solution

Use:

Build > Build Solution

or:

Ctrl + Shift + B

6. Run the Application

Press:

F5

or click the Start button in Visual Studio.

The application will automatically create the SQLite database if it does not already exist.


Application Workflow

Login
  ↓
SmartPOS Dashboard
  ↓
Inventory Management
  ↓
Billing / Sales
  ↓
Save Transaction
  ↓
Update Inventory Stock
  ↓
Sales History
  ↓
Reports

Role-Based Access

Administrator

An administrator can access:

  • Inventory Management
  • Billing and Sales
  • Sales Records
  • User Management
  • Low-Stock Reports

Standard User

A standard user can access the main SmartPOS functions, while User Management is restricted to administrators.


Screenshots

Login

SmartPOS Login

Product Inventory

Product Inventory

Billing and Sales

Billing and Sales

Sales Records

Sales Records

User Management

User Management

Low Stock Report

Low Stock Report


Security Note

The current login system stores passwords as plain text because the application was developed primarily as an academic project.

For a production environment, password hashing and additional security measures should be implemented.


Future Improvements

Possible future enhancements include:

  • Password hashing
  • Improved role-based permissions
  • Product barcode support
  • Printable invoice generation
  • Customer management
  • Sales analytics dashboard
  • Daily, weekly, and monthly sales reports
  • Backup and restore functionality
  • Improved UI design
  • Database configuration management
  • Unit and integration testing

Academic Context

This project was developed as part of:

Course: CS-412 – Visual Programming
Application Type: Windows Desktop Application
Programming Language: C#

The project demonstrates practical implementation of Windows Forms development, database integration, CRUD operations, authentication, role-based access, inventory management, billing, and reporting.


License

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


Author

Muhammad Hashim

Computer Science Student

About

A C# Windows Forms retail billing and inventory management system with SQLite, sales tracking, user management, and low-stock reporting.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages