# bassamalsaqqa/gaza-gateway architecture

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

- Interactive diagram: https://gitdiagram.com/bassamalsaqqa/gaza-gateway
- Repository: https://github.com/bassamalsaqqa/gaza-gateway

## Overview

Gaza Gateway combines a public airport and airline experience with airport-history content, editorial administration, and a local Laravel identity API. The principal visitor workflow goes from flight search through booking choices and review, then to booking management and passenger account features. README statements support the product capabilities; source excerpts and index references support only selected internal links, so unsampled implementation relationships are omitted.

Main entry points: [`src/lib/domain/booking.ts`](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/domain/booking.ts) (Booking Wizard), [`src/routes/__root.tsx`](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/routes/__root.tsx) (Airport Website), [`src/lib/repositories/storage.ts`](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/repositories/storage.ts) (Repository Storage), [`src/components/flight-search-form.tsx`](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/flight-search-form.tsx) (Flight Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_travel["Travel Experience"]
  node_search["Flight Search"]
  node_booking["Booking Wizard<br/>[booking.ts]"]
  node_fare["Fare Selection<br/>[fare-step.tsx]"]
  node_extras["Seats and Extras"]
  node_review["Trip Review<br/>[review-step.tsx]"]
  node_manage["Trips and Passes"]
  node_drafts[("Booking Drafts<br/>[storage.ts]")]
  node_identity_ui["Identity Workspaces"]
end

subgraph group_content["Airport Content"]
  node_public_site["Airport Website<br/>[__root.tsx]"]
  node_airport_story["Airport Story<br/>[airport-past.ts]"]
  node_archive[("Archive Catalog<br/>[catalog.ts]")]
  node_content_repo[("Content Repository<br/>[repository.ts]")]
end

subgraph group_admin["Administration"]
  node_cms["Editorial CMS<br/>[useCmsDocument.ts]"]
end

subgraph group_identity["Identity Backend"]
  node_identity_api["Identity API<br/>[identity.php]"]
  node_identity_controllers["Identity Controllers"]
  node_identity_services["Identity Services"]
end

subgraph group_shared["Shared Services"]
  node_repo_storage[("Repository Storage<br/>[storage.ts]")]
  node_local_private_storage[("Private Object Storage")]
  node_studio_preview["Studio Preview Guard<br/>[studio-preview.ts]"]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))

node_visitor -->|"searches flights"| node_search
node_search -->|"starts booking"| node_booking
node_booking -->|"selects fare"| node_fare
node_booking -->|"chooses seats and extras"| node_extras
node_booking -->|"reviews trip"| node_review
node_booking -.->|"saves draft"| node_drafts
node_review -->|"confirms booking"| node_manage
node_visitor -->|"manages booking"| node_manage
node_visitor -->|"explores site"| node_public_site
node_public_site -->|"presents history"| node_airport_story
node_public_site -->|"presents archive"| node_archive
node_admin_user -->|"edits content"| node_cms
node_cms -->|"saves drafts"| node_content_repo
node_content_repo -->|"loads published content"| node_airport_story
node_identity_ui -.->|"calls identity API"| node_identity_api
node_identity_api -.->|"routes requests"| node_identity_controllers
node_identity_controllers -.->|"coordinates authentication"| node_identity_services
node_repo_storage -->|"checks preview mode"| node_studio_preview
node_repo_storage -.->|"persists objects"| node_local_private_storage

click node_search "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/flight-search-form.tsx"
click node_booking "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/domain/booking.ts"
click node_fare "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/booking/fare-step.tsx"
click node_extras "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/booking/seat-selection-workspace.tsx"
click node_review "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/booking/review-step.tsx"
click node_manage "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/routes/%7B-%24locale%7D.account.trips.%24ref.tsx"
click node_drafts "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/booking-draft/storage.ts"
click node_public_site "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/routes/__root.tsx"
click node_airport_story "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/content/published/airport-past.ts"
click node_archive "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/archive/catalog.ts"
click node_content_repo "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/content/repository.ts"
click node_cms "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/admin/cms/useCmsDocument.ts"
click node_identity_ui "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/identity/passenger-workspace.tsx"
click node_identity_api "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/backend/routes/identity.php"
click node_identity_controllers "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/backend/app/Http/Controllers/Identity/Passenger/PassengerAuthController.php"
click node_identity_services "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/backend/app/Identity/Passenger/PassengerAuthCoordinator.php"
click node_repo_storage "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/repositories/storage.ts"
click node_local_private_storage "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/backend/app/Services/Foundation/Storage/LocalPrivateStorage.php"
click node_studio_preview "https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/studio-preview.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_search,node_booking,node_fare,node_extras,node_review,node_manage,node_drafts,node_identity_ui toneBlue
class node_public_site,node_airport_story,node_archive,node_content_repo toneAmber
class node_cms toneMint
class node_identity_api,node_identity_controllers,node_identity_services toneRose
class node_repo_storage,node_local_private_storage,node_studio_preview,node_visitor,node_admin_user toneIndigo
```

## Components

### Travel Experience

- [Flight Search](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/flight-search-form.tsx): `src/components/flight-search-form.tsx`
- [Booking Wizard](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/domain/booking.ts): `src/lib/domain/booking.ts`
- [Fare Selection](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/booking/fare-step.tsx): `src/components/booking/fare-step.tsx`
- [Seats and Extras](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/booking/seat-selection-workspace.tsx): `src/components/booking/seat-selection-workspace.tsx`
- [Trip Review](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/booking/review-step.tsx): `src/components/booking/review-step.tsx`
- [Trips and Passes](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/routes/%7B-%24locale%7D.account.trips.%24ref.tsx): `src/routes/{-$locale}.account.trips.$ref.tsx`
- [Booking Drafts](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/booking-draft/storage.ts): `src/lib/booking-draft/storage.ts`
- [Identity Workspaces](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/identity/passenger-workspace.tsx): `src/components/identity/passenger-workspace.tsx`

### Airport Content

- [Airport Website](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/routes/__root.tsx): `src/routes/__root.tsx`
- [Airport Story](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/content/published/airport-past.ts): `src/content/published/airport-past.ts`
- [Archive Catalog](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/archive/catalog.ts): `src/lib/archive/catalog.ts`
- [Content Repository](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/content/repository.ts): `src/content/repository.ts`

### Administration

- [Editorial CMS](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/components/admin/cms/useCmsDocument.ts): `src/components/admin/cms/useCmsDocument.ts`

### Identity Backend

- [Identity API](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/backend/routes/identity.php): `backend/routes/identity.php`
- [Identity Controllers](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/backend/app/Http/Controllers/Identity/Passenger/PassengerAuthController.php): `backend/app/Http/Controllers/Identity/Passenger/PassengerAuthController.php`
- [Identity Services](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/backend/app/Identity/Passenger/PassengerAuthCoordinator.php): `backend/app/Identity/Passenger/PassengerAuthCoordinator.php`

### Shared Services

- [Repository Storage](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/repositories/storage.ts): `src/lib/repositories/storage.ts`
- [Private Object Storage](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/backend/app/Services/Foundation/Storage/LocalPrivateStorage.php): `backend/app/Services/Foundation/Storage/LocalPrivateStorage.php`
- [Studio Preview Guard](https://github.com/bassamalsaqqa/gaza-gateway/blob/main/src/lib/studio-preview.ts): `src/lib/studio-preview.ts`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Flight Search: searches flights
- Flight Search → Booking Wizard: starts booking
- Booking Wizard → Fare Selection: selects fare
- Booking Wizard → Seats and Extras: chooses seats and extras
- Booking Wizard → Trip Review: reviews trip
- Booking Wizard → Booking Drafts: saves draft
- Trip Review → Trips and Passes: confirms booking
- Visitor → Trips and Passes: manages booking
- Visitor → Airport Website: explores site
- Airport Website → Airport Story: presents history
- Airport Website → Archive Catalog: presents archive
- Administrator → Editorial CMS: edits content
- Editorial CMS → Content Repository: saves drafts (evidence: `src/components/admin/cms/useCmsDocument.ts`)
- Content Repository → Airport Story: loads published content (evidence: `src/content/repository.ts`)
- Identity Workspaces → Identity API: calls identity API
- Identity API → Identity Controllers: routes requests
- Identity Controllers → Identity Services: coordinates authentication
- Repository Storage → Studio Preview Guard: checks preview mode (evidence: `src/lib/repositories/storage.ts`)
- Repository Storage → Private Object Storage: persists objects
