Back to selected work
CASE 01 / ALP / LOGISTICS · WEB & MOBILE

The trip goes on.
The connection may not.

ALP connects drivers and operations through web and mobile applications. I designed the architecture and held primary responsibility for the core implementation, while also working on interfaces and the app’s release.

My role
Software architecture & core implementation
Context
Loopino
Product
ALP
Mobile app · iOS & Android

The case in three points

ALP / OVERVIEW
The challenge
Unreliable connectivity and background-execution constraints.Understand the context
A key decision
Local persistence, batch synchronization and rules in the Core.Explore the decisions
My contribution
Architecture ownership and core implementation, with web and mobile contributions.See my contribution

The trip happens in the field.
The system has to keep up.

A logistics operation is not confined to a browser. There is a driver using an app, location data being collected, trip information moving between devices and an operations team looking at the web panel.

The app must retain location data when connectivity drops and synchronize it with the backend when a connection is available. The dashboard uses that data to show the operation.

The design constraintThe mobile app’s connectivity and background behavior cannot be treated as if they were the same as a desktop browser’s.

I designed the architecture.
And built the core.

My responsibilities covered the backend and data, GPS integration, web and mobile interfaces, and the app release.

What I took responsibility for

  • Core architecture, APIs, data and Cloudflare/Supabase integration.
  • Integration between the driver app and operations dashboard through the Core API.
  • GPS SDK integration, investigation of offline behavior and batch synchronization.
  • Technical diagnostics and route visualization improvements.
  • Preparation and publication of the app for iOS and Android.

The structure behind
the product.

The map shows the main responsibilities and connections. Expand it to explore the flow, or select a layer to understand its role in the system.

ALP / SYSTEM MAP
ALP / From the device to the operation The driver app stores data locally in SQLite and sends batches to the Hono Core API. The Next.js panel and public trip view use the same backend. Core validates sessions through Supabase Auth, applies business rules and accesses PostgreSQL with PostGIS, private trip evidence in R2, and private profile documents in Supabase Storage. Arrows show selected requests and dependencies, not every network path. ALP / From the device to the operation System boundaries · selected connections Solid line: request / dependency HTTP HTTP / JSON Shared view Persist locally JWT SQL / Drizzle Signed access Private files Driver app Expo · React Native GPS SDK · trip flows Operations panel Next.js · TanStack Query Trips · drivers · evidence Public trip view Web A limited, shared trip view Local persistence SQLite · Drizzle Offline data on the device Core API Cloudflare Workers · Hono Rules · tenant isolation Supabase Auth Identity provider Admin and driver sessions Operational database PostgreSQL · PostGIS Drizzle · trips · ordered GPS Trip evidence Cloudflare R2 Private files · signed access Profile & documents Supabase Storage Private avatars and documents GPS is evidence. Mileage comes from the declared distance and odometer readings. MARCOS COSTA / SIMPLIFIED TECHNICAL VIEW / 06.10.2026
Simplified architecture · repository review: 6 Oct 2026
Read the diagram as text

The driver app stores data locally in SQLite and sends batches to the Hono Core API. The Next.js panel and public trip view use the same backend. Core validates sessions through Supabase Auth, applies business rules and accesses PostgreSQL with PostGIS, private trip evidence in R2, and private profile documents in Supabase Storage. Arrows show selected requests and dependencies, not every network path.

Expo · React Native · SQLite

Design for the device, not just the request.

The app separates screens from domain and integration logic. Local persistence uses SQLite/Drizzle, with a background location SDK and dedicated synchronization flows. Offline support does not make background execution unlimited: permissions, OS behavior and connectivity still matter.

GPS batches · idempotency

A retry must not become another batch.

The backend identifies incoming GPS batches by clientBatchId and checksum. This allows retries to be handled as repeats rather than new evidence. The app and server must also agree on the batch state and ordering.

Hono · Drizzle · PostgreSQL/PostGIS

Keep business rules in the backend.

Routes validate input with Zod and call services; repositories handle persistence and mappers shape the response. The backend resolves organization context and authorization. GPS points are evidence; mileage uses the driver’s declared distance and odometer readings/photos.

Next.js · TanStack Query · private storage

Make the operation visible without exposing the files.

The panel consumes Core through TanStack Query. Trip evidence lives in private R2 storage, while avatars and driver documents use private Supabase Storage. Signed access and backend checks connect the interface to those files.

A simplified view of the main boundaries and integrations.

What I chose.
The trade-offs involved.

01Make synchronization idempotent.Resend without duplicating the evidence.

Design choice

Use a batch identifier and checksum when accepting GPS points. The transport can retry without treating each delivery as a new logical batch.

The trade-off

Idempotency needs a persistent contract: identity, conflict handling and application state have to stay coherent. It does not remove mobile OS and connectivity constraints.

02Separate GPS evidence from declared mileage.An observed route is not a declared distance.

Design choice

Use declared distance plus odometer readings/photos for mileage. Preserve ordered GPS evidence and simplify it for route display rather than treating a noisy signal as the commercial distance.

The trade-off

The interface has to explain which information is declared and which is measured. A route visualization is not proof that GPS captured every part of a trip.

03Make Core the authority.One set of rules for web and mobile.

Design choice

Centralize tenant context, permissions and business rules in the Hono backend. Keep routes, validation, services, repositories and response mapping separate.

The trade-off

Both web and app have to respect stable contracts. More interfaces should not create competing implementations of the same permission or business rule.

From the decision
to the implementation.

Core backend & APIs

Backend, data and infrastructure connecting the app and web panel.

Tracking & synchronization

Location SDK integration, batch flow investigation and route work.

Interface & API integration

Implementation and visual adjustments across web and app, connected to the core backend.

iOS & Android release

I contributed to preparing and publishing the ALP mobile app for iOS and Android.

This work spans the driver’s device, the operations dashboard and the app listings linked at the top of this case.

Talk about this case study
Explore a different contextAchei Fotos

In Achei Fotos, the challenge shifts from field operations to image processing and purchasing.

Let’s talk about
the next challenge.

Hiring for your team or planning a system? Send me the role or project context and what you need to build or improve.

viniciustatuta@gmail.com

Architecture diagram

100%

Use the zoom controls and scroll to explore the visual. Escape closes this view.