FreightScaler answers a deceptively simple question: which route exposes my cargo to the least risk? It compares route alternatives not just by travel time but by live weather risk, official NWS alerts, and road-event exposure — with per-segment explanations, saved route watchlists, and a multi-tenant SaaS account layer. This post is the architecture teardown: how a solo engineer takes a product from "Lambda function" to a platform with four documented architectural eras, 24 ADRs, and a live deployment.
The product started where most data products should: a route-risk query API on AWS Lambda + DynamoDB, a React/TypeScript frontend on CloudFront, and honest data boundaries. The key product decision was doctrinal, not technical — if a data source is unavailable, the UI says so instead of showing fabricated data. Every downstream trust decision (alerts, thresholds, watchlists) depends on users believing the numbers, so fake-data fallbacks were ruled out by design.
Each growth phase was triggered by a concrete user demand, and each broke a different axis of the system:
| Phase | User trigger | What broke | Architectural response |
|---|---|---|---|
| Route risk query | Initial product | Nothing yet | Lambda + DynamoDB, fully serverless |
| Fleet telemetry | "Show my 50 trucks live" | ~28M GPS events/day, WebSocket fan-out | Kafka + TimescaleDB hypertable + nginx LB |
| Freight marketplace | "Find a carrier for this corridor" | 500 concurrent bids, real-time ranking | CQRS + optimistic locking + Redis Sorted Set |
| Settlement | "Weather delayed it — who pays?" | Multi-step payment across services | Saga orchestrator + atomic wallet + idempotency |
The lesson encoded in ADR-0024: telemetry is write-heavy, tracking is connection-heavy, bidding is contention-heavy, settlement is consistency-heavy. These are different scaling axes — a monolith cannot scale them independently, which is why the platform evolved into services, not because "microservices" was a goal.
Twenty-four ADRs document the reasoning. The load-bearing ones:
The React/TypeScript client renders segment-level risk breakdowns — rain, flood,
wind, heat, winter — so users see why a corridor scores differently, not just
a number. Saved routes live in a private watchlist with per-route monitoring
thresholds and manual refresh. A /status page exposes live data-source
health, frontend retry/fallback counters, and browser performance snapshots — the
operational transparency is part of the product, not an internal tool.
The repo carries the same discipline the harness blog post describes: GitHub Actions
for CI, nightly runs, security scanning (Trivy), Terraform plan/apply separation,
promote-to-prod and rollback workflows, CODEOWNERS, dependabot, and a PR template.
Deployment is not an afterthought — promote-prod.yml and
rollback.yml are first-class pipelines because a solo engineer's safety
net is the pipeline.
The honest gaps: billing isn't wired, the marketplace phase is documented more than deployed, and the settlement saga exists as design + foundation rather than a live money path. Those boundaries are deliberate — entitlement and saga contracts landed before the risky parts did.
The through-line across both this project and my agent work is the same: the structure is the product. Whether it's a freight-risk graph or an agent lifecycle, the leverage comes from getting the data model, the failure semantics, and the verification loops right — before adding surface area.