BizimVeresiye
Offline-First Credit Ledger & Barcode POS for Small Retailers
Visit Product Websitebizimveresiye.com.trThe Operational Problem
Context & Domain
In Turkey, small shops (bakkal, market, büfe, phone accessory shops) still extend credit to regular customers and track it in a paper notebook. Existing programs are either full ERP suites that are too heavy for a two-person shop, or cloud subscriptions that stop working when the shop's connection drops. Many of these shops also have years of balances in older desktop programs that they cannot afford to lose.
Overview
The ledger is money. A sale that lowers stock but not the cash register, a double-click that books a sale twice, or a return that refunds cash to a customer who actually owed money all turn into real disputes with real customers. And all of it has to work on an ordinary Windows PC behind the counter, with or without internet, operated by people who are not computer users.
System Architecture
BizimVeresiye is offline-first: the full product runs on a local SQLite database and never waits for the network. Every business operation (sale, credit sale, collection, return, stock count, cash movement) is a single EF Core transaction that writes the document, its stock, cash and ledger movements, an audit entry and a SyncOutbox event together. Money records are never deleted; cancels and returns write reverse movements. An optional cloud module reads from the outbox to share data between shop computers and show reports on a phone.
┌───────────────────────────────────────────────────────────────────────────┐
│ WPF DESKTOP (.NET 8 · MVVM · keyboard-first POS) │
│ barcode queue · customer ledger · stock · cash shift · reports │
└─────────────────────────────────────┬─────────────────────────────────────┘
│ Application services (OperationResult)
▼
┌─────────────────────────────────────┴─────────────────────────────────────┐
│ ONE EF CORE TRANSACTION PER OPERATION (SQLite, local) │
│ Sale + Items · Payment · StockMovement · CashMovement │
│ CustomerAccountMovement · AuditLog · SyncOutbox (Pending) │
│ LocalTransactionId unique index → retries never duplicate a sale │
└─────────────────┬───────────────────────────────────────┬─────────────────┘
│ daily │ HTTPS, when online
▼ ▼
┌─────────────────┴─────────────────┐ ┌─────────────────┴─────────────────┐
│ LOCAL BACKUP │ │ CLOUD MODULE (optional) │
│ .bksbackup · SHA-256 · integrity │ │ ASP.NET Core API · PostgreSQL │
│ USB / OneDrive folder │ │ shared data · phone reports │
│ RestoreTool swaps DB atomically │ │ hosted in Turkey │
└───────────────────────────────────┘ └───────────────────────────────────┘Keyboard-first POS and back-office screens; ViewModels talk only to application services and never touch the DbContext
Sale completion, credit limits, collections, refund allocation, cash shift and stock count rules, all testable without UI or database
Migration-based SQLite database with tenant, branch, register and device built in from day one, plus backup, restore and health checks
Optional sync API on PostgreSQL fed from the outbox, cloud backups, licence activation and signed over-the-air updates
Engineering Decisions
Offline-First, Cloud as an Add-On
A shop cannot stop selling because the modem restarted, and many owners do not want their customers' debts on someone else's server.
Multi-computer use needs the cloud module and an outbox-based sync instead of a shared live database, but the core product works on day one with nothing but a Windows PC.
Append-Only Money, Balance Derived from Movements
Shop owners settle disputes by going line by line through a customer's history; an edited or deleted line destroys that trust.
Sales, payments and ledger lines are never deleted; cancels and returns write reverse movements. A customer's balance must always equal the sum of their movements, and an integrity check flags any drift above 0.01 TL instead of silently fixing it.
Idempotency Keys on Every Write
Double-clicks, frozen screens and retries are normal at a busy counter.
Every sale, collection, return and stock movement carries a LocalTransactionId with a unique index, so retrying the same operation returns the original result instead of booking it twice. It costs a column and an index per table.
Technical Challenges & Solutions
Refunds on Credit Sales
A customer buys partly on credit and partly in cash, then returns some items. Refunding cash first would hand money to someone who still owes the shop.
A refund allocation service applies a return to the credit portion first, then cash, then card, subtracting earlier refunds. Partial returns split line discounts proportionally, and a full return of the remaining quantity uses the exact remaining net amount, so rounding never leaves a stray kuruş on the ledger.
Updating Software on Shop PCs Nobody Maintains
Some updates were only partly applied because a DLL was still locked, and the shop owner is not going to repair an installation by hand.
The updater takes a backup before every update, verifies the installer's SHA-256 and size from an HTTPS manifest, then runs it after the app closes. The installer uses Windows Restart Manager to close processes holding locked files, and the updater checks that target files are really free before installing.
Technology Stack
- • WPF
- • MVVM
- • .NET 8
- • EF Core 8
- • SQLite
- • PostgreSQL
- • ASP.NET Core
- • JWT
- • nginx
- • Ubuntu
- • Inno Setup
- • OTA Updater
- • GitHub Releases
- • xUnit
- • Integration tests
Key Implementation Highlights
- Barcode scans go through a queue with a semaphore, so fast consecutive scans are never lost
- Price and stock are re-read inside the sale transaction; a stale screen cannot sell at an old price
- Credit limits with an approval step when a sale would push a customer over their limit
- Backups are zip packages with a manifest, SHA-256 and SQLite integrity check; restore runs in a separate tool that swaps the database atomically
- Import tooling to bring customer balances over from older programs, verified customer by customer
Production Screenshots & System Interface
High-resolution interface evidence, operational telemetry cockpits, and field runtime screens.
BizimVeresiye: Offline-First Sale Path and Cloud Module
Every sale, payment, stock change, cash movement and credit entry is written in one local SQLite transaction. The cloud is optional and only ever reads from the outbox.
Results & Current State
BizimVeresiye is publicly available at bizimveresiye.com.tr with a 30-day full-feature trial and a one-time licence per computer. Shops in the pilot receive updates over the air; 58 pilot releases have shipped so far.
Key Architectural Takeaways
- 01.For a ledger product, data integrity is the feature: idempotency keys and append-only money records matter more than any screen.
- 02.Offline-first is simpler to trust than sync-first; the cloud should add to a working product, not hold it up.
- 03.On shop PCs nobody maintains, the updater is part of the product: a backup step and verified installers are what make frequent releases safe.