← All workPRODUCT / TRANSACTIONAL SYSTEM

Mizan — retail operations in balance

An Arabic-first point-of-sale and inventory system designed around transaction integrity, merchant isolation, and multi-shop operations.

GO · ECHO · POSTGRESQL · HTMX · VALKEY · SQLC
Mizan product identity
Mizan is the active product name for the Matjarak project.
AR / ENbilingual RTL/LTR
ACIDexplicit checkout transaction
MULTImerchant and shop scoping
24Hsession cache TTL
ARCHITECTURE

The server remains the source of truth.

Go handlers route through service and repository boundaries into sqlc-generated PostgreSQL queries. HTMX replaces server-rendered fragments, while checkout validates the shift, stock, quantities, discounts, and payment inside an explicit database transaction.

Session tokens are SHA-256 hashed in PostgreSQL and cached in Valkey for 24 hours. The application keeps working when the cache is unavailable, and merchant-account scoping stays in the data model.

Mizan retail operations illustration
DATA INTEGRITY

Inventory moves with the sale.

Stock movements, fractional quantities, shop-level availability, and sale-item snapshots preserve what happened at checkout—even after a product name or price changes.

DELIVERED SYSTEM

Back office, register, finance, and operations.

  • Product, category, shop, and employee management
  • Inventory adjustments and movement history
  • Server-side cart and ACID checkout
  • Shift opening, closing, and cash tracking
  • Sales, expenses, receivables, and payables
  • Localized Arabic and English interface
01

Historical price fidelity

Every order item stores its sale-time unit price rather than depending on a product price that may later change.

02

Authority stays server-side

Roles, shop access, stock checks, and transaction rules are enforced before any state change is committed.

03

Single deployable system

The Go application and server-rendered UI stay operationally simple while preserving clear internal boundaries.

REQUEST / AUDIT

Building a transactional product?

Start with the invariants, the failure paths, and the data model.

Get Started ↗