# barikalla98/wassali-app architecture

> Architecture diagram of the GitHub repository barikalla98/wassali-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/barikalla98/wassali-app
- Repository: https://github.com/barikalla98/wassali-app

## Overview

Wassali is a Mauritanian food-and-goods delivery platform spanning customer, driver, merchant, and administration experiences, with a NestJS backend as the source of truth. The main journey is customer sign-in and address selection, merchant discovery and order placement, driver assignment and delivery tracking, then local-wallet payment and financial settlement. The README documents these capabilities and the major backend domains; most client and domain implementation files were not sampled, so client-to-backend links are shown as unverified rather than asserting detailed call paths.

Main entry points: [`apps/api/src/http-app.ts`](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/http-app.ts) (Backend API), [`apps/customer_app`](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/customer_app) (Customer app), [`apps/driver_app`](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/driver_app) (Driver app), [`apps/merchant_app`](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/merchant_app) (Merchant app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User applications"]
  node_customer["Customer app"]
  node_driver["Driver app"]
  node_merchant["Merchant app"]
  node_admin["Admin dashboard<br/>[page.tsx]"]
  node_landing["Public website<br/>[page.tsx]"]
  node_gateway["Wallet SMS gateway<br/>[ForwardWorker.kt]"]
end

subgraph group_commerce["Commerce and delivery"]
  node_geo["Cities and addresses"]
  node_catalog["Stores and menus"]
  node_ordering["Order lifecycle"]
  node_dispatch["Driver dispatch"]
  node_drivers["Driver onboarding"]
end

subgraph group_money["Payments and finance"]
  node_payments["Transfer payments"]
  node_wallets["Wallets and payouts"]
  node_ledger["Financial ledger"]
end

subgraph group_platform["Platform services"]
  node_api["Backend API<br/>[http-app.ts]"]
  node_identity["Identity and access"]
  node_audit["Audit log<br/>[audit.service.ts]"]
  node_settings["Platform settings"]
end

subgraph group_infrastructure["Runtime infrastructure"]
  node_database[("PostgreSQL data<br/>[database.module.ts]")]
  node_realtime["Realtime updates"]
  node_storage["Media storage"]
end

node_customer_actor(("Customer"))
node_driver_actor(("Driver"))
node_merchant_actor(("Merchant staff"))
node_admin_actor(("Administrator"))
node_sms_service["SMS and WhatsApp"]

node_customer_actor -->|"uses"| node_customer
node_driver_actor -->|"uses"| node_driver
node_merchant_actor -->|"uses"| node_merchant
node_admin_actor -->|"uses"| node_admin
node_customer -.->|"requests data"| node_api
node_driver -.->|"requests data"| node_api
node_merchant -.->|"requests data"| node_api
node_admin -.->|"manages platform"| node_api
node_api -.->|"provides auth"| node_identity
node_api -.->|"serves locations"| node_geo
node_api -.->|"serves stores"| node_catalog
node_api -.->|"handles orders"| node_ordering
node_api -.->|"coordinates delivery"| node_dispatch
node_api -.->|"manages onboarding"| node_drivers
node_api -.->|"verifies transfers"| node_payments
node_api -.->|"manages payouts"| node_wallets
node_api -.->|"records actions"| node_audit
node_api -.->|"loads settings"| node_settings
node_api -->|"reads and writes"| node_database
node_api -.->|"publishes updates"| node_realtime
node_api -.->|"stores media"| node_storage
node_identity -.->|"sends login codes"| node_sms_service
node_payments -.->|"receives transfer messages"| node_gateway
node_wallets -.->|"uses postings"| node_ledger
node_landing -.->|"informs"| node_customer_actor

click node_customer "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/customer_app"
click node_driver "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/driver_app"
click node_merchant "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/merchant_app"
click node_admin "https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/admin-web/src/app/(app)/page.tsx"
click node_landing "https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/landing-web/src/components/page.tsx"
click node_gateway "https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/gateway_android/app/src/main/kotlin/mr/wassali/gateway/ForwardWorker.kt"
click node_api "https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/http-app.ts"
click node_identity "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/identity"
click node_geo "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/geo"
click node_catalog "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/catalog"
click node_ordering "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/ordering"
click node_dispatch "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/dispatch"
click node_drivers "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/drivers"
click node_payments "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/payments"
click node_wallets "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/wallets"
click node_ledger "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/ledger"
click node_audit "https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/audit/audit.service.ts"
click node_settings "https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/platform-config/settings.service.ts"
click node_database "https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/infrastructure/database/database.module.ts"
click node_realtime "https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/realtime"
click node_storage "https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/infrastructure/storage/storage.provider.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_customer,node_driver,node_merchant,node_admin,node_landing,node_gateway toneBlue
class node_geo,node_catalog,node_ordering,node_dispatch,node_drivers toneAmber
class node_payments,node_wallets,node_ledger toneMint
class node_api,node_identity,node_audit,node_settings toneRose
class node_database,node_realtime,node_storage,node_customer_actor,node_driver_actor,node_merchant_actor,node_admin_actor,node_sms_service toneIndigo
```

## Components

### User applications

- [Customer app](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/customer_app): `apps/customer_app`
- [Driver app](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/driver_app): `apps/driver_app`
- [Merchant app](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/merchant_app): `apps/merchant_app`
- [Admin dashboard](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/admin-web/src/app/(app)/page.tsx): `apps/admin-web/src/app/(app)/page.tsx`
- [Public website](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/landing-web/src/components/page.tsx): `apps/landing-web/src/components/page.tsx`
- [Wallet SMS gateway](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/gateway_android/app/src/main/kotlin/mr/wassali/gateway/ForwardWorker.kt): `apps/gateway_android/app/src/main/kotlin/mr/wassali/gateway/ForwardWorker.kt`

### Commerce and delivery

- [Cities and addresses](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/geo): `apps/api/src/modules/geo`
- [Stores and menus](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/catalog): `apps/api/src/modules/catalog`
- [Order lifecycle](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/ordering): `apps/api/src/modules/ordering`
- [Driver dispatch](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/dispatch): `apps/api/src/modules/dispatch`
- [Driver onboarding](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/drivers): `apps/api/src/modules/drivers`

### Payments and finance

- [Transfer payments](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/payments): `apps/api/src/modules/payments`
- [Wallets and payouts](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/wallets): `apps/api/src/modules/wallets`
- [Financial ledger](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/ledger): `apps/api/src/modules/ledger`

### Platform services

- [Backend API](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/http-app.ts): `apps/api/src/http-app.ts`
- [Identity and access](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/identity): `apps/api/src/modules/identity`
- [Audit log](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/audit/audit.service.ts): `apps/api/src/modules/audit/audit.service.ts`
- [Platform settings](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/platform-config/settings.service.ts): `apps/api/src/modules/platform-config/settings.service.ts`

### Runtime infrastructure

- [PostgreSQL data](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/infrastructure/database/database.module.ts): `apps/api/src/infrastructure/database/database.module.ts`
- [Realtime updates](https://github.com/barikalla98/wassali-app/tree/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/modules/realtime): `apps/api/src/modules/realtime`
- [Media storage](https://github.com/barikalla98/wassali-app/blob/claude/mauritania-food-delivery-platform-u670rh/apps/api/src/infrastructure/storage/storage.provider.ts): `apps/api/src/infrastructure/storage/storage.provider.ts`

### Other components

- **Customer**
- **Driver**
- **Merchant staff**
- **Administrator**
- **SMS and WhatsApp**

## Connections

- Customer → Customer app: uses
- Driver → Driver app: uses
- Merchant staff → Merchant app: uses
- Administrator → Admin dashboard: uses
- Customer app → Backend API: requests data
- Driver app → Backend API: requests data
- Merchant app → Backend API: requests data
- Admin dashboard → Backend API: manages platform
- Backend API → Identity and access: provides auth
- Backend API → Cities and addresses: serves locations
- Backend API → Stores and menus: serves stores
- Backend API → Order lifecycle: handles orders
- Backend API → Driver dispatch: coordinates delivery
- Backend API → Driver onboarding: manages onboarding
- Backend API → Transfer payments: verifies transfers
- Backend API → Wallets and payouts: manages payouts
- Backend API → Audit log: records actions
- Backend API → Platform settings: loads settings
- Backend API → PostgreSQL data: reads and writes (evidence: `apps/api/src/infrastructure/database/database.module.ts`)
- Backend API → Realtime updates: publishes updates
- Backend API → Media storage: stores media
- Identity and access → SMS and WhatsApp: sends login codes
- Transfer payments → Wallet SMS gateway: receives transfer messages
- Wallets and payouts → Financial ledger: uses postings (evidence: `apps/api/src/modules/wallets/application/wallet-query.service.ts`)
- Public website → Customer: informs
