CalcRig
A field calculator for the trades — 16+ code-cited calculators across electrical, HVAC, plumbing, and construction, built to work offline on a job site.

CalcRig is a multi-trade field calculator for construction, HVAC, electrical, and plumbing professionals. Instead of juggling a handful of single-purpose apps and a code book, a tradesperson gets 16+ calculators in one place — each one showing the formula it used and the code section it's based on.
We built it offline-first because job sites rarely have reliable signal, and we made every result something you can hand to an inspector: the wire-ampacity number sits next to its NEC table reference, the duct-sizing result next to its ASHRAE basis.
What we set out to solve
Trade calculation tools are fragmented — one app for wire sizing, another for duct sizing, and a code book to verify either. Switching between them mid-task is slow and error-prone.
The free alternatives are shallow: they spit out a number with no formula and no code reference, so the result is impossible to defend to an inspector or a client.
And almost none of them work where the work happens. Job sites have patchy connectivity, so anything that depends on a live network is unusable exactly when it's needed.
How we built it
We treated CalcRig as a precision instrument first and an app second. The calculation logic had to be trustworthy, transparent, and available with zero connectivity — everything else was built around that.
Pure, testable calculation engine
Every calculator is a pure TypeScript function separated from the UI, returning both the value and the formula used. That keeps 16+ calculators consistent and verifiable, and lets us cite the exact code standard behind each result.
Offline-first data layer
Calculations and projects are stored locally in SQLite (op-sqlite + Drizzle) so the app is fully usable with no signal. A sync queue reconciles changes with the backend when a connection returns.
Trade-organised navigation
Each trade gets its own tab and stack, so an electrician lands on electrical tools and a plumber on plumbing — no hunting through a flat list of dozens of calculators.
One brand across app, web, and store
A locked design system (construction-orange accent, four trade colours, iOS-native typography) keeps the marketing site, app, and store assets feeling like one product.
What it does
Code-referenced results
Every calculation shows the formula used and the standard behind it — NEC, ASHRAE, UPC, or IRC. Results you can cite to an inspector.
Pure calculation engine
All calculation logic lives in pure TypeScript functions, separate from the UI — testable, reliable, and consistent across all 16+ calculators.
Offline-first
Local SQLite storage means the app works with zero connectivity. A sync queue pushes changes to the cloud once you're back online.
Calculation history
Full parameter persistence — restore any past calculation, tweak the inputs, and recalculate. Organised by project, not just a log of numbers.
PDF & share export
Turn any result into a branded PDF or share it as formatted text — for quotes, estimates, or client handoff.
Built for the field
High-contrast dark UI, large tap targets, imperial/metric toggle on every calculator — designed for sunlight, gloves, and real conditions.
Architecture
CalcRig spans three surfaces — a cross-platform app, a type-safe API, and a marketing site — that share a single design language and a generated, end-to-end-typed contract between client and server.
Expo Router app with per-trade tab navigation. Local-first state in SQLite via Drizzle, fast preferences in MMKV, server state through React Query. Auth, entitlements, and sync are layered as providers at the root.
A Hono + PostgreSQL service publishing an OpenAPI spec. Sync endpoints reconcile the device's offline queue with server state using version numbers and server-wins conflict resolution.
The app's API client and React Query hooks are generated from the backend's OpenAPI spec with Orval, so a schema change on the server surfaces as a type error in the app — no hand-written, drift-prone models.
Built with
Engineering challenges
Stay fully usable with no signal, then sync without losing or clobbering data when connectivity returns.
An on-device sync queue records every offline change. On reconnect, the app pushes the queue and pulls deltas keyed by a server-assigned version number, with server-wins resolution and exponential backoff — so the app degrades gracefully and never blocks the user offline.
Keep 16+ calculators and a separate backend in lockstep without hand-maintaining API models.
The backend emits an OpenAPI spec; Orval generates the app's typed client and React Query hooks from it. A breaking server change becomes a compile-time error in the app instead of a runtime surprise.
Gate Pro features by subscription while keeping a single source of truth for who the user is.
RevenueCat entitlements are linked to the Better-Auth user ID on login, so paywall state and account state never diverge — cloud sync, unlimited history, and PDF export unlock cleanly against one identity.
A look inside








What shipped
Want us to build something like this?
Tell us about your project. NOTchip scopes, designs, and ships on a milestone basis — you only pay for results.
Start a project