Skip to content
Back to projects
MobileFrontendDevelopmentCollaborationBackendFull-stack2026

Wawa Rider App — SRSE Trip Planner, Wallet & Smart Boarding

Image 1 of 10

Overview

Wawa is a Venezuelan mobility company running bus circuits, private transport and rentals in Venezuela, Colombia and Guatemala, and I have been the top contributor to its rider app since 2024. My biggest feature there is SRSE, the Smart Request Schedule Engine I designed and built end to end. Riders type where they are going and see every departure of the day as walking plus bus itineraries, with up to one transfer, filtered by real seat availability and ranked by arrival time, transfers and walking. Booking is atomic across legs: a trip gets all its seats or none, and if something breaks the app says which leg failed and offers new options. The engine is pure TypeScript in a hexagonal design with about 660 test cases, load-tested with k6. Around it, the app handles wallet top-ups with several payment providers, favorites, automatic boarding, QR boarding tickets and push notifications, shipped with EAS and over-the-air updates.

Visit project

case.study

Summary

SRSE (Smart Request Schedule Engine) lets Wawa riders say where they are and where they are going. It returns walking plus bus itineraries, including one transfer, with live seat availability, and books every leg atomically.

The problem

To book a seat in the Wawa Rider App, riders had to know the bus network: pick a circuit or a stop. If they did not know which circuit served their trip, they could not book at all. The goal was an origin-to-destination flow that computes walk, bus, transfer, bus and walk on its own and books the whole trip in one step. When nothing fits, the failed search is recorded as anonymous demand so operations can see where service is missing. The engine also had to be callable later as a tool of an AI agent without touching its core.

My role

I designed and built the engine (9 of the 10 commits in its folder; the other is a spec fix by a teammate) and led the planner flow in the Rider App, from search to booking confirmation, failure handling and repeating a trip.

Constraints

  • Seats are counted per segment and per companion, so a route without room for the whole party must be dropped during the search, not after it.
  • Booking is all or nothing across legs, with one wallet movement per leg, while other riders compete for the same seats.
  • A trip must create ordinary requests, so the driver app, check-in and CMS keep working unchanged.
  • Planning is bounded: at most one transfer (a parameter), a wait window, a walk radius and a per-rider throttle of 180 requests per minute.

Architecture

Scroll sideways to see the whole diagram.

Connections
  • Rider App → Google Places: Place search
  • Rider App → GraphQL delivery layer: PlanTrip, BookTrip, RepeatTrip
  • Load test harness → GraphQL delivery layer: PlanTrip load (staging)
  • GraphQL delivery layer → SRSE engine (pure domain): Use cases
  • SRSE engine (pure domain) → Duties, seats, wallets, requests: Reads through ports
  • SRSE engine (pure domain) → Atomic trip booking: Book all legs
  • Atomic trip booking → Duties, seats, wallets, requests: One transaction
  • SRSE engine (pure domain) → Duties, seats, wallets, requests: Records failed searches as demand
  • CMS demand map → Duties, seats, wallets, requests: Reads trip demand
A pure-TypeScript engine sits behind GraphQL. It reads through ports and delegates booking to the existing requests flow, inside a single transaction.
  • Rider App, client, Expo · React Native
  • Google Places, external, Google Maps
  • GraphQL delivery layer, service, Nest.js · GraphQL
  • SRSE engine (pure domain), service, TypeScript
  • Atomic trip booking, service, Nest.js · Prisma
  • Duties, seats, wallets, requests, datastore, MongoDB
  • CMS demand map, client, Next.js
  • Load test harness, client, k6
  1. Rider App → Google Places: Place search
  2. Rider App → GraphQL delivery layer: PlanTrip, BookTrip, RepeatTrip
  3. Load test harness → GraphQL delivery layer: PlanTrip load (staging)
  4. GraphQL delivery layer → SRSE engine (pure domain): Use cases
  5. SRSE engine (pure domain) → Duties, seats, wallets, requests: Reads through ports
  6. SRSE engine (pure domain) → Atomic trip booking: Book all legs
  7. Atomic trip booking → Duties, seats, wallets, requests: One transaction
  8. SRSE engine (pure domain) → Duties, seats, wallets, requests: Records failed searches as demand
  9. CMS demand map → Duties, seats, wallets, requests: Reads trip demand

Key decisions and trade-offs

  1. A hexagonal engine, isolated from the rest of the API

    The domain and application layers import no Nest, Prisma or Google code, and a lint rule enforces it. Ports cover the network, seats, fares, booking, demand and config, so in-memory adapters keep the domain tests fast. The contract is stateless, with flat DTOs, so the same use cases can later become AI-agent tools. The trade-off: the layout is deliberately atypical for this API, which otherwise follows a module pattern, so the engine's README warns against copying it, and it takes more files and mapping code than a plain service.

  2. Atomic multi-leg booking with optimistic concurrency

    One database transaction claims the seats of every leg or none, bumping an occupancy version on each duty. If another rider wins the race, the booking fails with a distinct high-demand code instead of a misleading no-seats message, and the failure names the leg and offers re-planned alternatives. Legs are tied together only at creation. Afterwards each one lives, is charged and is cancelled on its own, so cancelling one leg leaves the other booked. The trade-off: under contention some riders must retry, and a partial trip is a valid state.

  3. Bounded search with Pareto pruning, not a full RAPTOR implementation

    The design doc called the algorithm RAPTOR-style. The code instead does one batched duty scan per day, joins bus 1 and bus 2 in memory (stops paired by distance, since a loop terminal is stored as two stops), filters seats per leg and prunes to a Pareto set on arrival, transfers and walking, with a cap on results. Walks are estimated with haversine distance times a 1.3 street-detour factor rather than a routing API call. The trade-off: it is simpler and cheap to run, but it supports one transfer by default and its walking times are estimates.

Outcomes

PlanTrip p95 latency at 1 request/s (staging smoke test)
325 ms
PlanTrip p95 latency at about 8 requests/s (staging load test)
367 ms
Automated test cases in the engine
712 in 42 spec files
MVP1 (direct trips) and MVP2 (transfers, atomic two-leg booking) merged
2026-10-21 and 2026-10-29

Stack

  • Nest.js
  • TypeScript
  • GraphQL
  • Prisma
  • MongoDB
  • Jest
  • k6
  • React Native
  • Expo
  • Google Maps
  • TanStack Query
  • Zustand

build.similar

Build something like this

If this is close to what you have in mind, AndroAI, my assistant, can explain how it was built and what a similar project would involve.

Or ask about this project

Similar projects

AluminioLogo — Retail ERP, POS & Fiscal Invoicing
Featured

AluminioLogo — Retail ERP, POS & Fiscal Invoicing

I built AluminioLogo's ERP and point-of-sale system from the ground up for a hardware and aluminum distributor with several branches in Venezuela. It covers branch inventory, quotes, returns, receivables, roles and permissions, and a POS that takes payments in USD and bolivares with exchange rates. The part I'm proudest of is fiscal invoicing: a small agent runs as a Windows service in each store and prints invoices, credit notes and daily reports on certified fiscal printers. There is also an admin web app, a mobile app and a product catalog. It has been live in production since October 2026, with more than 3,000 commits. I work with Claude Code daily: I make the architecture decisions and the AI helps me move faster.

MobileWeb
2026
Nest.jsReact.jsTypeScript+12
AluminioLogo Credit — Buy Now, Pay Later Credit Lines (Cashea-inspired)
Featured

AluminioLogo Credit — Buy Now, Pay Later Credit Lines (Cashea-inspired)

I designed the customer credit system inside AluminioLogo, inspired by the buy-now-pay-later model that Cashea made popular in Venezuela and adapted to in-store sales. Each client can get a credit line with a USD limit and a payment term, which can come from a template per client type. At the POS a sale is charged to the line, optionally with a down payment in USD or bolívares, and the system refuses it when the line is over its limit or suspended. Partial payments are applied at the day's exchange rate and release credit as they come in. Overdue debt blocks the line automatically and unblocks it once paid, the receivables screen groups debt by age, and every change lands in an append-only history.

WebAdmin
2026
Nest.jsReact.jsTypeScript+6
Background Action! — Casting Platform for iOS, Android & Web
Featured

Background Action! — Casting Platform for iOS, Android & Web

Background Action! is a casting platform I built for a Mexican film and TV extras-casting company, rebuilding an older system with a large base of talent profiles. One Expo codebase delivers iOS, Android and web: an eight-step registration wizard with a live casting ID card, photo books, a skills catalog, legacy-profile import and Premium subscriptions. Payments use Stripe on the web and native in-app purchases on mobile. I added push notifications and versioned legal acceptance, and co-built the Laravel 13 API. The first working version took about a month, with automated tests and release runbooks. I used Claude Code throughout, directing the architecture myself.

MobileWeb
2026
ExpoReact NativeTypeScript+10