Delivery and logistics · product
Building a multi-application delivery ecosystem
Designing a shared architecture for three coordinated applications — customer, restaurant, and driver — around a single order and logistics core.
- Web
- Mobile
- Software
Context
Client: Internal product — LieferXXL. Industry: Delivery and logistics.
Challenge
A delivery platform needs three different applications that each serve a different audience with different priorities: customers ordering food, restaurants managing incoming orders and menus, and drivers accepting and completing deliveries. Building these as three disconnected products risks duplicated logic, inconsistent order states, and a support burden every time the definition of an order changes.
The challenge was architectural before it was visual: define a single source of truth for an order's lifecycle that all three applications could rely on, without forcing any of the three interfaces to compromise on the workflow their specific users need.
Constraints
The three applications have materially different requirements: the customer app needs to be fast and simple on mobile networks of varying quality, the restaurant application needs a dependable, always-on view of incoming orders during service hours, and the driver application needs reliable location handling and offline tolerance for patchy connectivity. A shared backend needed to serve all three without becoming a bottleneck for any of them.
Approach
The order lifecycle was modelled as a single state machine shared across all three applications, with clearly defined transitions (placed, accepted, preparing, ready, picked up, delivered, cancelled) and explicit rules for which role can trigger which transition. Each application subscribes to the subset of state relevant to its users rather than duplicating the logic locally.
Shared TypeScript types and validation schemas are used across the customer, restaurant, and driver codebases so that a change to the order model is enforced at compile time across all three, rather than discovered at runtime in production.
Solution architecture
The platform is structured as three React Native and web applications sharing a common API layer and type definitions, backed by a PostgreSQL data model built around the order state machine. Real-time order status updates are pushed to all three applications so that a restaurant marking an order ready is reflected immediately for both the customer and the assigned driver.
- Next.js
- React Native
- TypeScript
- PostgreSQL
- Node.js
Outcome
Architecture milestone
Shared order model adopted across all three applications
In development
Core services running in a private test environment