Brian Oktavec
← ProjectsInspectra
Case studyPLATFORMWORK

Inspectra

Full-stack inspections/compliance SaaS: customer portal, staff back office, and an offline-capable inspector PWA on an AWS/Kubernetes backend.

Problem

Inspection and compliance workflows spanned three different audiences — customers, office staff, and field inspectors — with no single system connecting intake, review, reporting, and billing, and no real answer for inspectors working with unreliable field connectivity.

Architecture

Three front-of-house surfaces (customer portal, staff back office, inspector PWA) share a common identity layer (Entra ID / Entra External ID via JWT/OIDC with RBAC middleware) and run against an AWS/Kubernetes (EKS) backend. The inspector PWA is offline-first: a service worker and IndexedDB layer let inspectors work without connectivity, with background sync and conflict resolution reconciling changes once back online. Reports and invoices render through a Puppeteer + React pipeline; billing runs through Postgres-numbered invoices delivered via SES. A CMS (Payload v3 + Next.js, SSO, ISR-based publishing) handles content.

What I Built

A shared JWT/OIDC auth package with RBAC middleware, integrated across all three services.
A Puppeteer + React PDF framework for reports and invoices, plus the bulk billing pipeline (SES delivery, Postgres invoice numbering).
The offline-first inspector PWA: service worker, IndexedDB layer, background sync with conflict resolution and audit logging.
Staff dashboards and admin CRUD (inspectors, devices, lookups) and a synthetic-monitoring status page.
A CMS migration to Payload v3 + Next.js with SSO and ISR-based publishing.
Terraform-managed AWS resources (RDS IAM auth, S3 CORS, SES, EKS logging) and CI/CD hardening.

Engineering Decisions

Offline-first over requiring connectivity
Inspectors work in the field where connectivity isn't reliable. Cost: real complexity in conflict resolution and sync rather than a simple online CRUD app.
One shared auth package over per-service auth
RBAC and identity logic are used identically across customer, staff, and inspector surfaces. Cost: every service depends on a shared package's release cadence.
Puppeteer + React over a templating PDF library
Reports and invoices reuse the same React components as the UI, so they stay visually consistent for free. Cost: a heavier rendering pipeline than a pure templating engine.

Challenges

Designing conflict resolution for inspection records created or edited offline and synced back later.
Modeling RBAC correctly across three distinct user surfaces with different permission shapes.
IAM-based RDS auth and EKS logging hardening as part of the AWS/Terraform setup.

Outcome

Shipped and in production, supporting real inspection and compliance workflows end to end.

What I Learned

Committing to offline-first up front forced more rigor around conflict resolution and idempotency than an online-only design would have — rigor that ended up making the whole sync layer more trustworthy, not just the offline path.