Skip to content

Latest commit

 

History

History
306 lines (215 loc) · 9.29 KB

File metadata and controls

306 lines (215 loc) · 9.29 KB

🧾 Wholesale POS System

A Premium, Offline-First Point of Sale & Inventory Management Application

Manage Products • Track Orders • Handle Returns • Analyze Sales — All Without the Internet


📖 Overview

Wholesale POS System is a professional-grade, offline-first inventory and order management application, purpose-built for wholesale businesses. It manages products, sales, shop accounts, rider logistics, and returns seamlessly — with no internet connection and no server infrastructure required.

Everything runs directly in the browser, powered by IndexedDB, making the entire system portable, private, and completely free to host.


🚀 Key Highlights

✅ 100% Offline-Capable ✅ Zero Server Cost ✅ Multi-Language UI (English, Urdu, Punjabi)
✅ Real-Time Sales Analytics ✅ Smart Returns Handling ✅ Secure Admin Login
✅ Dark / Light Theme ✅ One-Click JSON Backup & Restore ✅ Printable PDF Reports

📸 Project Preview

🔐 Login Portal

Login Portal

📊 Dashboard Overview

Dashboard

🌗 Dark Theme with Urdu Language

Dark Theme with Urdu

👜 Product Management

Products

🏬 Shop Management

Shops

🏍 Rider Management

Riders

↩️ Returns Management

Returns

📈 Daily Reports

Daily Reports

💾 Backup & Restore

Backup


🏗 System Architecture

Unlike traditional POS systems that rely on a server and database connection, Wholesale POS System runs as a fully client-side, serverless application:

                    User (Browser)
                        │
                        ▼
              HTML5 + Bootstrap 5 UI
                        │
              Vanilla JavaScript (ES6+)
                        │
        ┌───────────────┼────────────────┐
        │               │                │
        ▼               ▼                ▼
    Dexie.js         Chart.js        Window Print
   (IndexedDB)       (Analytics)      (PDF Export)
        │
        ▼
  100% Local Browser Storage

Because all data lives in the browser's IndexedDB, there is no backend, no hosting cost, and no dependency on network availability.


🎯 Main Features

📦 Inventory Management

  • Add, edit, and track product quantities and prices
  • Auto-generated product IDs
  • Organized shop and rider profiles for retail partners and delivery logistics

🛒 Point of Sale (POS)

  • Quick shop / rider selection
  • Live cart management with instant total calculations
  • Cash and Online payment methods
  • Editable order history

↩️ Smart Returns

  • Tracks sold quantities to ensure returns never exceed purchased stock
  • Automatically adjusts main inventory on every return
  • Full return history with amounts and dates

📊 Reporting & Analytics

  • Real-time graphs for Sales, Orders, and Returns
  • Custom filtering: Daily, Weekly, Monthly, or Yearly timeframes
  • Group reports by Shop or Rider
  • Built-in PDF printing and export

🌐 Multi-Language Interface

The entire UI can be switched instantly between:

  • English
  • Urdu (اردو) — with full RTL layout support
  • Punjabi (پنجابی) — with full RTL layout support

🌓 Dark / Light Theme

One-click theme toggle for comfortable use in any lighting condition.

🔒 Secure Authentication

  • Dedicated admin login screen with no hardcoded fallback credentials
  • Password update system that blocks reuse of the last 3 passwords

💾 Data Security & Backup System

Since all data is stored locally in the browser (IndexedDB), data safety is managed through a manual backup workflow:

Action Description
Download Backup Exports all system data (products, orders, shops, riders, returns) to a secure .json file via the Admin menu
Restore Backup Re-imports a previously exported .json file to instantly recover all historical data
Recommended Practice Save backup files in a cloud-synced folder (e.g. Google Drive) for extra safety

⚠️ Important: Since this is an offline, browser-based system, the user is responsible for maintaining regular backups. A daily backup routine is strongly recommended.


⚠️ Important Usage Warnings

To prevent accidental data loss, please follow these guidelines:

  • 🚫 Never clear browser data or cookies — this permanently deletes the local database.
  • 🚫 Avoid Incognito / Private browsing mode — data is wiped automatically when the window closes.
  • 📍 Data is device- and browser-specific. Moving to a new computer or browser requires using the Backup/Restore feature to migrate data.
  • 🗓 Backups are the user's responsibility — a daily backup routine is highly recommended.

🛠 Technology Stack

Layer Technology Purpose
Frontend HTML5, CSS3, Vanilla JavaScript (ES6+) Core application logic and structure
UI Framework Bootstrap 5 Responsive, clean, professional interface
Visualization Chart.js Interactive real-time sales analytics
Database Dexie.js (IndexedDB wrapper) 100% offline, browser-local data storage
Export Native browser print (window.print()) PDF report generation

🗄 Local Database Structure

The system uses a single IndexedDB database (POS_Client_DB) with the following tables:

Table Purpose
users Admin credentials & login authentication
products Product catalog — name, quantity, price
shops Retail partner / shop directory
riders Delivery rider directory
orders Full order and sales history
returns Product return records and adjustments

📂 Project Structure

Wholesale-POS-System/
│
├── assets/
│   ├── Login.png
│   ├── Dashboard.png
│   ├── DarkThemeWithUrdu.png
│   ├── Products.png
│   ├── Shops.png
│   ├── Riders.png
│   ├── Returns.png
│   ├── Daily Reports.png
│   └── Backup.png
│
├── index.html          # Complete single-file application
└── README.md

🚀 Getting Started

Since Wholesale POS System is a fully self-contained, serverless application, no installation or build step is required.

1. Clone or download the project

git clone https://github.com/abdulqadeer-44/Wholesale-POS-System.git

2. Open the app

Simply open index.html in any modern browser (Chrome, Edge, or Firefox recommended):

cd Wholesale-POS-System
open index.html   # or double-click the file

3. Log in

Use the default admin credentials on first launch, then update your password immediately from the Admin menu.

💡 No server, no database setup, and no environment variables needed — everything runs client-side.


🔐 Security Features

  • Browser-local authentication with no hardcoded fallback login
  • Password history protection (last 3 passwords cannot be reused)
  • No external data transmission — everything stays on the user's device
  • Manual, user-controlled backup and restore workflow

📈 Performance Highlights

  • Instant load — no server round-trips
  • Fully responsive, mobile-friendly Bootstrap 5 layout
  • Smooth animated tab transitions
  • Live analytics powered by Chart.js
  • Zero hosting cost — runs entirely offline

⭐ Roadmap

  • Cloud sync option for multi-device access
  • Barcode scanning support for faster product entry
  • Role-based access for multiple staff accounts
  • Automated cloud backup scheduling
  • Low-stock alerts and notifications
  • Export reports to Excel (in addition to PDF)

🤝 Contributing

Contributions are always welcome!

  1. Fork the repository
  2. Create a new feature branch
  3. Commit your changes
  4. Push your branch
  5. Open a pull request
git checkout -b feature/new-feature
git commit -m "Add new feature"
git push origin feature/new-feature

👨‍💻 Author

Abdul Qadeer Sikandar Software Engineering Student · University of Gujrat Full Stack Web Developer

💼 LinkedIn · 💻 GitHub


🌟 Support

If you found this project useful, please consider ⭐ starring the repository, 🍴 forking it, and 📢 sharing it with others.

📜 License

Licensed under the MIT License — free to use, modify, and distribute for educational purposes.

Made with ❤️ by Abdul Qadeer Sikandar