# galihsidik86/travel architecture

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

- Interactive diagram: https://gitdiagram.com/galihsidik86/travel
- Repository: https://github.com/galihsidik86/travel

## Overview

Religio Pro is a server-rendered management system for Indonesian umrah and haji agencies. Its main journey connects public package discovery and agent attribution to booking, payment, and operational fulfillment; jemaah and crew portals support travelers and trip staff, while administrators manage operations and finance. Express mounts HTTP adapters, with business logic organized in services and Prisma-backed persistence. Notifications and scheduled jobs extend the workflow. The README documents these capabilities; sampled source confirms app mounting, notification-worker startup, and webhook handling, but not all route-to-service wiring.

Main entry points: [`src/app.js`](https://github.com/galihsidik86/travel/blob/main/src/app.js) (HTTP application), [`src/server.js`](https://github.com/galihsidik86/travel/blob/main/src/server.js) (Express server), [`src/services/paymentGateway.js`](https://github.com/galihsidik86/travel/blob/main/src/services/paymentGateway.js) (Payment logic), [`src/routes/inboundWebhooks.js`](https://github.com/galihsidik86/travel/blob/main/src/routes/inboundWebhooks.js) (Webhook endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_server["Express server<br/>[server.js]"]
  node_app["HTTP application<br/>[app.js]"]
end

subgraph group_sales["Sales and booking"]
  node_public_packages["Public packages<br/>[paket.js]"]
  node_agent_portal["Agent CRM<br/>[agen.js]"]
  node_lead_service["Lead management<br/>[leads.js]"]
  node_booking_routes["Booking endpoints<br/>[booking.js]"]
  node_booking_service["Booking logic<br/>[booking.js]"]
end

subgraph group_operations["Trip operations"]
  node_jemaah_portal["Jemaah portal<br/>[jemaahPortal.js]"]
  node_document_upload["Document handling<br/>[jemaahDocs.js]"]
  node_crew_portal["Crew portal<br/>[crew.js]"]
  node_admin_routes["Admin operations<br/>[admin.js]"]
end

subgraph group_platform["Finance and platform"]
  node_payment_routes["Payment endpoints<br/>[paymentGateway.js]"]
  node_payment_service["Payment logic<br/>[paymentGateway.js]"]
  node_database[("Prisma database<br/>[db.js]")]
  node_notifications["Notification services<br/>[notifications.js]"]
  node_notif_worker["Notification worker<br/>[notifWorker.js]"]
  node_channel_senders["WA and email<br/>[notifBootstrap.js]"]
  node_ops_jobs["Scheduled operations"]
  node_webhook_routes["Webhook endpoints<br/>[inboundWebhooks.js]"]
  node_webhook_service["Webhook processing<br/>[inboundWebhooks.js]"]
  node_outbound_webhooks["Outbound webhooks<br/>[webhooks.js]"]
end

node_traveler(("Jemaah"))
node_agent(("Travel agent"))
node_crew(("Muthawwif"))
node_admin(("Agency staff"))
node_partner(("Partner systems"))
node_midtrans["Midtrans gateway"]

node_traveler -->|"requests pages"| node_app
node_agent -->|"uses portal"| node_app
node_crew -->|"uses portal"| node_app
node_admin -->|"manages agency"| node_app
node_app -->|"mounts routes"| node_public_packages
node_app -->|"mounts routes"| node_agent_portal
node_app -->|"mounts routes"| node_booking_routes
node_app -->|"mounts routes"| node_jemaah_portal
node_app -->|"mounts routes"| node_crew_portal
node_app -->|"mounts routes"| node_admin_routes
node_app -->|"mounts routes"| node_payment_routes
node_app -->|"mounts routes"| node_webhook_routes
node_agent_portal -->|"manages leads"| node_lead_service
node_booking_routes -->|"handles bookings"| node_booking_service
node_jemaah_portal -->|"tracks documents"| node_document_upload
node_payment_routes -->|"handles payments"| node_payment_service
node_payment_service -.->|"requests payment"| node_midtrans
node_server -->|"creates app"| node_app
node_server -->|"starts worker"| node_notif_worker
node_notif_worker -->|"processes queue"| node_notifications
node_server -->|"bootstraps senders"| node_channel_senders
node_ops_jobs -->|"queues notices"| node_notifications
node_webhook_routes -->|"receives events"| node_webhook_service
node_partner -->|"posts events"| node_webhook_routes
node_webhook_service -->|"records events"| node_database
node_outbound_webhooks -->|"delivers events"| node_partner
node_booking_service -->|"persists bookings"| node_database
node_payment_service -->|"records payments"| node_database

click node_server "https://github.com/galihsidik86/travel/blob/main/src/server.js"
click node_app "https://github.com/galihsidik86/travel/blob/main/src/app.js"
click node_public_packages "https://github.com/galihsidik86/travel/blob/main/src/routes/paket.js"
click node_agent_portal "https://github.com/galihsidik86/travel/blob/main/src/routes/agen.js"
click node_lead_service "https://github.com/galihsidik86/travel/blob/main/src/services/leads.js"
click node_booking_routes "https://github.com/galihsidik86/travel/blob/main/src/routes/booking.js"
click node_booking_service "https://github.com/galihsidik86/travel/blob/main/src/services/booking.js"
click node_jemaah_portal "https://github.com/galihsidik86/travel/blob/main/src/routes/jemaahPortal.js"
click node_document_upload "https://github.com/galihsidik86/travel/blob/main/src/services/jemaahDocs.js"
click node_crew_portal "https://github.com/galihsidik86/travel/blob/main/src/routes/crew.js"
click node_admin_routes "https://github.com/galihsidik86/travel/blob/main/src/routes/admin.js"
click node_payment_routes "https://github.com/galihsidik86/travel/blob/main/src/routes/paymentGateway.js"
click node_payment_service "https://github.com/galihsidik86/travel/blob/main/src/services/paymentGateway.js"
click node_database "https://github.com/galihsidik86/travel/blob/main/src/lib/db.js"
click node_notifications "https://github.com/galihsidik86/travel/blob/main/src/services/notifications.js"
click node_notif_worker "https://github.com/galihsidik86/travel/blob/main/src/lib/notifWorker.js"
click node_channel_senders "https://github.com/galihsidik86/travel/blob/main/src/lib/notifBootstrap.js"
click node_ops_jobs "https://github.com/galihsidik86/travel/tree/main/src/jobs"
click node_webhook_routes "https://github.com/galihsidik86/travel/blob/main/src/routes/inboundWebhooks.js"
click node_webhook_service "https://github.com/galihsidik86/travel/blob/main/src/services/inboundWebhooks.js"
click node_outbound_webhooks "https://github.com/galihsidik86/travel/blob/main/src/services/webhooks.js"

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_server,node_app toneBlue
class node_public_packages,node_agent_portal,node_lead_service,node_booking_routes,node_booking_service toneAmber
class node_jemaah_portal,node_document_upload,node_crew_portal,node_admin_routes toneMint
class node_payment_routes,node_payment_service,node_database,node_notifications,node_notif_worker,node_channel_senders,node_ops_jobs,node_webhook_routes,node_webhook_service,node_outbound_webhooks toneRose
class node_traveler,node_agent,node_crew,node_admin,node_partner,node_midtrans toneIndigo
```

## Components

### Web application

- [Express server](https://github.com/galihsidik86/travel/blob/main/src/server.js): `src/server.js`
- [HTTP application](https://github.com/galihsidik86/travel/blob/main/src/app.js): `src/app.js`

### Sales and booking

- [Public packages](https://github.com/galihsidik86/travel/blob/main/src/routes/paket.js): `src/routes/paket.js`
- [Agent CRM](https://github.com/galihsidik86/travel/blob/main/src/routes/agen.js): `src/routes/agen.js`
- [Lead management](https://github.com/galihsidik86/travel/blob/main/src/services/leads.js): `src/services/leads.js`
- [Booking endpoints](https://github.com/galihsidik86/travel/blob/main/src/routes/booking.js): `src/routes/booking.js`
- [Booking logic](https://github.com/galihsidik86/travel/blob/main/src/services/booking.js): `src/services/booking.js`

### Trip operations

- [Jemaah portal](https://github.com/galihsidik86/travel/blob/main/src/routes/jemaahPortal.js): `src/routes/jemaahPortal.js`
- [Document handling](https://github.com/galihsidik86/travel/blob/main/src/services/jemaahDocs.js): `src/services/jemaahDocs.js`
- [Crew portal](https://github.com/galihsidik86/travel/blob/main/src/routes/crew.js): `src/routes/crew.js`
- [Admin operations](https://github.com/galihsidik86/travel/blob/main/src/routes/admin.js): `src/routes/admin.js`

### Finance and platform

- [Payment endpoints](https://github.com/galihsidik86/travel/blob/main/src/routes/paymentGateway.js): `src/routes/paymentGateway.js`
- [Payment logic](https://github.com/galihsidik86/travel/blob/main/src/services/paymentGateway.js): `src/services/paymentGateway.js`
- [Prisma database](https://github.com/galihsidik86/travel/blob/main/src/lib/db.js): `src/lib/db.js`
- [Notification services](https://github.com/galihsidik86/travel/blob/main/src/services/notifications.js): `src/services/notifications.js`
- [Notification worker](https://github.com/galihsidik86/travel/blob/main/src/lib/notifWorker.js): `src/lib/notifWorker.js`
- [WA and email](https://github.com/galihsidik86/travel/blob/main/src/lib/notifBootstrap.js): `src/lib/notifBootstrap.js`
- [Scheduled operations](https://github.com/galihsidik86/travel/tree/main/src/jobs): `src/jobs`
- [Webhook endpoints](https://github.com/galihsidik86/travel/blob/main/src/routes/inboundWebhooks.js): `src/routes/inboundWebhooks.js`
- [Webhook processing](https://github.com/galihsidik86/travel/blob/main/src/services/inboundWebhooks.js): `src/services/inboundWebhooks.js`
- [Outbound webhooks](https://github.com/galihsidik86/travel/blob/main/src/services/webhooks.js): `src/services/webhooks.js`

### Other components

- **Jemaah**
- **Travel agent**
- **Muthawwif**
- **Agency staff**
- **Partner systems**
- **Midtrans gateway**

## Connections

- Jemaah → HTTP application: requests pages
- Travel agent → HTTP application: uses portal
- Muthawwif → HTTP application: uses portal
- Agency staff → HTTP application: manages agency
- HTTP application → Public packages: mounts routes
- HTTP application → Agent CRM: mounts routes
- HTTP application → Booking endpoints: mounts routes
- HTTP application → Jemaah portal: mounts routes
- HTTP application → Crew portal: mounts routes
- HTTP application → Admin operations: mounts routes
- HTTP application → Payment endpoints: mounts routes
- HTTP application → Webhook endpoints: mounts routes
- Agent CRM → Lead management: manages leads
- Booking endpoints → Booking logic: handles bookings
- Jemaah portal → Document handling: tracks documents
- Payment endpoints → Payment logic: handles payments
- Payment logic → Midtrans gateway: requests payment
- Express server → HTTP application: creates app
- Express server → Notification worker: starts worker
- Notification worker → Notification services: processes queue
- Express server → WA and email: bootstraps senders
- Scheduled operations → Notification services: queues notices
- Webhook endpoints → Webhook processing: receives events
- Partner systems → Webhook endpoints: posts events
- Webhook processing → Prisma database: records events
- Outbound webhooks → Partner systems: delivers events
- Booking logic → Prisma database: persists bookings
- Payment logic → Prisma database: records payments
