ManageX ERP & POS
A local-network inventory, accounting and POS system covering purchasing, barcode cashier sales, document-backed stock movements, treasury balances and role-based permissions
- Role
- Full-stack engineering & UI design
- Timeline
- 2026
- Platforms
- Windows · Web · Server
- كاشير POS
- fast checkout & receipts
- مخازن وخزينة
- stock ledger & treasury
- عربي / EN
- bilingual interface
- LAN
- offline local network
Overview
Business problem & context
Trading businesses and warehouses operating on a local network need a system that keeps running when the internet drops while preventing silent stock adjustments or unlogged cash edits
System Architecture
System layers & components
A local-first Windows LAN system: a FastAPI application server fronting a locked-down PostgreSQL database, with a bilingual (AR/EN) operations UI supporting barcode POS, 80mm thermal receipts and A4 invoices
Operations UI · Desktop & Mobile LAN
Catalog, stock ledger, POS checkout & treasury screens
- Bilingual UI (AR / EN)
- Barcode POS Session
- A4 & 80mm Receipt Preview
- Responsive 390px LAN View
Application Server · FastAPI (Python)
Business rules, 6-role RBAC, print engine & licensing
- FastAPI REST Services
- 6-Role RBAC Catalog
- Server-Side Print Templates
- Digitally Signed License Verifier
Persistence · PostgreSQL (Server-Only)
Append-only ledgers, partner balances & mandatory audit log
- Document-Backed Stock Ledger
- Append-Only Cash Treasury
- Customer & Supplier Sub-Ledgers
- Immutable Security Audit Log
Data Model
Database schema & core tables
Built on document-backed ledgers: no screen edits a stock or cash balance directly; every balance is the sum of signed document entries
| Table | Role in the system |
|---|---|
products / warehouses | Bilingual SKU catalog, barcodes, units, dual price tiers & warehouses |
stock_ledger_entries | Stock movements strictly linked to purchase, sale, transfer or count docs |
purchase_orders / sales_orders / pos_sessions | Purchase invoices, sales orders and cashier POS sessions |
treasury_entries / partner_balances | Cash/bank ledger and customer/supplier receivable & payable balances |
roles / permissions / audit_logs | RBAC permission matrix and mandatory audit trail |
Implementation
Key technical decisions
Document-backed, append-only stock & cash ledgers
Every stock or cash change must originate from a posted document (purchase, sale, transfer or inventory count), making reconciliation deterministic
Server-rendered A4 & 80mm thermal print templates with audit logging
A4 invoices and 80mm thermal receipts are rendered server-side in Arabic and English, and every print action is recorded in `audit_logs`.
Digitally signed online/offline licensing
Protected on-premise deployments with digitally signed machine-bound licenses supporting offline activation alongside built-in backup and restore
Security
Security & access control
- PostgreSQL listens only to the local FastAPI application server; clients never connect to the DB directly
- Six built-in roles with granular permission checks guarding financial reports, discounts and user administration
- Mandatory audit log capturing logins, role changes, invoice postings and document prints
Code Highlight
Invariant: every stock ledger entry requires a source document
ALLOWED_SOURCES = {"purchase_invoice", "sales_invoice", "pos_receipt", "stock_transfer", "inventory_count"}
def record_stock_movement(*, sku_id: int, warehouse_id: int, qty_delta: Decimal,
source_type: str, source_id: int, actor_id: int) -> LedgerEntry:
if source_type not in ALLOWED_SOURCES or not source_id:
raise ValueError("Stock movement rejected: a posted source document is required")
if qty_delta == 0:
raise ValueError("Zero-quantity movement is not permitted")
return LedgerEntry(sku_id=sku_id, warehouse_id=warehouse_id, qty_delta=qty_delta,
source_type=source_type, source_id=source_id, created_by=actor_id) Product Screens
System screenshots
Web & desktop interfaces
Mobile app screens
Summary
Outcome & status
Deployed on-premise on Windows for full-team daily operation across catalog, purchasing, POS, treasury and financial reporting