All projects
Live in productionPrivate codebaseBusiness Software

Kira Workspace: Operations ERP

A private operations system for an industrial weighing company: clients, projects, quotations, invoices, receipts, expenses, calibration certificates, letters, an email inbox and reports, all connected around the client and the project, with branded PDFs that can be verified by QR code.

Database tables
54
Connected modules
20+
Unit & integration tests
290+
End-to-end tests
41
The Kira Workspace dashboard on desktop and phone, with a generated invoice

Highlights

  • Every quotation, invoice, receipt, letter and certificate comes from one PDF engine with one letterhead
  • Issued documents carry a QR code that anyone can scan to confirm they are genuine
  • Money is stored as exact whole kobo, never floating point
  • Every permission is checked on the server, and every change is written to an audit log
  • Sign-in with fingerprint or Face ID, plus required two-factor for finance and admin roles
  • Website enquiries arrive as numbered quote requests through a signed, private integration

The problem

Kira Scales Limited supplies, installs and calibrates weighbridges and industrial scales across Nigeria. Its day-to-day work ran on Word templates, spreadsheets, WhatsApp and memory: quotations typed by hand, invoice numbers kept in someone's head, payments matched to jobs at the end of the month, and calibration certificates rebuilt from old files.

Nothing was connected. It was hard to answer simple questions such as "what does this client still owe?", "did this project make money?" or "when is this scale due for calibration?".

What it does

  • Clients and projects at the centre: every quotation, invoice, payment, expense, letter, document and email links back to a client and a project, with one timeline for each.
  • Sales documents: quotations and invoices built from Kira's own sample documents, with saved products, editable prices, VAT, sections and long-document pagination. Receipts mark part, full or final payment automatically.
  • Money: payments, receipts, project expenses with receipt photos, supplier debts with "pay all" or "pay half", and project profit. A privacy eye hides figures on screen until tapped.
  • Field work: equipment registers, service jobs, calibration recording, and certificates numbered per visit and instrument.
  • Letters and email: a rich-text letter editor with merge fields, branded emails sent from the company mailboxes, and an Inbox that threads received and sent mail and matches it to clients.
  • Document vault: private file storage with server-checked access for every download. Nothing is ever public by link.
  • Notifications and reports: a notification centre, Web Push with generic payloads, daily reminders, and reports by project, client and period.
  • Mobile: an installable app with a phone bottom bar, card lists, touch sizing, and forms that survive a dropped connection.

Architecture

System architecture
  1. Edge
    • Caddy (TLS, private host, noindex)
  2. App
    • Next.js App Router (server components + server actions)
    • Auth-checked API routes
    • Installable PWA shell
  3. Core
    • Permission-guarded actions
    • Document & PDF engine
    • Finance engine
    • Numbering
    • Email & Inbox sync
    • Notifications
  4. Data & services
    • PostgreSQL 16
    • Private file storage
    • Transactional email
    • Mailbox (IMAP, read-only)
    • Off-site backups
One self-contained Docker app on the company's own server, with its own database, auth and storage.

Engineering challenges

1

Matching real documents, page for page

The quotations and invoices had to look exactly like the ones clients already knew. I studied Kira's sample documents, rebuilt them as React PDF templates on one shared engine, and added pagination rules so long quotations split cleanly across pages. Every document, from a receipt to a calibration certificate, now shares the same letterhead, fonts, sign-off and company stamp.

2

Numbers that never collide or skip

Quotations, invoices, receipts, delivery notes, letters and certificates each have their own approved numbering format. Each number comes from an atomic counter per series and year, inside the same database transaction as the record it belongs to. Two people issuing at the same moment can never get the same number.

3

Documents that prove themselves

A printed invoice or certificate is easy to forge. Every issued document carries a QR code that opens a verification page on the public website. Each code is a long random token, and the website checks it with the Workspace through a signed private endpoint that returns only what is needed: issued, expired or cancelled. Certificate look-ups are also rate-limited per visitor. The Workspace itself is never exposed to the public.

4

Private by design, not by obscurity

The app has no public pages and is hidden from search engines, but that is not the protection. Sessions are stored in the database, every page and action checks a permission on the server, and finance and admin roles must use two-factor sign-in. A security audit also closed brute-force, CSRF, SSRF and spoofed-IP gaps, and every change is written to an audit log in the same transaction.

5

Running reliably on a small server

The app runs as one Docker container behind Caddy on a modest VPS. It has health checks, nightly encrypted backups copied off the server, uptime monitoring and a weekly cleanup of old builds. Deploys are pinned to a specific commit, so rolling back is a single command.

Results

The Workspace is live and in daily use by Kira's sales and admin staff, on desktop and on phones. Its design decisions are recorded in a numbered log of more than 170 entries, and the unit, integration and end-to-end tests run against real PostgreSQL databases.

Gallery

The Workspace dashboard showing items needing attention, project counts, money totals and recent documents
The dashboard: what needs attention, projects, money owed both ways and recent documents
Six generated documents - quotation, invoice, receipt, calibration certificate, delivery note and statement of account
Six document types from one PDF engine, with one letterhead and QR verification
A full-page quotation and invoice generated by the Workspace
Quotation and invoice: VAT per line, VAT-exempt civil works, payments and balance due
A full-page receipt and calibration certificate generated by the Workspace
Receipts state part, full or final payment; certificates carry every test reading
A project page with contract value, amounts received, outstanding balance, costs and profit
Each project shows its money: value, received, still to collect, costs and profit
An invoice page with line items, VAT, total, payments recorded and related documents
Invoices track payments and balances, and link back to the original quotation
The calibration certificate editor with test weights, readings and automatic deviation checks
Calibration readings are checked against tolerance automatically before a certificate can be issued
The payments and receipts list
Payments and receipts, with part, full and final payments marked automatically
The sales report with quotations issued, conversion rate, invoiced and received totals
Reports by sales, projects, finance, clients, engineering, suppliers and profit
The supplier debts page showing what is owed to each supplier
Supplier debts per supplier, with pay all or pay half
The Workspace on a phone, showing the dashboard, a project and an invoice
The same Workspace as an installable app on a phone

Next project

Maldra Invoice & Quote Maker