HomeApplications

SaleFlex Applications

Five focused components, each owning a distinct layer of the retail stack. Start with one, add more as your needs grow.

SaleFlex.PyPOS

Touch-Screen Point-of-Sale Application

v1.0.0b8 Beta AGPLv3

Python + PySide6 touch POS for store-floor checkout. Three operating modes: standalone (local SQLite, no network), office (LAN sync with OFFICE via REST), gate (direct GATE REST). All operations complete locally first — no cloud dependency required.

Key Capabilities

Multi-Payment

Cash, card, mobile, prepaid, on-account, bank transfer, loyalty bonus, cheque. Split tenders until balance reaches zero.

Smart NumPad — 4 Modes

Barcode/PLU lookup, inline quantity, X multiplier pre-set, payment amount. PLU inquiry shows price and per-warehouse stock without selling.

Campaign Engine

Basket, product, time-based, Buy-X-Get-Y, payment-method. Coupon activation. Campaign stacking by priority and is_combinable.

Loyalty Programs

Bronze/Silver/Gold/Platinum tiers. Earn at sale, redeem via BONUS button. Policy caps, full audit trail, tier auto-refresh.

Customer Management

Phone-normalized identity, activity history, point movements. Assign to active sale via FUNC → CUSTOMER. Walk-in placeholder auto-assigned.

Inventory Control

Real-time stock deduction, goods receipt, adjustment, movement history per warehouse location. Low-stock alerts.

End-of-Day Closure

Session-based lifecycle, Z-report on ESC/P, closure history with DETAIL/RECEIPTS sub-forms. Country templates: Turkey, USA, EU VAT.

Suspend & Resume

SUSPEND parks cart as pending, opens new draft. SUSPENDED_SALES_MARKET lists parked receipts. ACTIVATE restores to sale form.

Offline Outbox

SyncQueueItem queues every document and closure. Background OfficePushWorker (QThread) flushes when network returns.

Operating Modes

Set app.mode in settings.toml:

  • standalone — fully offline, built-in seed data, no config needed
  • office — syncs with OFFICE on LAN; first boot seeds from OFFICE; post-closure master-data refresh automatic
  • gate — direct GATE REST; multi-tenant, central campaign/loyalty

Requirements

  • Python 3.13+ · PySide6 6.11.0 · SQLAlchemy 2.0.48
  • SQLite (default), PostgreSQL, MySQL, Oracle, MSSQL
  • Windows / Linux touch-screen devices

Quick Start

git clone https://github.com/SaleFlex/SaleFlex.PyPOS.git
cd SaleFlex.PyPOS
python -m venv venv && venv\Scripts\activate.bat
pip install -r requirements.txt
python saleflex.py
UsernamePasswordRole
adminadminAdministrator
jdoe1234Standard Cashier

SaleFlex.OFFICE

Back-Office Management Application

v0.1.0a2 Alpha AGPLv3

PySide6 desktop back-office with keyboard-first static forms for managers. Runs an embedded Flask REST server in a background daemon thread, serving PyPOS terminals over the local network. Two OFFICE modes: standalone (local only) and gate (syncs with SaleFlex.GATE when internet available).

Management Modules

Cashier Management

CRUD, performance targets, transaction metrics per cashier.

Product Management

Product CRUD, manufacturer, unit, attribute, variant, barcode management.

Campaign Management

Campaign CRUD, type and rule management, product associations, usage tracking.

Customer Management

Customer CRUD, segment membership, loyalty CRUD, point transaction history.

Loyalty Management

Programs, tiers, earn rules, program policy, redemption policy CRUD. Coupon history tabs.

Warehouse Management

Warehouse/location CRUD, stock levels, movements, adjustments.

POS Terminal Management

Terminal CRUD, per-terminal settings, virtual keyboard definitions. Multi-terminal support.

Form Management

Form/control/tab CRUD. POS-scoped assignment (single terminal or all).

Transaction Management

Read-only viewer: all POS transactions, per-POS tabs, products/payments/discounts detail.

Data Sync & Backup

Outbox monitoring: pending/failed/sent queues, GATE notifications, retry actions.

Definitions Management

Countries, regions, cities, currencies, VAT, payment types, document/discount types.

System Settings

Mode, POS server bind address, GATE integration config. Writes back to settings.toml.

Built-in REST API (Flask)

  • GET /api/v1/health — liveness probe
  • GET /api/v1/pos/init — full seed data for requesting terminal
  • POST /api/v1/pos/transactions — accepts completed transaction batches from PyPOS
  • POST /api/v1/pos/closures — accepts end-of-day closure batches from PyPOS
  • POST /api/v1/pos/sequences — update per-POS sequence counters

Quick Start

git clone https://github.com/SaleFlex/SaleFlex.OFFICE.git
cd SaleFlex.OFFICE
python -m venv .venv && .venv\Scripts\activate
pip install -r requirements.txt
python saleflex.py

Default users: admin/admin · jdoe/1234 · jpace/1234

SaleFlex.GATE

Central API Hub and Integration Gateway

v0.1.0a1 Alpha AGPLv3

Django 6.0 + DRF central hub tying together stores, terminals, mobile apps, and third-party systems. All domain models live in a dedicated core app — pos_api_app and web_ui_app contain zero model definitions. GateUser is the single universal identity profile shared across GATE, OFFICE, PyPOS, and mPOS.

Key Capabilities

Multi-Tenant Hierarchy

Company → Store → Terminal. All data partitioned and API-scoped by company and store.

GateUser Universal Identity

Single user profile across GATE portal, OFFICE, PyPOS, and mPOS. CashierStoreAssignment records per-store POS device access.

REST API (DRF)

Versioned JSON APIs at /api/v1/. Push (transactions, closures, warehouse) and pull (products, campaigns, notifications) endpoints.

Web Portal

Public landing, session login/register/logout, company creation, join-by-slug, multi-owner deletion approvals, dashboard stub.

Integration Gateway

ERP, loyalty, campaign, and payment adapters behind clean service interfaces — edge clients stay thin.

Mobile Client Support

Same REST surface for management, stocktake, waiter/order flows (mPOS and future apps).

Quick Start

git clone https://github.com/SaleFlex/SaleFlex.GATE.git
cd SaleFlex.GATE
python -m venv .venv && .venv\Scripts\activate.bat
pip install -r requirements.txt
python manage.py makemigrations && python manage.py migrate
python manage.py collectstatic --noinput
python manage.py runserver

Public site: http://127.0.0.1:8000/ · Django Admin: http://127.0.0.1:8000/admin/

SaleFlex.KITCHEN

Kitchen Display System

Early Development AGPLv3

Kitchen order display and preparation workflow for restaurant scenarios. Registered per store as a terminal profile in SaleFlex.GATE. Designed to connect to the same REST API surface as PyPOS. Complements the planned restaurant table management feature in PyPOS.

SaleFlex.mPOS

Android Mobile Point-of-Sale

v1.0.0-alpha1 Commercial — Source Not Public

Android companion to PyPOS built with Kotlin 2.0 + Jetpack Compose. Landscape-first tablet layout, Room (SQLite) local database, Retrofit-based OFFICE REST integration, offline outbox (SyncQueueEntity), Hilt DI, and Timber logging. SaleFlex.mPOS is a fully commercial product — source code is not publicly released.

Key Features

Touch-First POS

Landscape tablet layout, NumPad-driven barcode/PLU lookup, line management, cancel last line.

Payment Processing

Cash, credit/debit card, mobile pay — change calculation.

End-of-Day Closure

Closure summary, transaction aggregation, new closure period creation.

Local Database

Room entities: Cashier, Product, ProductBarcode, TransactionHead, TransactionLine, Closure, SyncQueue.

OFFICE Integration

Retrofit: GET /api/v1/pos/init (seed), POST /api/v1/pos/transactions, POST /api/v1/pos/closures. Offline outbox on failure.

Clean Architecture

Hilt DI, Kotlin Coroutines, DataStore preferences, Timber logging, typed SaleFlexException hierarchy.

  Commercial Licensing: No source code, APK, or binary may be shared publicly without explicit written authorisation from Mousavi.Tech. Contact saleflex.pro for pricing and licensing.