Route Companion: Multi-tenant delivery routing built alongside an existing POS

Summary

Route Companion is the first client engagement delivered under the Auth/Technic banner. It is a multi-tenant web and native application that bolts onto Ablitt's Fine Cleaners & Tailors' existing SMRT point-of-sale platform, driven by SMRT's data API and surfacing that data in forms more functionally desirable to the business: modern geographic route optimization, fast customer lookup, driver-facing delivery planning, and foundational reporting. The engagement ran as a work-for-hire build under a structured Statement of Work with bi-weekly milestones and review-triggered payouts, spanning approximately three and a half months from late November 2025 through early March 2026. Route Companion plans deliveries for 3,000+ routed customers across more than a dozen delivery routes, with fast lookup spanning the full 15,000+ customer base synced from the POS, and a multi-tenant architecture designed from day one for expansion to additional specialty-service businesses in adjacent verticals. It is also the engagement during which the Auth/Technic venture studio model itself crystallized.

The Problem

Ablitt's Fine Cleaners & Tailors... a specialty dry cleaner and tailor operating in the Santa Barbara region... runs its customer, order, and operational data on the SMRT Business Management Platform, an industry-specific POS system widely used in the dry-cleaning vertical. SMRT is authoritative for customer contact data, order history, and payment flows, and offers its own takes on delivery-operations tooling, reporting, and customer lookup. The issue Ablitt's faced was experiential rather than functional: SMRT's surfaces for geographic route optimization, multi-modal customer lookup, driver-facing mobile experiences, and day-to-day reporting existed, but did not fit the operational shape of a fifteen-thousand-customer specialty service cleanly enough to drive the business effectively.

The operational question Ablitt's faced was not whether to replace SMRT... the cost and risk of replacing an industry-standard POS mid-flight would be disproportionate to any benefit... but whether to build alongside it. What was needed was a companion layer: one that sat on top of SMRT, consumed its authoritative data through its GraphQL API, and surfaced the routing, lookup, field-mobility, and reporting capabilities in the form Ablitt's operations actually required. That layer would need to be built bespoke; no off-the-shelf product fit the combination of SMRT integration, the business's specific operational shape, and the budget and timeline of a small independent specialty retailer.

The Idea

Route Companion's architectural bet was to treat SMRT as the authoritative upstream data source, to treat the new system as an optimization-and-experience layer on top of it, and to design the new system's schema and service boundaries as multi-tenant from the first migration... not because Ablitt's required multi-tenancy for their own operation, but because the problem's shape obviously generalizes. Any specialty service business with a mid-market POS and a delivery fleet could use the same capability. Building single-tenant and rewriting later would have been faster in week one and catastrophically expensive in year two.

Four technical bets sat underneath the larger architectural one:

The Implementation

The engagement structure

Route Companion was delivered under a Statement of Work with bi-weekly milestones. Each milestone had an explicit deliverable, an explicit review, and a payout gated on client acceptance of the review. The structure produced two effects that a less structured engagement would not have: (1) it forced customer interaction into the development cycle at a regular cadence, which turned out to be the single most valuable input to what ultimately got built, and (2) it made scope changes explicit and economically rational rather than implicit and conflict-generating.

The original Statement of Work estimated the engagement at approximately two and a half months across five milestones. What actually shipped spanned three and a half months across six milestones. The additional month was not slippage. After reviewing the work from the first five milestones, Ablitt's came back with a specific request for expanded scope... most notably a daily route planner for driver-facing operations that had not been in the original SOW. The sixth milestone was added formally, with its own deliverables, review, and payout. The client now has plans to expand the project further into additional operational surfaces. The "three and a half months for what was sold as two and a half" reads accurately as a customer-driven scope expansion that both parties wanted, not as estimate drift.

The AI-assisted delivery workflow

The engagement was delivered through a multi-model AI-assisted workflow. GPT was used for ideation... early architectural exploration, stack selection, plausibility reality-checks. Claude Code handled primary implementation against specifications set by the architect. Codex ran independent review passes on the resulting code, with Claude cross-checking Codex's reviews for completeness and appropriateness. The architect inserted guidance at every step and, in practice, often recognized patterns and issues in the domain or the code before the tools surfaced them.

Architecture, domain modeling, UI design, and program flow were human-authored throughout. Eight extensive code-refinement passes ran before production deployment, each a full walk through the codebase against explicit quality criteria... security posture, performance boundaries, API discipline, test coverage. The final deployment shipped with 52% overall backend test coverage and greater than 90% coverage on critical paths, a deliberately enforced quality gate. The gate has since been made mechanical: a continuous-integration pipeline runs the same checks as the local pre-push hook, defined in one place so the two cannot drift, and the backend coverage floor... 59% as of August 2026... is treated as a ratchet that only moves up.

The right analogy is the shift from darkroom photography to Photoshop: the vision is entirely human, the tool dramatically amplifies what a single practitioner can produce in a given window, and the output is craft work that would be recognized as such by anyone who has done it the older way. A build of Route Companion's scope, delivered by one architect inside 3.5 months, was not possible without LLM tooling. With it, it was.

The geographic core – Mapbox, PostGIS, and OR Tools

Route optimization in Route Companion is not a shallow "plot addresses on a map" implementation; it is a Vehicle Routing Problem solved under real operational constraints. The OR Tools solver is configured with six distinct optimization modes... stability (minimize customer churn across routes), balanced (equal customer counts per driver), distance (minimize total miles), time (minimize total drive-plus-service minutes), minimax (minimize the longest single route), and deoverlap (clean up boundaries between routes while moving as few customers as possible). Since a July 2026 revision, the manager picks a named intent describing what should happen in operational terms, and the intent derives a coherent solver settings bundle; the solver produces a proposal the manager reviews before commit.

PostGIS contributes the geospatial foundation: DBSCAN spatial clustering for atomic groups, concave-hull boundary computation for route visualization, and proximity queries for "what's within N miles of this address." Mapbox supplies geocoding (with Santa Barbara proximity bias), static map rendering for route cards, and Directions API drive-path computation for realistic mileage estimation. The three services compose into a working optimization pipeline that produces transient proposals rather than imposing changes directly... the manager stays in the loop on every route change. The objective-function math and the "stability mode" innovation each deserve their own technical writeup; the summary here establishes the system's operational reality.

The SMRT integration

The SMRT GraphQL API turned out to be more complex than its public documentation suggested. Milestone 1's first deliverable was supposed to be a simple customer sync; the discovery during that milestone was that SMRT's canonical route-based query surface returned only the approximately 3,200 customers with assigned delivery routes and missed the approximately 12,400 store-only customers entirely. A hybrid query pattern... route-based sync for routed customers, deliveryPreference-based sync for the rest... was designed in response and became the baseline approach. Hash-based change detection (SHA-256 of profile data plus last-activity timestamp) made subsequent syncs incremental and cheap, so running the sync nightly cost a small fraction of the full-customer-set price.

The integration is still an honest lift: the POS's data shape drove architectural decisions the engagement had to absorb. The general lesson... integration with commercial platforms whose API design reflects their historical internal data model rather than the external developer's intuition is normal, not exceptional... now travels with Auth/Technic into every engagement that touches a third-party API.

The custom auth system

The Route Companion authentication stack is hand-built: local user accounts in PostgreSQL, HS256-signed JWTs with eight-hour access-token lifetimes, seven-day refresh tokens with rotation, bcrypt at 12 rounds for password and PIN hashing, and an HMAC-SHA256 pepper that enables O(1) indexed PIN lookups without full-table bcrypt iteration. Access tokens live in JavaScript memory; refresh tokens live in HttpOnly cookies with the Secure flag set in production. Rate limiting caps login attempts at five per sixty seconds per username-and-IP, and switch-user attempts at eight per sixty seconds per session-and-IP. An auth_revoked_at timestamp on the user record provides instant session invalidation at the model level.

The decision to build rather than buy was driven by two concrete factors, not by preference for custom work:

The build-over-buy call has aged well. The role model has since grown from four roles to six: a Hotel Staff role that gives a valet location's front desk a shared login scoped to that single location, and a Production Staff role that runs the plant-side bag desk and nothing else. Both were added as ordinary schema-and-permission work inside the hand-built system, with no per-seat pricing conversation attached.

The auth model also carries company_id scoping on every relevant table, meaning the multi-tenant architecture is not a future migration... it is already how the database is shaped. Adding a second tenant is a provisioning exercise, not an architectural one.

Multi-frontend – PWA and native iOS

The browser-based PWA and the native iOS companion app are separate codebases sharing the same FastAPI backend. Shared OpenAPI schema definitions and Pydantic response models enforce consistency at the API boundary, so neither frontend drifts from the other on the data contract. The PWA handles managers, concierge staff, and CSRs on desktop and mobile browsers; the native iOS app serves the driver-facing delivery planner where field conditions (unreliable cellular, glove use, one-handed operation, direct sun) justify native UX treatment.

The PWA caches route-assigned customer records to IndexedDB on login, giving sub-ten-millisecond local lookups for the 95% of driver operations that don't require fresh network calls. Offline banner handling, token auto-refresh, and network-state event listeners cover the practical resilience cases for a delivery fleet operating across a coastal-California geography.

QR-based valet pickup and route prospecting

The enhancement engagement that followed launch turned Route Companion from a routing tool into a customer-acquisition and service-request surface, built around trackable QR codes.

Valet pickup. Branded garment bags carry QR codes. A customer with a bag at a participating valet location (a hotel front desk, for instance)... or at their own doorstep... scans the bag's code and requests service on the spot, with no app install and no account setup: the scan endpoint is public by design, and the bag's identity travels in the code. Behind that scan sits a full bag lifecycle: state transitions recorded as an event history per bag, home-radius detection so the system can distinguish a bag scanned at the customer's own address from one dropped elsewhere, and driver-facing tooling for the pickup side. Drivers record batch drops at valet locations with a presence stamp and count, and the system reconciles per-location so a hotel's open cycle can be audited at any moment: how many bags dropped, how many collected, what's outstanding.

Route prospecting. The same QR mechanism works ahead of the customer relationship. A prospecting drop planner lets the operation compose targeted drop lists: locations along existing routes where branded bags are left for prospective customers. A prospect who scans the bag's code lands in an inquiry flow (unauthenticated, rate-limited, honeypot-protected) and becomes a service request the business can route. Prospecting stops being a separate marketing activity and becomes a by-product of the fleet already driving its routes: a driver finishing a route drops prospect bags on the way, and every bag is a measurable, scannable lead.

The capability set was delivered through the same milestone-and-review engagement structure as the original build, and it exercises the studio's QR generation and camera-scanning infrastructure... capabilities that were extracted into the shared component library from exactly this kind of client need.

Operations after launch

Route Companion's second year is being shaped as much by operational maturity as by features. Sentry error tracking now runs across the backend, the background worker, and the frontend, with events scrubbed of anything sensitive before they leave the system. Liveness monitoring covers the pieces an uptime check cannot see: the background worker reports its own heartbeat, and the nightly POS sync checks in only when a scheduled run actually succeeds, so a dead worker or a silently failing sync pages someone instead of waiting to be noticed. Backups are taken per organization, daily and before any large change, with a written restore path proven against a scratch database; every schema migration's rollback has been drilled against populated data. A continuous-integration pipeline enforces the same gates as the local pre-push hook, and every push is scanned for leaked secrets under a fleet-wide policy. None of this was in the original Statement of Work. All of it exists because a system that plans real deliveries every morning earns its keep on the mornings something goes wrong.

The Outcome

Route Companion shipped in March 2026, on scope for its expanded six-milestone Statement of Work, and is in active production use at Ablitt's. The engagement did not end at launch: the client expanded the system into the QR-based valet pickup and route prospecting surfaces described above, converting the delivery fleet into a customer-acquisition channel. A third phase is under way as of mid-2026: hardening the platform to hold more than one business safely, with tenant isolation verified by tests rather than assumed, and an open-ended revisions milestone populated directly from the client's daily use of the system. Auth/Technic holds right of first refusal on future enhancements for the year following launch.

Two outcomes extend beyond the delivered software.

The engagement catalyzed the Auth/Technic venture studio model. During Route Companion's early development phases, the recognition arrived that what was being built was not only a client deliverable but a template... a set of patterns, component boundaries, and architectural decisions that would recur across future client engagements. The insight that a modular core could support both client work and exploratory side projects, with all of them cross-pollinating through shared infrastructure, produced the plan for Blok (the modular component library that now plays the "skyscraper core" role across the Auth/Technic portfolio) and the broader positioning of Auth/Technic as a software venture studio rather than a single-engagement consultancy.

A live platform-vendor risk emerged during the engagement. During the later stages of the build, the upstream POS vendor announced a usage-based pricing model for API access... a material change to the integration's operating cost that had not been in effect during the earlier milestones when the integration's architecture was designed. The fast architectural response was to remove components that depended on high-volume historical data retrieval (the transaction detail module in particular) from the product. The episode is now a live reference Auth/Technic carries into client conversations about integration design: a third-party API's pricing model is part of the platform risk, and architecture should accommodate the possibility of that model changing without warning. The follow-through is concrete: Route Companion meters its own POS API usage, with every call flowing through a single recorded client, so integration spend is a number the system reports rather than a surprise on an invoice.

Constraints and What We Would Do Differently

Three honest notes.

Security discipline as practice, not cleanup. Eight refinement passes ran before deploy. Each was a full walk through the codebase against explicit quality criteria... door-code encryption scope, token handling edge cases, rate limit coverage, RBAC boundary tests, sensitive-data scrubbing in logs. This is not defensive overhead bolted onto the end of a build. It is how shipped quality gets produced on a solo-plus-AI engagement at this scope. The candid-then-educational framing is the same pattern MarketSpace's security section carries: here is what production quality actually looks like when a practice insists on it, and here is the workflow that makes it affordable. The eight-pass discipline is now Auth/Technic's standing default for client work at this scale.

Integration architecture should assume platform-vendor risk. The SMRT pricing-model change is the concrete lesson. A future engagement with any third-party API dependency should treat vendor-side pricing changes as an expected event rather than an edge case. That means architectural flexibility around data-volume-sensitive components, clear separation between "core workflows that must work" and "enhancement workflows that can degrade gracefully" if a dependency's economics change, and a monitoring posture that surfaces cost signals early enough to respond before the next invoice. The pattern is already traveling into Auth/Technic's broader advisory practice.

Multi-frontend coordination has real carrying cost. PWA plus native iOS sharing a backend is architecturally sound for Route Companion's specific mix of user contexts... and maintaining two client codebases against a shared API contract has an operational cost that should be named honestly. The cost shows up in every API change (two clients to update, two test runs), every design revision (two render contexts to validate), and every deployment window (two release pipelines to coordinate). For engagements where the driver-facing mobile experience does not require native depth, a single PWA carrying all surfaces would be the preferable choice. The multi-frontend architecture is correct when the field-UX requirements justify it, and it should be argued for rather than defaulted into.

Related