Back to Archive
Case StudyAly Baba Cashier SystemDesktopPOSDashboardsInventoryRetail

Point of Sale. Fully Offline.

An offline-first Windows desktop POS built with Electron, React, and TypeScript on a local SQLite database — sales, inventory, purchasing, and ledgers in one place.

Role
Desktop Application Engineer
Timeline
Production System
Industry
Retail
Status
Live
aly-baba-cashier-desktop-pos
Aly Baba Cashier Desktop POS
01Overview

What this system is

Aly Baba Cashier Desktop POS is a Windows point-of-sale application designed to run entirely on the device. It combines a fast cashier sales flow, invoicing, inventory and purchasing, customer and supplier accounts, shift and cash-drawer management, expenses, debt collection, and reporting into one offline-first Electron application backed by a local SQLite database and device-based activation.

02The Problem

What we needed to solve

Retail shops often rely on cloud POS tools that stop working the moment the internet drops, and juggling sales, inventory, purchases, returns, shifts, and customer/supplier debts across disconnected tools makes daily reconciliation slow and error-prone.

03The Solution

How we shipped it

A single offline-first desktop application that keeps all point-of-sale, inventory, purchasing, and accounting data in a local SQLite database on the device. Cashiers get a fast POS workflow with thermal receipt printing and shift-based cash handling, while owners get inventory control, ledgers, expense tracking, debt collection, and reporting without depending on a network connection.

04Architecture

How the system is wired

The application is a self-contained Electron desktop client. A React and TypeScript renderer drives the interface while the Electron main process manages the local SQLite database, printing, and device activation. Because all data lives on the device, the system keeps working with no network connection and never blocks a sale on connectivity.

Data flow
01
Electron Desktop Shell

Packages the application as a native Windows desktop client and coordinates windows, printing, and the local data layer.

02
React + TypeScript UI

Renderer layer providing the POS screens, dashboards, inventory, purchasing, and ledger interfaces with a typed, component-based codebase.

03
Local SQLite Database

On-device storage for sales, invoices, products, stock movements, customers, suppliers, shifts, expenses, and ledger entries.

04
Printing & Activation Services

Receipt preview with thermal printing, dedicated DTF printing services, and device-based activation for licensing.

05Tech Stack

Engineering choices

Frontend
ReactTypeScript
Backend
Node.js
Infrastructure
ElectronSQLiteNode.js
06Gallery

In the wild

Aly Baba Cashier Desktop POS
Aly Baba Cashier Desktop POS
Aly Baba Cashier Desktop POS
07Desktop Application

Cashier desktop experience

The Aly Baba Cashier desktop application runs entirely on the device. Cashiers move from opening a shift to ringing up sales, applying admin-controlled discounts, printing thermal receipts, recording expenses, and reconciling customer and supplier ledgers — all backed by a local SQLite database that keeps working offline.

Desktop highlights
Offline-first POS backed by a local SQLite databaseSales, invoices, returns, and stock movements in one clientShift and cash-drawer management with expense trackingReceipt preview, thermal printing, and DTF printing services
Dashboard Overview
Dashboard Overview
Dashboard Overview

Main dashboard showing daily sales, cash position, and key retail metrics for the device.

POS Sales
POS Sales
POS Sales

Point-of-sale screen for adding items, adjusting quantities, and completing orders quickly.

POS Sales
POS Sales
POS Sales

Cashier sales workflow with fast item selection and order totals.

Admin-Controlled Discounts
Admin-Controlled Discounts
Admin-Controlled Discounts

Applying discounts that are governed by admin permissions during a sale.

Invoices
Invoices
Invoices

Issued invoice details ready for receipt preview and printing.

Invoices List
Invoices List
Invoices List

Browse previously issued invoices and reprint when needed.

Sales Returns
Sales Returns
Sales Returns

Process sales returns and adjust stock and balances accordingly.

Customers
Customers
Customers

Customer accounts with balances and purchase history.

Customer Ledger
Customer Ledger
Customer Ledger

Customer ledger tracking sales, payments, and outstanding balances.

Debt Collection
Debt Collection
Debt Collection

Record customer payments against outstanding debts.

Suppliers
Suppliers
Suppliers

Supplier accounts with balances and purchase records.

Supplier Ledger
Supplier Ledger
Supplier Ledger

Supplier ledger tracking purchases, returns, and payments.

Purchases
Purchases
Purchases

Record supplier purchases and update stock and supplier balances.

Purchase Returns
Purchase Returns
Purchase Returns

Handle purchase returns and reflect them in stock and ledgers.

Inventory
Inventory
Inventory

Product catalog with pricing and current stock levels.

Stock Movements
Stock Movements
Stock Movements

Auditable stock movement history from purchases, sales, and returns.

Shifts
Shifts
Shifts

Open and close cashier shifts with start and end balances.

Cash Drawer
Cash Drawer
Cash Drawer

Managed cash-drawer balance tied to the active shift.

Expenses
Expenses
Expenses

Log branch expenses that reflect in shift and financial reports.

Receipt Preview
Receipt Preview
Receipt Preview

Preview the receipt before sending it to the thermal printer.

Thermal Printing
Thermal Printing
Thermal Printing

Thermal receipt printing output for completed sales.

DTF Printing Services
DTF Printing Services
DTF Printing Services

Dedicated DTF printing services integrated into the retail workflow.

Reports
Reports
Reports

Sales, returns, and expense reporting generated from local data.

Reports & Analytics
Reports & Analytics
Reports & Analytics

Detailed reporting scoped by shift and date range.

Device Activation
Device Activation
Device Activation

Device-based activation screen for licensing the desktop application.

10Dashboard Structure

What admins control

01
Dashboard

Overview of daily sales, cash position, and key retail metrics for the current device and shift.

02
POS Sales

Fast sales screen for adding items, applying admin-controlled discounts, and completing orders with receipt printing.

03
Invoices

Browse, review, and reprint issued invoices along with sales and purchase returns.

04
Inventory

Manage products and track stock movements from purchases, sales, and returns.

05
Purchases

Record supplier purchases and purchase returns and reflect them in stock and supplier ledgers.

06
Customers & Suppliers

Maintain customer and supplier accounts with ledgers, balances, and debt collection.

07
Shifts & Cash Drawer

Open and close cashier shifts with managed cash-drawer balances and expense logging.

08
Reports

Sales, returns, expenses, and ledger reporting generated from local data.

11Challenges Solved

Hard problems, handled

Impact
Challenge 01

The point of sale must remain fully usable even when the shop has no internet connection.

Resolution

Built the entire system offline-first on a local SQLite database so sales, inventory, and accounting never depend on connectivity.

Impact
Challenge 02

Sales, purchases, returns, and payments all need to stay consistent with stock and account balances.

Resolution

Modeled stock as movement records and kept customer and supplier ledgers updated from each transaction to keep balances accurate.

Impact
Challenge 03

Cashiers need reliable receipt output on retail thermal printers.

Resolution

Added receipt preview with thermal printing support and dedicated DTF printing services from the desktop application.

12Performance

Built to stay fast

Local SQLite reads and writes keep the POS responsive during sales.
Stock is derived from movement records for auditable inventory.
The desktop client is optimized for fast daily order processing at the counter.
Reports are scoped by shift and date for quick lookups.
13UI / UX

Design and interaction

Focused desktop POS layout designed for speed at the counter.
Clear screens for sales, invoices, inventory, and ledgers.
Receipt preview before printing to reduce paper waste.
Consistent, high-contrast retail visual identity.
14Production Readiness

Ready to ship and operate

Offline-first data layer backed by local SQLite.
Device-based activation for licensing control.
Thermal receipt printing and DTF printing services.
Windows desktop release workflow via Electron.
15System Features

What it does

Offline-First POS

Every sale, invoice, and stock movement is stored locally in SQLite, so the cashier keeps working even with no internet connection.

Sales & Returns Workflow

Handles POS sales, invoices, sales returns, and purchase returns with corresponding stock adjustments.

Inventory & Purchasing

Tracks stock movements across purchases, sales, and returns and links purchases to supplier accounts.

Shifts & Cash Drawer

Cashier shifts manage the cash drawer, expenses, and end-of-shift reconciliation.

Ledgers & Debt Collection

Customer and supplier ledgers track balances, while debt collection records payments against outstanding amounts.

Thermal Receipt Printing

Receipt preview and thermal printing support, plus dedicated DTF printing services for retail workflows.

16Technical Decisions

Why we chose what we chose

Decision 01

Electron for the desktop client.

Electron lets the POS ship as a native Windows desktop application while building the UI with modern React and TypeScript.

Decision 02

Local SQLite as the data store.

An embedded database keeps all transactions on the device, enabling true offline-first operation with fast local reads and writes.

Decision 03

TypeScript across the renderer.

Static typing keeps the sales, inventory, and ledger logic reliable and easier to maintain as the system grows.

Decision 04

Device-based activation.

Binding activation to the device provides a simple licensing model that works without a constant network connection.

17Outcome

Results

Desktop POS
System Type
Windows / Electron
Platform
Local SQLite
Data
Offline-First
Mode

Building something similar?

Let's scope your platform — dashboard, mobile apps, APIs, the full stack.