Selected work

Construction operations software

Dealer OS

I built Dealer OS for Techno Metal Post dealers. It brings a helical pile job’s drawings, quote, crew schedule and invoice into the same record, so the office and the people in the field can follow the same job.

TypeScriptReactHonoPostgreSQLQuickBooks Online

Try the job desk

This interactive reconstruction uses fictional jobs and sample prices. Choose a job to review its quote, plan a crew visit or try the billing workflow. All changes stay in this browser session.

When an invoice times out

A timeout can mean that QuickBooks created an invoice and its response never reached Dealer OS. I route outbound work through an approval ledger. When an outcome is uncertain, the app looks up the original invoice and compares it with what the dealer approved.

A matching invoice can be linked back to the job. If the books contain conflicting records or different totals, the discrepancy stays visible for review. You can try the matching path in the preview by opening the canopy job’s Billing view.

Preview implementation · JavaScript
function matchesApproval(approved, recorded) {
  return ['reference', 'subtotal', 'tax', 'total']
    .every(field => approved[field] === recorded[field]);
}

This preview condenses the invoice identification and read-back checks implemented in src/modules/billing/post.ts.

Getting a credit to balance

When a dealer credits a charge, the amount of tax needs to reverse down to the cent. A rate of 9.975% produces a half-cent on a $100 charge. The shared money module handles the calculation in integer cents and rounds ties away from zero. The charge rounds to $9.98 and the equal credit to −$9.98.

Preview implementation · JavaScript
function roundedTax(cents, ratePerMillion) {
  const raw = BigInt(cents) * BigInt(ratePerMillion);
  const sign = raw < 0n ? -1n : 1n;
  return Number(sign * ((sign * raw + 500_000n) / 1_000_000n));
}

Adapted from the behaviour of shared/money.ts. The production tests cover signed credits, half-cent ties and large integer amounts.

One job across the office and field

The React interface covers customer records, quoting, dispatch, inventory and billing. In dispatch, a dealer can review a day sheet for each crew, check what changed and issue a revised sheet. The Gmail integration handles outgoing communication, and QuickBooks Online handles the accounting connection.

Each request carries a dealer identity through the Hono API to PostgreSQL. Row-level access rules and regression tests keep records scoped to the right dealer. I also built Daylite import workflows for a source dataset of approximately 3,000 jobs and 3,200 contacts.

Read the standalone code sample on GitHub ↗

Next case study · AnimeHalo