tolerance Start a project

Engineering studio · South Coast, KwaZulu-Natal

Systems that run the business.

Business software, mobile apps, firmware and circuit boards, built end to end.

One of our circuit boards in 3D: the alarm panel, with sixteen zone terminals along the far edge, the STM32 microcontroller in the middle and the output terminals along the near edge.
Since 2003
23 years of backends, payments and embedded work
End to end
The circuit board, its firmware, the backend, the apps and the cloud they run on
Hosting
AWS, Cape Town region · backed up · monitored
Right now
Serving from af-south-1 · up 9 days

The name

The tolerance we allow on a payment, an alarm or a pump's reading.

Engineered to tolerance.

Tolerance means two things in our work. Tight tolerances in what we make: boards to the fab's limits, figures to the cent. And fault tolerance in how it runs: when something fails, the system notices, says so and keeps going.

That is how we build. One studio for the whole system, from the board and the firmware on it to the backend, the apps and the AWS they run on, built around how the work is really done rather than a template that nearly fits.

Hardware
Circuit boards, simple to industrial-grade · STM32 and ESP32 firmware · touch screens, sensors and I/O
Software
Databases · backends and APIs · web and Android apps · desktop apps in Rust and C# · payments and integrations
Handover
Documented, no lock-in
Based
South Coast, KwaZulu-Natal

01 What we build

The whole system, from the circuit board up.

Nine kinds of work, and every one of them sits somewhere on the same stack. Point at one and its layer lights up.

  1. 01

    Line-of-business web apps

    The system a business actually runs on: quoting, invoicing, stock, scheduling, customer records. Built around how the work is really done, not around a template that nearly fits.

  2. 02

    Databases that hold up

    Properly modelled Postgres or SQL Server, with the money, the dates and the audit trail treated as things that must never be wrong. Migrations, backups, and a restore that has been tested.

  3. 03

    Payments and integrations

    Card and EFT gateways, recurring billing, email and SMS, and whatever the business already uses. Years of it inside payment systems, including EMV card applications, where mistakes are expensive.

  4. 04

    The AWS side, done properly

    EC2 or containers, RDS or a database you own, SES, SNS, S3, TLS, monitoring, and a deploy you can run yourself. Sized for what the business is, not for a conference talk.

  5. 05

    Mobile where it earns its keep

    An Android app when the job happens away from a desk, sharing one server-authoritative backend with the website so the two can never disagree about what was invoiced.

  6. 06

    Taking over what exists

    An application whose original developer has gone, or a spreadsheet that has outgrown itself. We'll read it, tell you honestly what it needs, and say so if the answer is less than you think.

  7. 07

    Firmware for microcontrollers

    C on STM32 and ESP32, close to the hardware: Ethernet and Wi-Fi, CAN, filesystems in external flash, touchscreens, and links between boards that are encrypted because they cross somebody's network.

  8. 08

    Circuit boards, designed to be made

    From requirements to a board a factory can build and assemble: schematic and multi-layer layout in KiCad, up to six layers, the routing cleaned up and checked by hand after the autorouter, every part checked against its datasheet and the fabricator's stock, and the cost worked out in rand before anything is ordered.

  9. 09

    Database maintenance and admin

    Keeping a production database healthy: backups that are checked, old data cleaned up and purged, tempdb and scheduled jobs looked after, and monitoring with email alerts. When something does go wrong, tools on the server show what happened and when.

02 Selected work

Examples of our work.

A product in production, a site brought back to life, and hardware from the copper up: the range, rather than the whole portfolio.

ChatBill

chatbill.co.za ↗ · invoicing for South African tradesmen

Built from the ground up · in production

ChatBill on the web: a job typed as one line, read back as an invoice for John Smith with three items, a total of R1,650.00 including VAT, and the question whether to create it.
Web · a typed job read back as an invoice
The ChatBill Android app's dashboard: money owed, overdue and paid this month, with buttons for a new invoice or quote. An invoice in the ChatBill Android app: the customer, two line items, subtotal, VAT and total, with buttons to view the PDF or send it on WhatsApp.
Android app · dashboard and an invoice

A tradesman types a job the way he'd type a WhatsApp message, and ChatBill turns it into a proper quote or invoice: VAT worked out, his business name and banking details on it, sent on WhatsApp or by email before he has packed up the tools.

Behind that one message box sits everything we do: a parser that reads a South African price list, a proper ledger behind every quote and invoice, recurring billing through PayFast, and an Android app sharing the same backend. Hosted, backed up and monitored on AWS, end to end.

Designed, built, deployed and run by Tolerance, start to finish.

Technical details

Stack

  • ASP.NET Core
  • PostgreSQL
  • Android / Kotlin
  • Jetpack Compose
  • AWS EC2 · SES · SNS
  • Linux arm64 · Graviton
  • Caddy · Docker
  • PayFast

Binga Filing Systems

binga.co.za ↗ · filing systems manufacturer, Gauteng

Site revival · quick with our in-house tools

Binga's home page in its dark theme: the heading 'Binga will tailor make your business filing systems', buttons for products, a callback and dealer login, and a photo of a mobile filing system.
Web · the home page
Binga's products page on a phone: a product card with a photo of filing drawers, a short description and a read-more link. A Binga product page on a phone: High-Density Mobile Filing Systems, with a photo of an installed unit.
On a phone · products, managed by the owner

A manufacturer of mobile and high-density filing systems, in the trade for over thirty years, with a basic WordPress site the business was not able to manage itself: there was no one to change a product, a photo or a phone number on it.

A complete replacement from the ground up, not a redesign of what was there. An ASP.NET Core site with an admin area where the owner manages his own products, services, gallery and client list; dealership management, with resellers pre-approved by the business and registering against that approval; and PostgreSQL behind product and dealer management, running on AWS alongside ChatBill.

Taking over what exists, done the way we describe it above: read it, say what it needs, then build the thing that will still be changeable in ten years.

Stack

  • ASP.NET Core
  • PostgreSQL
  • Dealer portal
  • AWS EC2 · SES
  • Caddy · Docker

Connected alarm system

Firmware · circuit board · Android app · relay on AWS

Hardware and software · all built in house

The alarm panel's circuit board seen from above: sixteen zone terminals along the top edge, the STM32 microcontroller in the middle, the power supply on the left, and the power, bell, output and input terminals along the bottom edge.
One of many PCB designs, from above · rev B · 170 × 110 mm · 4 layers · STM32F407
The Android keypad's home screen: the system disarmed with all zones normal, Arm Stay and Arm Away buttons, a hold-for-panic button, and sixteen zone lights. The Android keypad's zones screen: all sixteen closed, each listed by name, such as Front Door, Lounge and Garage Gate, with its type, instant or entry and exit.
Android keypad · live on the panel

A full intruder alarm with 16 zones, six programmable outputs and keypads. Each zone learns its own wiring, so it works with any brand of detector and can tell a real alarm from a cut or shorted wire.

Firmware in C on STM32 microcontrollers, with every network link encrypted. An Android app and a relay on AWS make it usable from anywhere. Its own multi-layer board is designed, checked and ready to order fully assembled.

All of it built in house: the board, the firmware, the app, and the server they talk through.

Stack

  • C · STM32 HAL
  • STM32 F4 · F7
  • LwIP · LittleFS
  • AES-128-GCM
  • KiCad · Python
  • Android / Kotlin
  • Jetpack Compose
  • UDP relay on AWS

Zone types

  • instant
  • entry/exit
  • motion
  • glass break
  • panic
  • fire (smoke and heat)
  • carbon monoxide
  • medical
  • silent duress
  • flood
  • freeze
  • tamper
  • keyfob arming

Industrial I/O

Schematic · board layout · design review · assembly files

Client work · recent · four boards, one system

The controller board in 3D: the STM32H563 microcontroller in the middle, an Ethernet socket and a USB-C service port on the near side, and green screw terminals round the edges for RS-485, power and its own inputs and outputs.
Controller · STM32H563 · Ethernet · RS-485 · 150 × 100 mm
The AIO-8 analog module in 3D: two ten-way terminal blocks along the far edge for its eight channels, the two analog I/O chips behind them, a rotary address switch, and the bus terminals on the right.
AIO-8 · 8 analog channels · 4-20 mA or volts, in or out
The DI-16 input module in 3D: sixteen input terminals along the far edge with a row of surge-rated resistors in front of them, the two input chips, a rotary address switch, and the isolated power supply on the right.
DI-16 · 16 digital inputs · wire-break detection
The DO-16 output module in 3D: sixteen output terminals along the far edge with their driver chips in front, a rotary address switch, and the bus terminals on the right.
DO-16 · 16 outputs, 0.5 A each · short and overload protected

A controller and plug-in I/O modules on a DIN rail, talking over an isolated CAN-FD bus, for monitoring and running motors and pumps.

Industrial grade throughout: isolated comms and power, surge protection, and short-circuit, overload and wire-break detection.

All four routed, checked against the datasheets and packaged ready to order fully assembled.

Stack

  • KiCad · Python
  • 4-layer boards
  • STM32H5 · STM32G0
  • CAN-FD · Modbus
  • Freerouting
  • In-house finishing tools

Side projects

Some of our side projects.

Not client work, but the same care, and all one system: the router runs the home network and the lab, the desk console shows the cameras and the printer and works as a keypad for the alarm, and all of it, every lab VM and system included, can be managed from anywhere over WireGuard.

home aws · tolerance.co.za away aes-gcm pinpad touchscreen alarm panel stm32 · 16 zones home router wireguard alarm relay holds no keys wireguard relay vpn back home android app away from home desk console on holiday

The alarm system, tied in

The alarm system above, joined to the rest: one panel, up to four keypads, and two relays so it works from anywhere.

Keypads
The touchscreen pinpad, the desk console and the Android app, up to four at once. Each one pairs at home, by holding the panel's button, and away from home the app and the desk console still reach it.
The relays
Two, on this site's own AWS server: the alarm relay passes on sealed packets it cannot read, and a WireGuard relay brings the desk console back into the home network. Home calls out to both, so nothing is opened on the router.
Security
Every packet sealed with AES-GCM, under a key per keypad made on the keypad itself. Replays are refused, and pairing only works in person.
Failover
Ethernet first, then Wi-Fi, then the relay, and a radio link if the network is gone. The panel switches over in seconds.
  • C
  • Kotlin
  • Rust
  • AWS
desktop rust android kotlin ssh custom router nftables wireguard pppoe traffic shaping vms · containers

A custom router, run from an app

Our own router for the home network and the lab, built on Debian: firewall, WireGuard, PPPoE, traffic shaping, and the lab's VMs and containers, all managed remotely over SSH from a desktop app written in Rust, and an Android app.

  • Rust
  • Kotlin
  • Linux
internet lab · vms cameras alarm printer desk console touch wireguard from anywhere

The desk console

The router app as a desk console: a small Linux touch screen on a stand, with the internet line, the router and the lab's VMs, the 3D printer, live views from the cameras, and a keypad for the alarm. Take it anywhere, even on holiday: over WireGuard it keeps full control from wherever it sits.

  • Rust
  • Slint
  • WireGuard
print manager api octoprint g-code marlin in a few clicks: slice · upload level · print touch screen existing unit custom firmware

3D printing, run from one app

Our print manager, written in Rust, runs the printer through OctoPrint and its Marlin firmware: slicing, uploading, levelling the bed and starting a print are a few clicks, remotely. We also wrote custom firmware for an existing touch screen on the printer.

  • Rust
  • C
  • Marlin
Our printer controller firmware on the printer's touch screen: nozzle and bed temperatures and their chart, mid-print.
Printer controller
The desk console on the lab's compute VM: CPU climbing in steps to 96% across eight vCPUs, and memory to 8.3 of 15.6 GiB.
Desk console · lab compute VM
3D render of our Bluetooth 2.1 amplifier board: an ESP32 module, two class-D amplifier stages with their red output parts, and the speaker terminals.
Bluetooth 2.1 amplifier · ESP32
The router app's overview: live CPU charts for all sixteen threads, memory, disk, and every temperature sensor.
Router app · live overview
3D render of the alarm panel mini, a smaller eight-zone version of the alarm board.
Alarm panel mini · 8 zones
A database monitor built for a client, running on its server as a Windows service: login time, blocked sessions, CPU and memory over the last hour, five disks, and the requests running now, with database and server names hidden.
Database monitor · client tool
The desk console's per-core view of the lab's compute VM: eight vCPU charts, the busiest three at 100%.
Desk console · every vCPU
3D render of our Bluetooth interface for a car radio: an ESP32 module, a microcontroller that speaks the radio's CD-changer protocol, and the loom connector.
Car radio Bluetooth interface
The router app's traffic shaping: three priority bands and the live counters for each.
Router app · traffic shaping
3D model of the desk console's stand, which holds its seven-inch touch screen.
Desk console stand · modelled in code
The desk console's alarm page: the system disarmed with all sixteen zones closed, Away, Stay and Disarm buttons, and the latest events.
Desk console · alarm keypad
The router app's services page: the router's systemd units with their state and whether they start at boot.
Router app · services
3D render of the alarm system's base board.
Base board
The desk console's router page: live CPU and memory charts, free memory, load, guests, devices and uptime.
Desk console · router

03 Where this comes from

23 years of systems other systems depend on.

Backends first and foremost, since 2003, and everything that has grown out of them since: payments, mobile, firmware and the boards it runs on.

Since 2003

Backends, first and foremost

The part nobody sees and everybody depends on. Long enough to have watched several fashions come round twice, and to know which of them were worth keeping.

Warehousing

Virtual warehousing platforms

Stock held, allocated and distributed digitally, where the count has to reconcile every time and a customer is holding the other end of the transaction while it happens.

Architecture

Three-tier business applications

Presentation, business logic and data kept properly apart, so the rules live in one place and the same system can be reached by a website, a phone and whatever comes next.

Billing

Pre-paid and post-paid systems

Balances, rating and billing in both directions, with the reconciliation that proves them. Money moving in real time is unforgiving of a rounding decision made carelessly.

EMV

Android EMV POS applications

Payment software running on the terminal itself, to the card schemes' rules. Certification, key handling and a transaction flow that has to be right whether the network drops, the card is pulled early or the battery dies mid-authorisation.

Mobile

Android apps, integrated end to end

The phone, the API and the database built together rather than an app bolted onto somebody else's endpoint, so the two can never disagree about what happened.

Embedded

Microcontroller firmware in C

STM32 F4 and F7 and ESP32, bare metal and close to the registers: LwIP networking, CAN, LittleFS and graphics in QSPI flash, and AES-GCM encryption.

PCB

Circuit boards, schematic to Gerbers

From simple boards to robust industrial ones: isolated inputs and outputs, industrial-grade parts, and Modbus over Ethernet and RS-485. Laid out in KiCad by script and autorouted, with our own finishing router for the last few connections, then cleaned up by hand, checked, reviewed and handed over ready for JLCPCB.

Native

Desktop and embedded Linux apps

Desktop applications in C# with Avalonia and in Rust with Slint, and touchscreen panels on single-board computers that draw straight to the display.

The languages, and where each one earns its place

C
Firmware on STM32 and ESP32 · drivers · network stacks · crypto
C++
Older C and C++ systems for companies, maintained and improved
Rust
Desktop applications with Slint · database tooling
C#
ASP.NET Core · EF Core · Avalonia desktop apps · this site
Java
EMV payment terminals · ISO 8583 · on-device Android apps
Kotlin
Android with Jetpack Compose · ChatBill's app · keypads and remotes
Python
KiCad board generators · CAD for 3D printing · capture and test tools
SQL
PostgreSQL · SQL Server · SQLite
Also
Bash · JavaScript · HTML and CSS by hand

04 How it works

No surprises, either way.

  1. 01

    We talk about the work

    Not about technology. What the business does, where the time goes, and what going wrong actually costs.

  2. 02

    You get a fixed scope and a price

    In writing, in plain language, with what is not included stated as clearly as what is.

  3. 03

    You see it early and often

    Working software on a real URL, not screenshots. Changing your mind is cheapest while it's still being built, and we'd rather you did.

  4. 04

    It goes live, and it stays up

    Deployed, backed up, monitored, and handed over with the documentation to run it. Support afterwards if you want it, no lock-in if you don't.

05 Start a project

Tell us what you need.

Roughly is fine. We'll tell you honestly whether we're the right fit for it, what it's likely to cost, and how long it will take.

Goes straight to our inbox. No mailing list, no third parties, nothing stored beyond the message itself.