Skip to content

fmoric/BOSRetail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

BOSRetail - Store POS & Back Office System

A comprehensive Point of Sale (POS) and Back Office management system designed for small-to-medium retail stores. Built with Python, PyQt6, and SQLAlchemy, BOSRetail provides a reliable, offline-first solution for retail operations.

Version Python License

๐Ÿš€ Quick Start

For End Users

  1. Download the latest release: BOSRetail-Demo-v0.1.0-Windows-x64.zip
  2. Extract to your desired location
  3. Run BOSRetail.exe
  4. Login with demo credentials:
    • Admin: admin / Admin123
    • Manager: john.manager / Manager123
    • Cashier: sarah.cashier / Cashier123

๐Ÿ“– See: Installation Guide | Quick Start Guide

For Developers

# Clone and setup
git clone <repository-url>
cd BOSRetail
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt

# Initialize demo database
python -m src.utils.demo_data

# Run the application
python -m src.gui.main

๐Ÿ”ง See: Architecture Guide | Development Setup

โœจ Key Features

๐Ÿ›’ Point of Sale (POS)

  • Fast sales processing with barcode scanning
  • Multiple payment methods (Cash, Card, Mixed)
  • Standard (B2C) and Company (B2B) receipts
  • Real-time inventory updates
  • Cashier session tracking

๐Ÿข Back Office Management

  • Products: Add, edit, organize with categories
  • Inventory: Multi-location support, stock adjustments, low-stock alerts
  • Purchase Orders: Full workflow with goods receipt
  • Companies: B2B customer management
  • Users: Role-based access (Admin, Manager, Cashier)
  • Locations: Multiple stores with separate inventories
  • Pricing: Default and location-specific pricing

๐Ÿ“Š Comprehensive Reports

  • Daily Sales Report
  • Sales by Product
  • Sales by Cashier
  • Inventory Report
  • Low Stock Alerts
  • Financial Summary

๐Ÿ”Œ REST API (Optional)

  • External system integration (ERP, e-commerce)
  • API key authentication
  • Full CRUD operations
  • Webhook support

๐Ÿ—๏ธ System Architecture

BOSRetail is a standalone desktop application with optional API server:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Desktop Application (BOSRetail.exe)       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚  PyQt6 GUI                          โ”‚   โ”‚
โ”‚  โ”‚  - POS, Back Office, Reports        โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚              โ†“ SQLAlchemy                   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚  SQLite Database                    โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ† Optional
โ”‚  API Server (Separate Process)             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚  FastAPI REST API                   โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚              โ†“ SQLAlchemy                   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚  SQLite Database (Shared)           โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Points:

  • โœ… GUI has direct database access (not client-server)
  • โœ… API server is optional (for external integrations only)
  • โœ… Offline-first design
  • โœ… Multi-location support

๐Ÿ“š Learn More: Architecture Overview | Architecture FAQ

๐Ÿ“š Documentation

All comprehensive documentation is organized in the docs/ folder.

๐ŸŽฏ Where to Start

๐Ÿ“– User Documentation

Document Description
Installation Guide Complete setup instructions
Quick Start Guide Get started in 5 minutes
Quick Reference Common tasks and keyboard shortcuts

๐Ÿ‘จโ€๐Ÿ’ป Developer Documentation

Document Description
Architecture Overview System design and patterns
Architecture FAQ Common architecture questions
Quick Architecture Guide Developer onboarding
Testing Guide How to test the application
Build Process Creating deployments

๐Ÿš€ Deployment Documentation

Document Description
Main Deployment Guide Complete deployment overview - START HERE โญ
BoS Service Guide API service deployment (central server)
POS Deployment Guide POS terminal installation and setup
Quick Setup Guide Fast deployment for all scenarios
BoS Deployment Guide Back Office GUI deployment
Deployment Checklist Pre-deployment verification
Packages Guide Understanding packages

๐Ÿ› ๏ธ Technology Stack

Component Technology
Language Python 3.10+
GUI Framework PyQt6
Database SQLite (default), PostgreSQL/MySQL (optional)
ORM SQLAlchemy
API Framework FastAPI
Authentication bcrypt
Deployment PyInstaller
Testing pytest

๐Ÿ“Š System Requirements

Minimum

  • OS: Windows 10 or later
  • RAM: 4 GB
  • Storage: 500 MB
  • Display: 1280x720

Recommended

  • OS: Windows 11
  • RAM: 8 GB
  • Storage: 2 GB
  • Display: 1920x1080

๐Ÿ—‚๏ธ Project Structure

BOSRetail/
โ”œโ”€โ”€ src/                      # Source code
โ”‚   โ”œโ”€โ”€ api/                 # REST API (FastAPI)
โ”‚   โ”œโ”€โ”€ database/            # Models and database access
โ”‚   โ”œโ”€โ”€ gui/                 # User interface (PyQt6)
โ”‚   โ”‚   โ”œโ”€โ”€ screens/        # Application screens
โ”‚   โ”‚   โ””โ”€โ”€ dialogs/        # Dialog windows
โ”‚   โ”œโ”€โ”€ services/            # Business logic layer
โ”‚   โ””โ”€โ”€ utils/               # Utilities and helpers
โ”œโ”€โ”€ docs/                     # Documentation
โ”‚   โ”œโ”€โ”€ user-guide/          # End-user documentation
โ”‚   โ”œโ”€โ”€ development/         # Developer documentation
โ”‚   โ”œโ”€โ”€ deployment/          # Deployment guides
โ”‚   โ””โ”€โ”€ archive/             # Historical docs
โ”œโ”€โ”€ tests/                    # Test suite
โ”‚   โ”œโ”€โ”€ test_services/       # Service layer tests
โ”‚   โ””โ”€โ”€ test_database/       # Database tests
โ”œโ”€โ”€ data/                     # Database files
โ”œโ”€โ”€ backups/                  # Automatic backups
โ”œโ”€โ”€ examples/                 # Code examples
โ”œโ”€โ”€ build_deployment.ps1      # Production build script
โ”œโ”€โ”€ build_demo_deployment.ps1 # Demo build script
โ””โ”€โ”€ requirements.txt          # Python dependencies

๐Ÿ”’ Security Features

  • โœ… Password hashing with bcrypt
  • โœ… Role-based access control (Admin, Manager, Cashier)
  • โœ… Session management with timeout
  • โœ… Comprehensive audit logging
  • โœ… API key authentication
  • โœ… Rate limiting
  • โœ… Input validation

๐Ÿงช Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=src tests/

# Run specific test suite
pytest tests/test_services/test_sales_service.py

Test Coverage:

  • โœ… Service layer tests
  • โœ… Database model tests
  • โœ… Business logic validation
  • โœ… Error handling

๐Ÿ“– See: Testing Guide

๐Ÿ“ฆ Building Deployments

Build All Targets (Recommended)

Windows:

.\build-all.ps1

Linux/Mac:

./build-all.sh

Builds all deployment packages:

  • Translations (.qm files)
  • POS Demo & Production
  • BoS Demo, Production & API Service

Individual Builds

POS Demo:

.\build-demo.ps1

POS Production:

.\build-prod.ps1

BoS Demo:

.\build-bos-demo.ps1

BoS Production:

.\build-bos-prod.ps1

BoS API Service:

.\build-bos-service.ps1

Translations:

.\build-translations.ps1

Advanced Options

# Build specific target
.\build-all.ps1 -Target POS

# Skip translations
.\build-all.ps1 -SkipTranslations

# Skip ZIP archives
.\build-all.ps1 -SkipZip

# Force rebuild
.\build-all.ps1 -Force

# Run builds in parallel (faster)
.\build-all.ps1 -Parallel

๐Ÿ“– See: Build Scripts Guide | Build Process Explained

๐Ÿš€ Deployment (Build + Package Everything)

NEW: Master deployment scripts that build all packages and create a unified deployment structure.

Windows:

.\deploy-all.ps1

Linux/Mac:

./deploy-all.sh

What it does:

  1. Builds all packages (via build-all script)
  2. Collects all deployment artifacts
  3. Creates deployment directory with:
    • All package folders/ZIPs
    • DEPLOYMENT_MANIFEST.txt - Package inventory
    • README.md - Deployment guide
  4. Creates deployment ZIP archive (optional)

Common scenarios:

# Deploy everything (default)
.\deploy-all.ps1

# Deploy only POS packages
.\deploy-all.ps1 -Target POS

# Deploy only BoS packages
.\deploy-all.ps1 -Target BoS

# Skip build (use existing packages)
.\deploy-all.ps1 -SkipBuild

# Custom output directory
.\deploy-all.ps1 -OutputDir C:\Deployments\BOSRetail-v1.0

# Force overwrite + skip ZIP
.\deploy-all.ps1 -Force -SkipZip

๐Ÿ“– See: Deployment Scripts Guide

๐Ÿ—บ๏ธ Roadmap

โœ… Version 0.1.0 (Current)

  • Complete POS functionality
  • Back office management
  • Multi-location support
  • Purchase order workflow
  • Company (B2B) receipts
  • Comprehensive reporting
  • REST API

๐Ÿ”ฎ Future Versions

  • Cloud synchronization for multi-store
  • Mobile app for inventory management
  • Customer loyalty program
  • Advanced analytics dashboard
  • E-commerce integration
  • Multi-currency support
  • Multi-language support
  • Returns/refunds workflow

๐Ÿ“ Change Log

Version 0.1.0 (December 23, 2025)

  • โœ… Initial production release
  • โœ… Complete POS and back office functionality
  • โœ… Multi-location inventory management
  • โœ… Purchase order workflow
  • โœ… Company receipt support
  • โœ… Comprehensive reporting
  • โœ… REST API with authentication
  • โœ… Fixed report generation issues
  • โœ… Fixed SQL join ambiguity in inventory reports

๐Ÿ†˜ Support & Contributing

Getting Help

Development

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Write/update tests
  5. Submit a pull request

๐Ÿ“„ License

Proprietary software. All rights reserved.

๐Ÿ‘ฅ Credits

Developed with โค๏ธ for small and medium retail businesses.

Special Thanks:

  • Python community
  • PyQt6 developers
  • SQLAlchemy team
  • FastAPI framework

Version: 0.1.0
Last Updated: December 23, 2025
Status: โœ… Production Ready

Quick Links: Installation | Quick Start | Deployment | Architecture