# nirukshith/swiftdrop architecture

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

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

## Overview

SwiftDrop is a parcel-delivery and courier-management platform: users enter through the Angular client, authenticate, create or manage shipments, and follow delivery through dispatch and tracking. Separate Spring Boot services handle identity, parcel lifecycle, operations, and merchant-facing integrations; Kafka supports event-driven coordination and notifications. The graph preserves the documented merchant, admin, assistant, webhook, reporting, and courier capabilities. Some service internals and cross-service wiring are unsampled, so those connections are shown only where the README or excerpts support them.

Main entry points: [`frontend/projects/web/src/app/app.routes.ts`](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/app.routes.ts) (Angular application), [`services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/Parcel.java`](https://github.com/nirukshith/swiftdrop/blob/development/services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/Parcel.java) (Parcel lifecycle), [`services/auth-service/src/main/java/com/swiftdrop/auth/AuthController.java`](https://github.com/nirukshith/swiftdrop/blob/development/services/auth-service/src/main/java/com/swiftdrop/auth/AuthController.java) (Auth service), [`services/operations-service/src/main/java/com/swiftdrop/operations/dispatch/DispatchService.java`](https://github.com/nirukshith/swiftdrop/blob/development/services/operations-service/src/main/java/com/swiftdrop/operations/dispatch/DispatchService.java) (Dispatch and pricing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web["Angular application<br/>[app.routes.ts]"]
  node_authui["Auth client<br/>[auth.service.ts]"]
  node_customerui["Customer portal"]
  node_merchantui["Merchant portal"]
  node_courierui["Courier portal"]
  node_dispatchui["Dispatch portal"]
  node_adminui["Admin portal"]
  node_trackingui["Tracking view<br/>[track.component.ts]"]
end

subgraph group_identity["Identity"]
  node_authsvc["Auth service"]
  node_audit[("Audit records<br/>[AuditService.java]")]
end

subgraph group_delivery["Delivery operations"]
  node_parcel[("Parcel lifecycle<br/>[Parcel.java]")]
  node_parcelquery["Parcel queries"]
  node_operations["Dispatch and pricing"]
  node_navigation["Courier routing"]
  node_reports["Delivery reports<br/>[ReportService.java]"]
end

subgraph group_integrations["Integrations"]
  node_merchantorders["Merchant orders"]
  node_assistant["Delivery assistant"]
  node_notifications["Notifications"]
  node_webhooks["Merchant webhooks"]
end

node_customer(("Customer"))
node_merchant(("Merchant"))
node_staff(("Operations staff"))
node_kafka["Kafka"]
node_postgres[("PostgreSQL")]
node_osrm["OSRM routing"]
node_mail["Mail service"]

node_customer -->|"uses"| node_web
node_merchant -->|"uses"| node_web
node_staff -->|"uses"| node_web
node_web -->|"uses"| node_authui
node_web -->|"routes to"| node_customerui
node_web -->|"routes to"| node_merchantui
node_web -->|"routes to"| node_courierui
node_web -->|"routes to"| node_dispatchui
node_web -->|"routes to"| node_adminui
node_web -->|"routes to"| node_trackingui
node_authui -.->|"authenticates with"| node_authsvc
node_authsvc -->|"reads and writes"| node_postgres
node_authsvc -.->|"records actions"| node_audit
node_adminui -.->|"manages users"| node_authsvc
node_authsvc -.->|"sends provisioning mail"| node_mail
node_customerui -.->|"creates parcels"| node_parcel
node_merchantui -.->|"places orders"| node_merchantorders
node_merchantorders -.->|"requests creation"| node_parcel
node_merchantorders -.->|"stores order state"| node_postgres
node_dispatchui -.->|"assigns parcels"| node_operations
node_operations -->|"assigns courier"| node_parcel
node_courierui -.->|"updates delivery"| node_parcel
node_trackingui -.->|"looks up status"| node_parcelquery
node_parcelquery -->|"reads parcels"| node_parcel
node_operations -.->|"requests routes"| node_navigation
node_navigation -->|"gets route"| node_osrm
node_operations -.->|"views reports"| node_reports
node_parcel -->|"publishes lifecycle events"| node_kafka
node_kafka -->|"delivers events"| node_notifications
node_kafka -->|"delivers events"| node_reports
node_kafka -.->|"delivers events"| node_webhooks
node_notifications -.->|"sends email"| node_mail
node_customerui -.->|"asks questions"| node_assistant
node_assistant -.->|"queries parcel data"| node_parcelquery
node_merchantui -.->|"configures callbacks"| node_webhooks

click node_web "https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/app.routes.ts"
click node_authui "https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/shared-auth/src/lib/services/auth.service.ts"
click node_customerui "https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/customer.component.ts"
click node_merchantui "https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/merchant/merchant-portal.component.ts"
click node_courierui "https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/courier.component.ts"
click node_dispatchui "https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/dispatch/dispatch.component.ts"
click node_adminui "https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/admin/admin-users.component.ts"
click node_trackingui "https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/track.component.ts"
click node_authsvc "https://github.com/nirukshith/swiftdrop/blob/development/services/auth-service/src/main/java/com/swiftdrop/auth/AuthController.java"
click node_audit "https://github.com/nirukshith/swiftdrop/blob/development/services/auth-service/src/main/java/com/swiftdrop/auth/audit/AuditService.java"
click node_parcel "https://github.com/nirukshith/swiftdrop/blob/development/services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/Parcel.java"
click node_parcelquery "https://github.com/nirukshith/swiftdrop/blob/development/services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/ParcelQueryServiceImpl.java"
click node_operations "https://github.com/nirukshith/swiftdrop/blob/development/services/operations-service/src/main/java/com/swiftdrop/operations/dispatch/DispatchService.java"
click node_navigation "https://github.com/nirukshith/swiftdrop/blob/development/services/operations-service/src/main/java/com/swiftdrop/operations/navigation/NavigationRouteService.java"
click node_reports "https://github.com/nirukshith/swiftdrop/blob/development/services/operations-service/src/main/java/com/swiftdrop/operations/reports/ReportService.java"
click node_merchantorders "https://github.com/nirukshith/swiftdrop/blob/development/services/integration-service/src/main/java/com/swiftdrop/integration/merchant/MerchantOrderService.java"
click node_assistant "https://github.com/nirukshith/swiftdrop/blob/development/services/integration-service/src/main/java/com/swiftdrop/integration/assistant/service/AssistantService.java"
click node_notifications "https://github.com/nirukshith/swiftdrop/blob/development/services/integration-service/src/main/java/com/swiftdrop/integration/notification/service/NotificationService.java"
click node_webhooks "https://github.com/nirukshith/swiftdrop/blob/development/services/integration-service/src/main/java/com/swiftdrop/integration/webhook/WebhookService.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_web,node_authui,node_customerui,node_merchantui,node_courierui,node_dispatchui,node_adminui,node_trackingui toneBlue
class node_authsvc,node_audit,node_postgres toneAmber
class node_parcel,node_parcelquery,node_operations,node_navigation,node_reports toneMint
class node_merchantorders,node_assistant,node_notifications,node_webhooks toneRose
class node_customer,node_merchant,node_staff,node_kafka,node_osrm,node_mail toneIndigo
```

## Components

### Web client

- [Angular application](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/app.routes.ts): `frontend/projects/web/src/app/app.routes.ts`
- [Auth client](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/shared-auth/src/lib/services/auth.service.ts): `frontend/projects/shared-auth/src/lib/services/auth.service.ts`
- [Customer portal](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/customer.component.ts): `frontend/projects/web/src/app/pages/customer.component.ts`
- [Merchant portal](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/merchant/merchant-portal.component.ts): `frontend/projects/web/src/app/pages/merchant/merchant-portal.component.ts`
- [Courier portal](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/courier.component.ts): `frontend/projects/web/src/app/pages/courier.component.ts`
- [Dispatch portal](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/dispatch/dispatch.component.ts): `frontend/projects/web/src/app/pages/dispatch/dispatch.component.ts`
- [Admin portal](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/admin/admin-users.component.ts): `frontend/projects/web/src/app/pages/admin/admin-users.component.ts`
- [Tracking view](https://github.com/nirukshith/swiftdrop/blob/development/frontend/projects/web/src/app/pages/track.component.ts): `frontend/projects/web/src/app/pages/track.component.ts`

### Identity

- [Auth service](https://github.com/nirukshith/swiftdrop/blob/development/services/auth-service/src/main/java/com/swiftdrop/auth/AuthController.java): `services/auth-service/src/main/java/com/swiftdrop/auth/AuthController.java`
- [Audit records](https://github.com/nirukshith/swiftdrop/blob/development/services/auth-service/src/main/java/com/swiftdrop/auth/audit/AuditService.java): `services/auth-service/src/main/java/com/swiftdrop/auth/audit/AuditService.java`

### Delivery operations

- [Parcel lifecycle](https://github.com/nirukshith/swiftdrop/blob/development/services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/Parcel.java): `services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/Parcel.java`
- [Parcel queries](https://github.com/nirukshith/swiftdrop/blob/development/services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/ParcelQueryServiceImpl.java): `services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/ParcelQueryServiceImpl.java`
- [Dispatch and pricing](https://github.com/nirukshith/swiftdrop/blob/development/services/operations-service/src/main/java/com/swiftdrop/operations/dispatch/DispatchService.java): `services/operations-service/src/main/java/com/swiftdrop/operations/dispatch/DispatchService.java`
- [Courier routing](https://github.com/nirukshith/swiftdrop/blob/development/services/operations-service/src/main/java/com/swiftdrop/operations/navigation/NavigationRouteService.java): `services/operations-service/src/main/java/com/swiftdrop/operations/navigation/NavigationRouteService.java`
- [Delivery reports](https://github.com/nirukshith/swiftdrop/blob/development/services/operations-service/src/main/java/com/swiftdrop/operations/reports/ReportService.java): `services/operations-service/src/main/java/com/swiftdrop/operations/reports/ReportService.java`

### Integrations

- [Merchant orders](https://github.com/nirukshith/swiftdrop/blob/development/services/integration-service/src/main/java/com/swiftdrop/integration/merchant/MerchantOrderService.java): `services/integration-service/src/main/java/com/swiftdrop/integration/merchant/MerchantOrderService.java`
- [Delivery assistant](https://github.com/nirukshith/swiftdrop/blob/development/services/integration-service/src/main/java/com/swiftdrop/integration/assistant/service/AssistantService.java): `services/integration-service/src/main/java/com/swiftdrop/integration/assistant/service/AssistantService.java`
- [Notifications](https://github.com/nirukshith/swiftdrop/blob/development/services/integration-service/src/main/java/com/swiftdrop/integration/notification/service/NotificationService.java): `services/integration-service/src/main/java/com/swiftdrop/integration/notification/service/NotificationService.java`
- [Merchant webhooks](https://github.com/nirukshith/swiftdrop/blob/development/services/integration-service/src/main/java/com/swiftdrop/integration/webhook/WebhookService.java): `services/integration-service/src/main/java/com/swiftdrop/integration/webhook/WebhookService.java`

### Other components

- **Customer**
- **Merchant**
- **Operations staff**
- **Kafka**
- **PostgreSQL**
- **OSRM routing**
- **Mail service**

## Connections

- Customer → Angular application: uses (evidence: `README.md`)
- Merchant → Angular application: uses (evidence: `README.md`)
- Operations staff → Angular application: uses (evidence: `README.md`)
- Angular application → Auth client: uses (evidence: `frontend/projects/web/src/app/app.routes.ts`)
- Angular application → Customer portal: routes to (evidence: `frontend/projects/web/src/app/app.routes.ts`)
- Angular application → Merchant portal: routes to (evidence: `frontend/projects/web/src/app/app.routes.ts`)
- Angular application → Courier portal: routes to (evidence: `frontend/projects/web/src/app/app.routes.ts`)
- Angular application → Dispatch portal: routes to (evidence: `frontend/projects/web/src/app/app.routes.ts`)
- Angular application → Admin portal: routes to (evidence: `frontend/projects/web/src/app/app.routes.ts`)
- Angular application → Tracking view: routes to (evidence: `frontend/projects/web/src/app/app.routes.ts`)
- Auth client → Auth service: authenticates with
- Auth service → PostgreSQL: reads and writes (evidence: `README.md`)
- Auth service → Audit records: records actions
- Admin portal → Auth service: manages users
- Auth service → Mail service: sends provisioning mail
- Customer portal → Parcel lifecycle: creates parcels
- Merchant portal → Merchant orders: places orders
- Merchant orders → Parcel lifecycle: requests creation (evidence: `services/integration-service/src/main/java/com/swiftdrop/integration/merchant/MerchantOrderService.java`)
- Merchant orders → PostgreSQL: stores order state
- Dispatch portal → Dispatch and pricing: assigns parcels
- Dispatch and pricing → Parcel lifecycle: assigns courier (evidence: `services/operations-service/src/main/java/com/swiftdrop/operations/dispatch/DispatchService.java`)
- Courier portal → Parcel lifecycle: updates delivery
- Tracking view → Parcel queries: looks up status
- Parcel queries → Parcel lifecycle: reads parcels (evidence: `services/parcel-service/src/main/java/com/swiftdrop/parcel/parcel/ParcelQueryServiceImpl.java`)
- Dispatch and pricing → Courier routing: requests routes
- Courier routing → OSRM routing: gets route (evidence: `services/operations-service/src/main/java/com/swiftdrop/operations/navigation/NavigationRouteService.java`)
- Dispatch and pricing → Delivery reports: views reports
- Parcel lifecycle → Kafka: publishes lifecycle events (evidence: `README.md`)
- Kafka → Notifications: delivers events (evidence: `README.md`)
- Kafka → Delivery reports: delivers events (evidence: `README.md`)
- Kafka → Merchant webhooks: delivers events
- Notifications → Mail service: sends email
- Customer portal → Delivery assistant: asks questions
- Delivery assistant → Parcel queries: queries parcel data
- Merchant portal → Merchant webhooks: configures callbacks
