Bali Laundry Platform - Technical Architecture

Layer Technology Notes
Frontend (Customer) React Native / Flutter Cross-platform mobile app
Frontend (Admin) React / Next.js Web-based back office
Frontend (Courier) React Native / Flutter Mobile-first courier app
Backend Node.js / Python REST + WebSocket APIs
Database PostgreSQL Primary data store
Cache Redis Sessions, real-time data
File Storage S3 / Cloudflare R2 Photo uploads, receipts
Hosting AWS / GCP / Vercel Cloud infrastructure
CI/CD GitHub Actions Automated deployments

External Integrations

Authentication & Identity

Service Purpose Priority
Google OAuth Tourist sign-up P0
SendGrid / SES Email authentication, notifications P0

Payments

Service Purpose Priority
Midtrans / Xendit IDR payment gateway (Indonesian Rupiah only) P0
QRIS Indonesian QR payment standard (IDR only) P1
GoPay, OVO E-wallet integration (IDR only) P1

Note: All payments are processed exclusively in IDR (Indonesian Rupiah). This is mandatory for compliance with Indonesian financial regulations. Only IDR-based payment methods are supported. Multi-currency support and foreign currency processing are not available due to regulatory requirements in Indonesia.

Communication

Service Purpose Priority
Firebase Cloud Messaging Push notifications P0
SendGrid / SES Email notifications P0
WebSocket (Socket.io) Real-time chat P0

AI & Translation

Service Purpose Priority
OpenAI / Claude API FAQ bot, auto-reply P0
Google Translate / DeepL Multi-language translation P0

Maps & Location

Service Purpose Priority
Google Maps API Zone visualization, navigation (Jimbaran & Uluwatu focus) P0
Mapbox Alternative mapping P1

Analytics

Service Purpose Priority
Mixpanel / Amplitude Product analytics P1
Metabase / Superset Business intelligence P1

System Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        CLIENT APPS                               │
├─────────────────┬─────────────────┬─────────────────────────────┤
│  Customer App   │   Courier App   │      Admin Dashboard        │
│  (Mobile)       │   (Mobile)      │      (Web)                  │
└────────┬────────┴────────┬────────┴──────────────┬──────────────┘
         │                 │                       │
         └─────────────────┼───────────────────────┘
                           │
                    ┌──────▼──────┐
                    │   API GW    │
                    │  (REST/WS)  │
                    └──────┬──────┘
                           │
         ┌─────────────────┼─────────────────┐
         │                 │                 │
    ┌────▼────┐      ┌─────▼─────┐     ┌─────▼─────┐
    │  Auth   │      │  Orders   │     │   Chat    │
    │ Service │      │  Service  │     │  Service  │
    └────┬────┘      └─────┬─────┘     └─────┬─────┘
         │                 │                 │
         └─────────────────┼─────────────────┘
                           │
                    ┌──────▼──────┐
                    │  PostgreSQL │
                    │   + Redis   │
                    └─────────────┘

Core Data Entities

Users & Roles

Orders

Services & Pricing

Logistics

Payments

All payment processing is exclusively in IDR (Indonesian Rupiah) to comply with Indonesian financial regulations. Only IDR is accepted as currency due to regulatory requirements in Indonesia.

Communication

Agents


API Structure

Public APIs (Customer App)

``` POST /auth/register POST /auth/login POST /auth/verify-email

GET /services GET /zones (returns Jimbaran & Uluwatu coverage in Phase 1) GET /time-slots

POST /orders GET /orders/:id GET /orders/:id/tracking POST /orders/:id/cancel

GET /wallet/balance (returns IDR amount only - Indonesian regulatory requirement) POST /wallet/topup (IDR only - required by Indonesian financial regulations)

POST /payments/idr (IDR payment processing only - mandatory for Indonesian regulatory compliance)