# suthankan1/swiftdrop architecture

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

- Interactive diagram: https://gitdiagram.com/suthankan1/swiftdrop
- Repository: https://github.com/suthankan1/swiftdrop

## Overview

SwiftDrop is a role-aware parcel-delivery platform: customers and merchants quote or submit bookings, operations staff assign parcels, couriers progress delivery and record proof, and users track outcomes while administrators oversee partners, pricing, and reports. The React SPA reaches independently authorized services through an API Gateway; pricing, accounts, delivery, and communications own distinct capabilities, with GraphQL for read-only dashboards and Kafka/gRPC/SSE supporting integration. The README documents these platform links; sampled source confirms selected enrollment, parcel-query, and webhook behavior, not every service connection.

Main entry points: [`frontend/src/app/App.tsx`](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/app/App.tsx) (React SPA), [`services/delivery-service/src/main/java/com/swiftdrop/deliveryservice/booking/ParcelBookingService.java`](https://github.com/suthankan1/swiftdrop/blob/main/services/delivery-service/src/main/java/com/swiftdrop/deliveryservice/booking/ParcelBookingService.java) (Delivery operations), [`frontend/src/features/admin/pages/AdminPage.tsx`](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/admin/pages/AdminPage.tsx) (Administration), [`contracts/grpc/swiftdrop/delivery/v1/delivery.proto`](https://github.com/suthankan1/swiftdrop/blob/main/contracts/grpc/swiftdrop/delivery/v1/delivery.proto) (Internal gRPC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Role-based experience"]
  node_spa["React SPA<br/>[App.tsx]"]
  node_customer["Customer flows"]
  node_merchant["Merchant workspace"]
  node_courier["Courier operations<br/>[CourierPage.tsx]"]
  node_dispatcher["Dispatch operations<br/>[DispatcherPage.tsx]"]
  node_admin["Administration<br/>[AdminPage.tsx]"]
  node_public_tracking["Public tracking"]
  node_ai["AI assistant"]
end

subgraph group_edge_identity["Edge and identity"]
  node_gateway["API Gateway"]
  node_identity["Keycloak identity"]
end

subgraph group_domain_services["Business services"]
  node_accounts["Accounts and partners"]
  node_pricing["Pricing and zones"]
  node_delivery["Delivery operations"]
end

subgraph group_read_integration["Read and integration"]
  node_graphql["Read-only GraphQL"]
  node_grpc["Internal gRPC<br/>[delivery.proto]"]
  node_sse["Tracking streams"]
end

subgraph group_messaging["Events and messaging"]
  node_kafka["Kafka events"]
  node_communications["Communications"]
  node_webhook["Merchant webhooks"]
end

node_users(("Platform users"))
node_external_merchants(("Merchant systems"))

node_users -->|"use"| node_spa
node_spa -->|"send requests"| node_gateway
node_spa -->|"authenticate"| node_identity
node_spa -->|"routes to"| node_customer
node_spa -->|"routes to"| node_merchant
node_spa -->|"routes to"| node_courier
node_spa -->|"routes to"| node_dispatcher
node_spa -->|"routes to"| node_admin
node_spa -->|"routes to"| node_public_tracking
node_customer -->|"request quotes"| node_pricing
node_customer -->|"book parcels"| node_delivery
node_merchant -->|"enroll tenant"| node_accounts
node_merchant -->|"submit orders"| node_delivery
node_courier -->|"progress delivery"| node_delivery
node_dispatcher -->|"assign parcels"| node_delivery
node_admin -->|"manage partners"| node_accounts
node_admin -->|"configure rates"| node_pricing
node_admin -->|"view reports"| node_graphql
node_public_tracking -->|"request tracking"| node_delivery
node_delivery -->|"publish updates"| node_sse
node_graphql -->|"compose reads"| node_grpc
node_grpc -->|"read account data"| node_accounts
node_grpc -->|"read pricing data"| node_pricing
node_grpc -->|"read parcel data"| node_delivery
node_delivery -->|"publish lifecycle events"| node_kafka
node_kafka -->|"dispatch events"| node_communications
node_communications -->|"schedule delivery"| node_webhook
node_webhook -->|"send signed status"| node_external_merchants
node_spa -.->|"use assistant"| node_ai

click node_spa "https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/app/App.tsx"
click node_customer "https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/customer/pages/CustomerQuotePage.tsx"
click node_merchant "https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/merchant/components/MerchantWorkspace.tsx"
click node_courier "https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/courier/pages/CourierPage.tsx"
click node_dispatcher "https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/dispatcher/pages/DispatcherPage.tsx"
click node_admin "https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/admin/pages/AdminPage.tsx"
click node_public_tracking "https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/public/PublicTrackingPage.tsx"
click node_ai "https://github.com/suthankan1/swiftdrop/blob/main/ai-assistant/src/main/java/com/swiftdrop/assistant/AssistantService.java"
click node_gateway "https://github.com/suthankan1/swiftdrop/blob/main/services/api-gateway/src/main/java/com/swiftdrop/apigateway/config/GatewayRoutesConfig.java"
click node_accounts "https://github.com/suthankan1/swiftdrop/blob/main/services/accounts-service/src/main/java/com/swiftdrop/accountsservice/merchant/MerchantEnrollmentService.java"
click node_pricing "https://github.com/suthankan1/swiftdrop/blob/main/services/pricing-service/src/main/java/com/swiftdrop/pricing/application/RateVersionQueryService.java"
click node_delivery "https://github.com/suthankan1/swiftdrop/blob/main/services/delivery-service/src/main/java/com/swiftdrop/deliveryservice/booking/ParcelBookingService.java"
click node_graphql "https://github.com/suthankan1/swiftdrop/blob/main/services/graphql-query-service/src/main/java/com/swiftdrop/graphql/resolver/RootQueryResolver.java"
click node_grpc "https://github.com/suthankan1/swiftdrop/blob/main/contracts/grpc/swiftdrop/delivery/v1/delivery.proto"
click node_sse "https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/customer/api/trackingStreamClient.ts"
click node_communications "https://github.com/suthankan1/swiftdrop/blob/main/services/communications-service/src/main/java/com/swiftdrop/communicationsservice/notification/delivery/NotificationExecutionService.java"
click node_webhook "https://github.com/suthankan1/swiftdrop/blob/main/services/communications-service/src/main/java/com/swiftdrop/communicationsservice/webhook/delivery/WebhookDeliveryExecutionService.java"

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_spa,node_customer,node_merchant,node_courier,node_dispatcher,node_admin,node_public_tracking,node_ai,node_users toneBlue
class node_gateway,node_identity toneAmber
class node_accounts,node_pricing,node_delivery toneMint
class node_graphql,node_grpc,node_sse toneRose
class node_kafka,node_communications,node_webhook,node_external_merchants toneIndigo
```

## Components

### Role-based experience

- [React SPA](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Customer flows](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/customer/pages/CustomerQuotePage.tsx): `frontend/src/features/customer/pages/CustomerQuotePage.tsx`
- [Merchant workspace](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/merchant/components/MerchantWorkspace.tsx): `frontend/src/features/merchant/components/MerchantWorkspace.tsx`
- [Courier operations](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/courier/pages/CourierPage.tsx): `frontend/src/features/courier/pages/CourierPage.tsx`
- [Dispatch operations](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/dispatcher/pages/DispatcherPage.tsx): `frontend/src/features/dispatcher/pages/DispatcherPage.tsx`
- [Administration](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/admin/pages/AdminPage.tsx): `frontend/src/features/admin/pages/AdminPage.tsx`
- [Public tracking](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/public/PublicTrackingPage.tsx): `frontend/src/features/public/PublicTrackingPage.tsx`
- [AI assistant](https://github.com/suthankan1/swiftdrop/blob/main/ai-assistant/src/main/java/com/swiftdrop/assistant/AssistantService.java): `ai-assistant/src/main/java/com/swiftdrop/assistant/AssistantService.java`

### Edge and identity

- [API Gateway](https://github.com/suthankan1/swiftdrop/blob/main/services/api-gateway/src/main/java/com/swiftdrop/apigateway/config/GatewayRoutesConfig.java): `services/api-gateway/src/main/java/com/swiftdrop/apigateway/config/GatewayRoutesConfig.java`
- **Keycloak identity**

### Business services

- [Accounts and partners](https://github.com/suthankan1/swiftdrop/blob/main/services/accounts-service/src/main/java/com/swiftdrop/accountsservice/merchant/MerchantEnrollmentService.java): `services/accounts-service/src/main/java/com/swiftdrop/accountsservice/merchant/MerchantEnrollmentService.java`
- [Pricing and zones](https://github.com/suthankan1/swiftdrop/blob/main/services/pricing-service/src/main/java/com/swiftdrop/pricing/application/RateVersionQueryService.java): `services/pricing-service/src/main/java/com/swiftdrop/pricing/application/RateVersionQueryService.java`
- [Delivery operations](https://github.com/suthankan1/swiftdrop/blob/main/services/delivery-service/src/main/java/com/swiftdrop/deliveryservice/booking/ParcelBookingService.java): `services/delivery-service/src/main/java/com/swiftdrop/deliveryservice/booking/ParcelBookingService.java`

### Read and integration

- [Read-only GraphQL](https://github.com/suthankan1/swiftdrop/blob/main/services/graphql-query-service/src/main/java/com/swiftdrop/graphql/resolver/RootQueryResolver.java): `services/graphql-query-service/src/main/java/com/swiftdrop/graphql/resolver/RootQueryResolver.java`
- [Internal gRPC](https://github.com/suthankan1/swiftdrop/blob/main/contracts/grpc/swiftdrop/delivery/v1/delivery.proto): `contracts/grpc/swiftdrop/delivery/v1/delivery.proto`
- [Tracking streams](https://github.com/suthankan1/swiftdrop/blob/main/frontend/src/features/customer/api/trackingStreamClient.ts): `frontend/src/features/customer/api/trackingStreamClient.ts`

### Events and messaging

- **Kafka events**
- [Communications](https://github.com/suthankan1/swiftdrop/blob/main/services/communications-service/src/main/java/com/swiftdrop/communicationsservice/notification/delivery/NotificationExecutionService.java): `services/communications-service/src/main/java/com/swiftdrop/communicationsservice/notification/delivery/NotificationExecutionService.java`
- [Merchant webhooks](https://github.com/suthankan1/swiftdrop/blob/main/services/communications-service/src/main/java/com/swiftdrop/communicationsservice/webhook/delivery/WebhookDeliveryExecutionService.java): `services/communications-service/src/main/java/com/swiftdrop/communicationsservice/webhook/delivery/WebhookDeliveryExecutionService.java`

### Other components

- **Platform users**
- **Merchant systems**

## Connections

- Platform users → React SPA: use (evidence: `README.md`)
- React SPA → API Gateway: send requests (evidence: `README.md`)
- React SPA → Keycloak identity: authenticate (evidence: `README.md`)
- React SPA → Customer flows: routes to
- React SPA → Merchant workspace: routes to
- React SPA → Courier operations: routes to
- React SPA → Dispatch operations: routes to
- React SPA → Administration: routes to
- React SPA → Public tracking: routes to
- Customer flows → Pricing and zones: request quotes (evidence: `README.md`)
- Customer flows → Delivery operations: book parcels (evidence: `README.md`)
- Merchant workspace → Accounts and partners: enroll tenant (evidence: `services/accounts-service/src/main/java/com/swiftdrop/accountsservice/merchant/MerchantEnrollmentService.java`)
- Merchant workspace → Delivery operations: submit orders (evidence: `README.md`)
- Courier operations → Delivery operations: progress delivery (evidence: `README.md`)
- Dispatch operations → Delivery operations: assign parcels (evidence: `README.md`)
- Administration → Accounts and partners: manage partners (evidence: `README.md`)
- Administration → Pricing and zones: configure rates (evidence: `README.md`)
- Administration → Read-only GraphQL: view reports (evidence: `README.md`)
- Public tracking → Delivery operations: request tracking (evidence: `README.md`)
- Delivery operations → Tracking streams: publish updates (evidence: `README.md`)
- Read-only GraphQL → Internal gRPC: compose reads (evidence: `README.md`)
- Internal gRPC → Accounts and partners: read account data (evidence: `README.md`)
- Internal gRPC → Pricing and zones: read pricing data (evidence: `README.md`)
- Internal gRPC → Delivery operations: read parcel data (evidence: `README.md`)
- Delivery operations → Kafka events: publish lifecycle events (evidence: `README.md`)
- Kafka events → Communications: dispatch events (evidence: `README.md`)
- Communications → Merchant webhooks: schedule delivery (evidence: `README.md`)
- Merchant webhooks → Merchant systems: send signed status (evidence: `README.md`)
- React SPA → AI assistant: use assistant
