How thechance101/beep-beep works
Project type and purpose
• This is a full‐stack, multi‐module Kotlin project showcasing a food delivery + taxi platform.
• It consists of:
– Six Compose Multiplatform front-end apps (End-User, Restaurant Admin, Delivery, Taxi Driver, Dashboard, Support)
– A shared design_system library (UI components + themes)
– A Kotlin/ Ktor-based API Gateway
– Six Ktor microservices (Identity, Restaurant, Taxi, Location, Notification, Chat)
– Local persistence on mobile via Realm and remote messaging via Firebase Cloud Messaging
High-level architecture
[Front-end Layer]
• Apps (mobile and desktop) built with Compose MP
• Consume APIs through a single API Gateway
• Share UI & domain logic via KMP “common” modules and design_system
[Integration Layer]
• API Gateway (Ktor + Koin)
– Authentication, routing, security, serialization, websockets support
– Forwards HTTP/WS calls to dedicated microservices
[Microservices Layer]
• Identity Service
• Restaurant Service
• Taxi Service
• Location Service
• Notification Service
• Chat Service
Each service:
– Exposes REST endpoints and/or WebSocket routes
– Has its own database container (e.g., Realm, Mongo, SQL—encapsulated in DataBaseContainer)
– Implements DI (Koin), domain/use-case layers, data/gateway layers, endpoint plugins
[External Services]
• Firebase Cloud Messaging for push notifications
• APIs (via HTTP gateways in shared modules)
Main components
– Shared libraries (design_system, common KMP modules)
– API Gateway
Relationships and data flow
a. Front-end → API Gateway (HTTP or WS)
b. API Gateway → respective microservices (HTTP or WS)
c. Microservices → their databases (persistent storage)
d. Notification Service ↔ Firebase Messaging (push tokens, topics)
e. Location & Chat & Restaurant (order updates) via WebSocket bidirectional channels
Key architectural patterns & principles
• Microservices behind an API Gateway pattern
• Single Responsibility per service (domain/use-case separation)
• Shared KMP modules for code reuse across front-ends
• WebSocket for real-time features (chat, live location, order streams)
• Dependency Injection (Koin) and plugin-based configuration (Ktor plugins)
• Local caching/persistence on clients (Realm) and paging libraries
Detailed element checklist
– Component labels (apps, gateway, services, DBs, external)
• UI → Gateway (HTTP/WS)
• Gateway → Service (HTTP/WS)
• Service → DB (read/write)
• Notification Service ↔ Firebase
– Optional: group services by domain (Identity, Restaurant, Taxi, etc.)