# shan23-ai/pascal-travels-- architecture

> Architecture diagram of the GitHub repository shan23-ai/pascal-travels--, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shan23-ai/pascal-travels--
- Repository: https://github.com/shan23-ai/pascal-travels--

## Overview

Pascal Travels is a travel and visa-services website whose main user journey is exploring travel, visa, immigration, and tour offerings, then submitting an application or booking and potentially paying. The repository also includes a separate Express API for authentication, jobs, agents, email, and provider-backed payments. The README documents the landing-page capabilities; sampled source shows payment handling and server routing. Several frontend and API modules were not excerpted, so their internal interactions are not inferred.

Main entry points: [`server/server.js`](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/server.js) (Express API), [`server/store.js`](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/store.js) (Application Store), [`index.html`](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/index.html) (Travel Site), [`server/routes/payments.js`](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/payments.js) (Payment Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_travel["Travel Website"]
  node_landing["Travel Site<br/>[index.html]"]
  node_site_behavior["Site Interactions<br/>[app.js]"]
  node_service_catalog["Visa &amp; Tour Catalog<br/>[packages.js]"]
  node_job_catalog["Job Listings<br/>[jobs.js]"]
  node_requirements["Visa Requirements<br/>[requirements.js]"]
end

subgraph group_checkout["Payment Experience"]
  node_payment_ui["Payment Modal"]
  node_payment_config["Payment Services &amp; Pricing<br/>[payment-config.js]"]
  node_buupass_client["Buupass Client<br/>[payment-service.js]"]
end

subgraph group_api["API Services"]
  node_api_server["Express API<br/>[server.js]"]
  node_auth_routes["Authentication Routes<br/>[auth.js]"]
  node_auth_middleware["JWT Authorization<br/>[auth.js]"]
  node_payment_routes["Payment Routes<br/>[payments.js]"]
  node_webhooks["Payment Webhooks<br/>[webhooks.js]"]
  node_jobs_routes["Jobs Routes<br/>[jobs.js]"]
  node_agents_routes["Agent Routes<br/>[agents.js]"]
  node_email_routes["Email Routes<br/>[emails.js]"]
  node_email_service["Email Delivery<br/>[emailService.js]"]
  node_pesalink["PesaLink Processing<br/>[pesalinkService.js]"]
  node_western_union["Western Union Processing"]
end

subgraph group_operations["Operations Data"]
  node_config["Server Configuration<br/>[config.js]"]
  node_store[("Application Store<br/>[store.js]")]
end

node_visitor(("Traveler"))
node_buupass{{"Buupass API"}}
node_database[("PostgreSQL")]

node_visitor -->|"browses"| node_landing
node_landing -->|"uses interactions"| node_site_behavior
node_landing -->|"presents services"| node_service_catalog
node_landing -.->|"presents jobs"| node_job_catalog
node_landing -.->|"supports visa choices"| node_requirements
node_visitor -.->|"starts booking"| node_payment_ui
node_payment_ui -->|"reads service pricing"| node_payment_config
node_payment_ui -.->|"submits payment"| node_buupass_client
node_buupass_client -->|"reads API settings"| node_payment_config
node_buupass_client -->|"requests payment"| node_buupass
node_api_server -->|"mounts routes"| node_auth_routes
node_api_server -->|"mounts routes"| node_payment_routes
node_api_server -->|"mounts routes"| node_webhooks
node_api_server -->|"mounts routes"| node_jobs_routes
node_api_server -->|"mounts routes"| node_agents_routes
node_api_server -->|"mounts routes"| node_email_routes
node_auth_routes -->|"verifies tokens"| node_auth_middleware
node_payment_routes -->|"reads and writes"| node_store
node_payment_routes -->|"initiates payments"| node_pesalink
node_payment_routes -->|"initiates payments"| node_western_union
node_webhooks -->|"handles callbacks"| node_pesalink
node_webhooks -->|"handles callbacks"| node_western_union
node_webhooks -->|"records events"| node_store
node_jobs_routes -->|"reads and writes"| node_store
node_agents_routes -->|"reads and writes"| node_store
node_email_routes -->|"sends messages"| node_email_service
node_pesalink -->|"updates payments"| node_store
node_western_union -->|"updates payments"| node_store
node_api_server -->|"loads settings"| node_config
node_api_server -->|"initializes store"| node_store
node_store -.->|"uses when enabled"| node_database

click node_landing "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/index.html"
click node_site_behavior "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/app.js"
click node_service_catalog "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/data/packages.js"
click node_job_catalog "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/data/jobs.js"
click node_requirements "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/data/requirements.js"
click node_payment_ui "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/controllers/payment-controller.js"
click node_payment_config "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/config/payment-config.js"
click node_buupass_client "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/services/payment-service.js"
click node_api_server "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/server.js"
click node_auth_routes "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/auth.js"
click node_auth_middleware "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/middleware/auth.js"
click node_payment_routes "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/payments.js"
click node_webhooks "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/webhooks.js"
click node_jobs_routes "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/jobs.js"
click node_agents_routes "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/agents.js"
click node_email_routes "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/emails.js"
click node_email_service "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/services/emailService.js"
click node_pesalink "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/services/pesalinkService.js"
click node_western_union "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/services/westernUnionService.js"
click node_config "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/config.js"
click node_store "https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/store.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_landing,node_site_behavior,node_service_catalog,node_job_catalog,node_requirements toneBlue
class node_payment_ui,node_payment_config,node_buupass_client,node_database toneAmber
class node_api_server,node_auth_routes,node_auth_middleware,node_payment_routes,node_webhooks,node_jobs_routes,node_agents_routes,node_email_routes,node_email_service,node_pesalink,node_western_union,node_buupass toneMint
class node_config,node_store toneRose
class node_visitor toneIndigo
```

## Components

### Travel Website

- [Travel Site](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/index.html): `index.html`
- [Site Interactions](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/app.js): `app.js`
- [Visa & Tour Catalog](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/data/packages.js): `data/packages.js`
- [Job Listings](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/data/jobs.js): `data/jobs.js`
- [Visa Requirements](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/data/requirements.js): `data/requirements.js`

### Payment Experience

- [Payment Modal](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/controllers/payment-controller.js): `controllers/payment-controller.js`
- [Payment Services & Pricing](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/config/payment-config.js): `config/payment-config.js`
- [Buupass Client](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/services/payment-service.js): `services/payment-service.js`

### API Services

- [Express API](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/server.js): `server/server.js`
- [Authentication Routes](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/auth.js): `server/routes/auth.js`
- [JWT Authorization](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/middleware/auth.js): `server/middleware/auth.js`
- [Payment Routes](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/payments.js): `server/routes/payments.js`
- [Payment Webhooks](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/webhooks.js): `server/routes/webhooks.js`
- [Jobs Routes](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/jobs.js): `server/routes/jobs.js`
- [Agent Routes](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/agents.js): `server/routes/agents.js`
- [Email Routes](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/routes/emails.js): `server/routes/emails.js`
- [Email Delivery](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/services/emailService.js): `server/services/emailService.js`
- [PesaLink Processing](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/services/pesalinkService.js): `server/services/pesalinkService.js`
- [Western Union Processing](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/services/westernUnionService.js): `server/services/westernUnionService.js`

### Operations Data

- [Server Configuration](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/config.js): `server/config.js`
- [Application Store](https://github.com/shan23-ai/pascal-travels--/blob/blackboxai/payment-integration/server/store.js): `server/store.js`

### Other components

- **Traveler**
- **Buupass API**
- **PostgreSQL**

## Connections

- Traveler → Travel Site: browses (evidence: `README.md`)
- Travel Site → Site Interactions: uses interactions (evidence: `README.md`)
- Travel Site → Visa & Tour Catalog: presents services (evidence: `README.md`)
- Travel Site → Job Listings: presents jobs
- Travel Site → Visa Requirements: supports visa choices
- Traveler → Payment Modal: starts booking
- Payment Modal → Payment Services & Pricing: reads service pricing (evidence: `controllers/payment-controller.js`)
- Payment Modal → Buupass Client: submits payment (evidence: `controllers/payment-controller.js`)
- Buupass Client → Payment Services & Pricing: reads API settings (evidence: `services/payment-service.js`)
- Buupass Client → Buupass API: requests payment (evidence: `services/payment-service.js`)
- Express API → Authentication Routes: mounts routes (evidence: `server/server.js`)
- Express API → Payment Routes: mounts routes (evidence: `server/server.js`)
- Express API → Payment Webhooks: mounts routes (evidence: `server/server.js`)
- Express API → Jobs Routes: mounts routes (evidence: `server/server.js`)
- Express API → Agent Routes: mounts routes (evidence: `server/server.js`)
- Express API → Email Routes: mounts routes (evidence: `server/server.js`)
- Authentication Routes → JWT Authorization: verifies tokens (evidence: `server/routes/auth.js`)
- Payment Routes → Application Store: reads and writes (evidence: `server/routes/payments.js`)
- Payment Routes → PesaLink Processing: initiates payments (evidence: `server/routes/payments.js`)
- Payment Routes → Western Union Processing: initiates payments (evidence: `server/routes/payments.js`)
- Payment Webhooks → PesaLink Processing: handles callbacks (evidence: `server/routes/webhooks.js`)
- Payment Webhooks → Western Union Processing: handles callbacks (evidence: `server/routes/webhooks.js`)
- Payment Webhooks → Application Store: records events (evidence: `server/routes/webhooks.js`)
- Jobs Routes → Application Store: reads and writes (evidence: `server/routes/jobs.js`)
- Agent Routes → Application Store: reads and writes (evidence: `server/routes/agents.js`)
- Email Routes → Email Delivery: sends messages (evidence: `server/routes/emails.js`)
- PesaLink Processing → Application Store: updates payments (evidence: `server/services/pesalinkService.js`)
- Western Union Processing → Application Store: updates payments (evidence: `server/services/westernUnionService.js`)
- Express API → Server Configuration: loads settings (evidence: `server/server.js`)
- Express API → Application Store: initializes store (evidence: `server/server.js`)
- Application Store → PostgreSQL: uses when enabled (evidence: `server/store.js`)
