How dailyp549/flight-management-booking-system works
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: BookingService.java Booking service · FlightServer.java HTTP server · FlightService.java Flight service · index.html Booking UI
Components 19
Browser client
- Booking UI
src/FlightManagementBookingSystem/index.html - Client behavior
src/FlightManagementBookingSystem/app.js - UI styling
src/FlightManagementBookingSystem/styles.css - Visual background · Optional Three.js-style visual layer.
src/FlightManagementBookingSystem/three-background.js
Java application
- Application entry
src/FlightManagementBookingSystem/Main.java - HTTP server · Serves endpoints consumed by the static client.
src/FlightManagementBookingSystem/FlightServer.java - Demo runner
src/FlightManagementBookingSystem/Demo.java - Flight service
src/FlightManagementBookingSystem/FlightService.java - Passenger service
src/FlightManagementBookingSystem/PassengerService.java - Booking service · Coordinates passenger, flight, and booking status operations.
src/FlightManagementBookingSystem/BookingService.java
Domain and state
- Flight
src/FlightManagementBookingSystem/Flight.java - Passenger
src/FlightManagementBookingSystem/Passenger.java - Booking
src/FlightManagementBookingSystem/Booking.java - Booking status
src/FlightManagementBookingSystem/BookingStatus.java - In-memory data · Shared state resets when the process restarts.
src/FlightManagementBookingSystem/InMemoryData.java
Build and deployment
- Maven build
src/FlightManagementBookingSystem/pom.xml - Container image
src/FlightManagementBookingSystem/Dockerfile - Render deployment
src/FlightManagementBookingSystem/render.yaml - Process runtime
src/FlightManagementBookingSystem/Procfile
Connections 22
- 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