# dailyp549/flight-management-booking-system architecture

> Architecture diagram of the GitHub repository dailyp549/flight-management-booking-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dailyp549/flight-management-booking-system
- Repository: https://github.com/dailyp549/flight-management-booking-system

## Overview

#### Purpose and entry points
This is a small flight-management and booking system with a Java backend and static browser UI. The repository contains duplicated root and `src/FlightManagementBookingSystem/` application copies; the latter is the most complete deployment unit because it includes `Procfile`, `system.properties`, and frontend assets.

Backend execution likely starts at `src/FlightManagementBookingSystem/Main.java`, with HTTP serving handled by `src/FlightManagementBookingSystem/FlightServer.java`. The browser entry point is `src/FlightManagementBookingSystem/index.html`, loading `app.js` and styling/background assets.

#### Domain model
The core domain represents flights, passengers, and bookings:
- `src/FlightManagementBookingSystem/Flight.java`
- `src/FlightManagementBookingSystem/Passenger.java`
- `src/FlightManagementBookingSystem/Booking.java`

Booking lifecycle/state is isolated in `src/FlightManagementBookingSystem/BookingStatus.java`. These model classes form the boundary between HTTP/UI payloads and service-layer business operations.

#### Application services
Business operations are separated by aggregate:
- Flight operations: `src/FlightManagementBookingSystem/FlightService.java`
- Passenger operations: `src/FlightManagementBookingSystem/PassengerService.java`
- Booking creation, lookup, and status handling: `src/FlightManagementBookingSystem/BookingService.java`

The expected control flow is request/UI action → `FlightServer` endpoint handling → service operation → in-memory state mutation/query → response rendered by the frontend.

#### Data storage boundary
`src/FlightManagementBookingSystem/InMemoryData.java` is the persistence substitute and central state holder. The application has no visible database schema, ORM, migration layer, or external datastore in the tree. State is therefore process-local and likely resets on restart or redeploy.

Services should own domain validation and coordination around this shared in-memory store, especially booking operations that must connect a passenger with a flight and update booking status.

#### HTTP server and API boundary
`src/FlightManagementBookingSystem/FlightServer.java` is the backend transport boundary. It likely exposes operations consumed by the static JavaScript client rather than using a framework-specific controller structure. `src/FlightManagementBookingSystem/Demo.java` appears to support direct/demo execution separate from the main server entry path.

The frontend/backend contract is implemented across:
- `src/FlightManagementBookingSystem/FlightServer.java`
- `src/FlightManagementBookingSystem/app.js`
- `src/FlightManagementBookingSystem/index.html`

#### Browser client
The client is a static HTML/JavaScript interface:
- `src/FlightManagementBookingSystem/index.html`
- `src/FlightManagementBookingSystem/app.js`
- `src/FlightManagementBookingSystem/styles.css`

`three-background.js` indicates an optional visual/Three.js-style background layer, separate from booking behavior:
- `src/FlightManagementBookingSystem/three-background.js`

#### Build and deployment
Maven is the Java build/runtime dependency boundary via `src/FlightManagementBookingSystem/pom.xml`. Container deployment is supported by `src/FlightManagementBookingSystem/Dockerfile`. Platform configuration targets Render and likely a Procfile-compatible Java runtime:
- `src/FlightManagementBookingSystem/render.yaml`
- `src/FlightManagementBookingSystem/Procfile`
- `src/FlightManagementBookingSystem/system.properties`

No external APIs or managed services are evidenced by the supplied tree.

Main entry points: [`src/FlightManagementBookingSystem/BookingService.java`](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/BookingService.java) (Booking service), [`src/FlightManagementBookingSystem/FlightServer.java`](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/FlightServer.java) (HTTP server), [`src/FlightManagementBookingSystem/FlightService.java`](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/FlightService.java) (Flight service), [`src/FlightManagementBookingSystem/index.html`](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/index.html) (Booking UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser client"]
  node_browser_ui["Booking UI<br/>static HTML<br/>[index.html]"]
  node_browser_app["Client behavior<br/>JavaScript<br/>[app.js]"]
  node_browser_styles["UI styling<br/>CSS<br/>[styles.css]"]
  node_browser_background["Visual background<br/>JavaScript"]
end

subgraph group_backend["Java application"]
  node_main(("Application entry<br/>Java main<br/>[Main.java]"))
  node_server{{"HTTP server<br/>transport boundary<br/>[FlightServer.java]"}}
  node_demo["Demo runner<br/>Java entry point<br/>[Demo.java]"]
  node_flight_service["Flight service<br/>application service<br/>[FlightService.java]"]
  node_passenger_service["Passenger service<br/>application service"]
  node_booking_service["Booking service<br/>application service"]
end

subgraph group_domain["Domain and state"]
  node_flight["Flight<br/>domain model<br/>[Flight.java]"]
  node_passenger["Passenger<br/>domain model<br/>[Passenger.java]"]
  node_booking["Booking<br/>domain model<br/>[Booking.java]"]
  node_booking_status["Booking status<br/>lifecycle state<br/>[BookingStatus.java]"]
  node_store[("In-memory data<br/>process-local store<br/>[InMemoryData.java]")]
end

subgraph group_delivery["Build and deployment"]
  node_maven["Maven build<br/>build manifest<br/>[pom.xml]"]
  node_container["Container image<br/>Docker build"]
  node_render["Render deployment<br/>platform config<br/>[render.yaml]"]
  node_process["Process runtime<br/>Procfile runtime"]
end

node_browser_ui -->|"loads"| node_browser_app
node_browser_ui -->|"loads"| node_browser_styles
node_browser_ui -.->|"loads"| node_browser_background
node_browser_app -->|"HTTP requests"| node_server
node_main -->|"starts"| node_server
node_demo -.->|"uses"| node_flight_service
node_server -->|"flight operations"| node_flight_service
node_server -->|"passenger operations"| node_passenger_service
node_server -->|"booking operations"| node_booking_service
node_flight_service -->|"manages"| node_flight
node_flight_service -->|"reads and writes"| node_store
node_passenger_service -->|"manages"| node_passenger
node_passenger_service -->|"reads and writes"| node_store
node_booking_service -->|"creates and updates"| node_booking
node_booking_service -->|"transitions"| node_booking_status
node_booking_service -->|"links"| node_flight
node_booking_service -->|"links"| node_passenger
node_booking_service -->|"reads and writes"| node_store
node_maven -->|"builds"| node_main
node_container -->|"builds with"| node_maven
node_render -->|"deploys"| node_container
node_process -->|"runs"| node_main

click node_browser_ui "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/index.html"
click node_browser_app "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/app.js"
click node_browser_styles "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/styles.css"
click node_browser_background "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/three-background.js"
click node_main "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Main.java"
click node_server "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/FlightServer.java"
click node_demo "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Demo.java"
click node_flight_service "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/FlightService.java"
click node_passenger_service "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/PassengerService.java"
click node_booking_service "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/BookingService.java"
click node_flight "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Flight.java"
click node_passenger "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Passenger.java"
click node_booking "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Booking.java"
click node_booking_status "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/BookingStatus.java"
click node_store "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/InMemoryData.java"
click node_maven "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/pom.xml"
click node_container "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Dockerfile"
click node_render "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/render.yaml"
click node_process "https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Procfile"

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_browser_ui,node_browser_app,node_browser_styles,node_browser_background toneBlue
class node_main,node_server,node_demo,node_flight_service,node_passenger_service,node_booking_service toneAmber
class node_flight,node_passenger,node_booking,node_booking_status,node_store toneMint
class node_maven,node_container,node_render,node_process toneRose
```

## Components

### Browser client

- [Booking UI](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/index.html): static HTML · `src/FlightManagementBookingSystem/index.html`
- [Client behavior](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/app.js): JavaScript · `src/FlightManagementBookingSystem/app.js`
- [UI styling](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/styles.css): CSS · `src/FlightManagementBookingSystem/styles.css`
- [Visual background](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/three-background.js): JavaScript · Optional Three.js-style visual layer. · `src/FlightManagementBookingSystem/three-background.js`

### Java application

- [Application entry](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Main.java): Java main · `src/FlightManagementBookingSystem/Main.java`
- [HTTP server](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/FlightServer.java): transport boundary · Serves endpoints consumed by the static client. · `src/FlightManagementBookingSystem/FlightServer.java`
- [Demo runner](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Demo.java): Java entry point · `src/FlightManagementBookingSystem/Demo.java`
- [Flight service](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/FlightService.java): application service · `src/FlightManagementBookingSystem/FlightService.java`
- [Passenger service](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/PassengerService.java): application service · `src/FlightManagementBookingSystem/PassengerService.java`
- [Booking service](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/BookingService.java): application service · Coordinates passenger, flight, and booking status operations. · `src/FlightManagementBookingSystem/BookingService.java`

### Domain and state

- [Flight](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Flight.java): domain model · `src/FlightManagementBookingSystem/Flight.java`
- [Passenger](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Passenger.java): domain model · `src/FlightManagementBookingSystem/Passenger.java`
- [Booking](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Booking.java): domain model · `src/FlightManagementBookingSystem/Booking.java`
- [Booking status](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/BookingStatus.java): lifecycle state · `src/FlightManagementBookingSystem/BookingStatus.java`
- [In-memory data](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/InMemoryData.java): process-local store · Shared state resets when the process restarts. · `src/FlightManagementBookingSystem/InMemoryData.java`

### Build and deployment

- [Maven build](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/pom.xml): build manifest · `src/FlightManagementBookingSystem/pom.xml`
- [Container image](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Dockerfile): Docker build · `src/FlightManagementBookingSystem/Dockerfile`
- [Render deployment](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/render.yaml): platform config · `src/FlightManagementBookingSystem/render.yaml`
- [Process runtime](https://github.com/dailyp549/flight-management-booking-system/blob/main/src/FlightManagementBookingSystem/Procfile): Procfile runtime · `src/FlightManagementBookingSystem/Procfile`

## Connections

- Booking UI → Client behavior: loads
- Booking UI → UI styling: loads
- Booking UI → Visual background: loads
- Client behavior → HTTP server: HTTP requests
- Application entry → HTTP server: starts
- Demo runner → Flight service: uses
- HTTP server → Flight service: flight operations
- HTTP server → Passenger service: passenger operations
- HTTP server → Booking service: booking operations
- Flight service → Flight: manages
- Flight service → In-memory data: reads and writes
- Passenger service → Passenger: manages
- Passenger service → In-memory data: reads and writes
- Booking service → Booking: creates and updates
- Booking service → Booking status: transitions
- Booking service → Flight: links
- Booking service → Passenger: links
- Booking service → In-memory data: reads and writes
- Maven build → Application entry: builds
- Container image → Maven build: builds with
- Render deployment → Container image: deploys
- Process runtime → Application entry: runs
