Work / Case study

F&F Tiles POS

Stock, sales and reporting for Fortune et Feveur, a tiling company: a Windows desktop app in the shop and an Android card terminal on the sales floor.

Condition: the shop keeps selling when the internet drops, and when it comes back, the desktop and the terminal agree on how many cartons are left.

Client
Fortune et Feveur (freelance)
My part
Sole developer: design, build, packaging and testing
Status
Delivered to the client
Stack
Electron, React, Express, SQLite, Sequelize, Supabase, Capacitor, Moniepoint SDK
Code
github.com/patrickAdegbesan/fortunetiles-system

Android card-terminal build, test data.

The desktop app in the shop

The same system on the shop's Windows computer, running with no internet.

Selling

Staff search the stock, add tiles by carton or square metre, adjust a price when needed, and take cash, card or transfer.

Desktop point of sale showing Fortune et Feveur tiles with photos, priced per square metre and per carton, and a cart Product management grid of Fortune et Feveur tiles with photos, price per square metre, stock in cartons, and stock status
Point of sale and product management, with Fortune et Feveur's own tile names, prices and showroom photos. Stock levels are test figures.

Records and reports

Every sale, discount and return is listed and searchable, and the owner can run reports for any date range and export them to PDF or Excel.

Transactions table listing orders with customer, items, discount, total, payment method and status Business reports page with revenue, discounts, number of transactions and average order value
Transactions and reports. The sales, customers and totals are test data.

The problem

Tiles are priced per square metre but stocked and sold in cartons, and a customer may ask for "20 square metres" of a tile that comes 1.44 m² to a carton. Every sale needs that conversion, and every conversion is a chance for the stock count to drift. The shop's internet also comes and goes, so a system that stops when the connection drops is no use at the counter.

What I built

  • A desktop app that needs no internet. Electron runs a bundled Express server on the computer's loopback address, with a single SQLite file for data. It runs as a portable Windows app, prints receipts over USB, and signs in against the local database.
  • An Android terminal app. The same React interface, packaged with Capacitor for a Moniepoint terminal, taking card payments and printing on the built-in printer.
  • Tile-aware selling. Each tile records its size and tiles per carton, so the cart converts square metres to cartons and back. Changing a price at the till needs a PIN set by the owner.
  • Returns and reports. Returns, refunds, damaged stock, daily and 30-day reports, and stock value.

The hard part

Two-way sync between devices that are each allowed to work offline. Every device keeps its own database, and database triggers note each change in a queue that syncs through Supabase every 15 seconds when there's a connection. Three rules stop the devices disagreeing:

  1. Each device creates records in its own range of IDs, so two devices can never create the same ID.
  2. Stock is synced as changes (minus two cartons, plus ten) rather than totals, so two devices selling the same tile at once both count.
  3. For everything else, such as a product's name or price, the most recent edit wins.

A test harness runs several simulated devices against a stand-in cloud with no network, and the end-to-end and sync suites cover 191 checks.

Where it stands

Delivered to the client, along with their company website, which I also built. That website is no longer online, so I don't link to it.