STStephen TioluwaniAll work

Pama product · 2026

Business operating system · Offline-capable

Founder & lead engineer

PamaOS

Turning a growing business suite into modules that own their data.

PamaOS is a modular operating system for small businesses: Products, Inventory, Kitchen, Staff Feeding, people and branch permissions. The difficult work has been keeping those modules independent without letting stock, pricing or access control drift apart.

The thesis

“A modular business OS is only modular if each domain can protect its own invariants.”

Module-owned

Sync runtime

Products moved off the shared sync runtime and now owns schema parsing, replay, reconciliation and permissions.

Server-first

Online writes

Products, Inventory and Kitchen progressively moved to server-authoritative online mutations with durable offline fallback.

Boundary-level

RBAC

Unauthorized branch data is filtered before it crosses the Convex boundary, not merely hidden in UI.

01 · Growing pains

The shared abstraction was becoming the coupling.

PamaOS began with a shared runtime that made it quick to give modules the same offline and synchronization behavior. As Products, Inventory and Kitchen became more sophisticated, that convenience started hiding domain-specific rules inside a generic engine.

Products became the first deliberate move toward module ownership. Its runtime now owns pending-write replay, its sync contract, permission resolution and reconciliation instead of outsourcing those decisions to a shared black box.

02 · Online truth, offline resilience

Server-authoritative does not have to mean offline-hostile.

For business data such as stock, optimistic local truth becomes dangerous while connected. Two terminals can both believe the last unit exists. A rejected write can look successful locally. A lost acknowledgement can produce a duplicate if the retry receives a new identity.

The newer PamaOS modules send online writes to the server first, commit canonical results after acceptance, and only queue durable local intent when the device is genuinely offline or loses connectivity mid-write.

  • Reconnect order is pull → push pending → pull.
  • Lost-acknowledgement retries preserve the original client write ID.
  • Large pending backlogs are drained in ordered batches instead of replay loops.

03 · Stock is a conservation problem

Kitchen writes became transactions, not UI events.

Kitchen usage and waste can mutate raw stock, so validation has to complete before stock moves. Duplicate usage lines targeting the same raw stock are aggregated. Insufficient stock rejects the transaction. Deleting a usage event restores the exact quantity that was deducted.

Offline reconnect settlement reconciles temporary IDs to canonical IDs and forces authoritative recovery when queued writes are rejected or conflicted. Ghost rows and rejected local stock projections are not allowed to survive reconnect.

04 · Permissions are data architecture

A hidden price is still leaked if it crossed the wire.

Role permissions and branch scope are enforced in the read projections themselves. Staff Feeding exposed why that matters: branch pricing must be narrowed to the selected authorized branch, and deleted deltas must not accidentally carry fields that bypass redaction.

The RBAC work aligned navigation permissions with the backend data contract so a user cannot gain organization-wide setup or stock visibility just because a screen is hidden.

What stayed with me

PamaOS is where I learned that modularity is less about folders and more about who is allowed to decide the truth.

Next.jsReact NativeConvexTurborepoIndexedDBSQLiteTypeScript

Next case study

Track

A timer for my “Sin Hours” turned into a local-first systems project.

↗