ILLYAS AKBAR CYCLE WORKS — POS SYSTEM
A fully offline, bilingual (English/Urdu) Point-of-Sale and business management desktop application built for a cycle spare parts retail shop. Covers the complete business workflow, from inventory and billing to staff payroll, vendor accounts, and financial reporting.

Overview
Illyas Akbar Cycle Works required a complete digital solution to replace their manual paper-based record keeping. The shop handles four distinct sale categories, retail, wholesale, repair jobs, and admin/internal transactions, each with different pricing structures, payment flows, and documentation requirements. The system needed to work entirely offline on a single Windows machine, support both English and Urdu interfaces for non-English-speaking staff, and produce thermal receipt printouts without any internet dependency.
The Challenge
The primary challenge was designing a system flexible enough to handle four fundamentally different billing workflows under one unified interface. Repair jobs required customer slips with cycle-specific details and storage fee warnings in Urdu. Wholesale orders needed multi-method payment splitting (cash + online + bank transfer simultaneously). Credit management required customer identity tracking across multiple bills over time, merging purchase history by phone number and auto-distributing surplus payments across outstanding balances. Additionally, all data had to be stored locally in a structured SQLite database with migration support, while the Electron security model required strict process isolation between the UI and the database layer via IPC and a contextBridge preload.
Our Solution
Built with Electron (main process) + React/Vite (renderer process) + SQLite via better-sqlite3. The architecture uses a strict IPC bridge pattern, the React frontend never touches the database directly; all 50+ operations are exposed through a typed preload API (window.electron.*). The database layer handles atomic transactions for all multi-step operations (bill creation, returns, smart payment distribution) to guarantee data consistency. The bilingual UI uses i18next with full RTL layout switching for Urdu. Thermal receipt printing is handled by spawning a hidden Electron BrowserWindow per print job, generating pure HTML invoices and sending them silently to the printer using webContents.print(), bypassing all browser print dialog interference. A custom barcode scanner hook detects hardware scanner input by measuring inter-keystroke timing (under 50ms threshold) and distinguishes it from manual keyboard typing in real time.
