# karen-elisha/airlines-management-system architecture

> Architecture diagram of the GitHub repository karen-elisha/airlines-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karen-elisha/airlines-management-system
- Repository: https://github.com/karen-elisha/airlines-management-system

## Overview

##### Project type and purpose
- This is a full-stack, monolithic web application called “Airlines Management System.”
- It uses PHP for the server side, MySQL as its relational database, and plain HTML/CSS/JavaScript for the client side.
- Core use-cases: user registration/login, flight search, booking, payment, ticket cancellation, user dashboard, admin dashboard, airline data management, and feedback.

##### File structure
- Top-level PHP entry points correspond to features:
- Public pages: index.php, search_flight.php, available.php, signup.php, login.php, logout.php
- Booking workflow: book_flight.php, booking-forms.php, complete-booking.php, payment.php
- User dashboard: user-dashboard.php, profile.php, myflight.html, ticket-cancellation.html, feedback.php
- Admin side: admin-login.php, admin-register.php, admin-dashboard.php, airlines-details.html
- Shared logic: db_connect.php (DB connection), dashboard_data.php (data retrieval), get-search-results.php (AJAX)
- Database schema is in airlines_management_system.sql.
- There are no separate “src” or “api” folders—this is a single directory with multiple PHP scripts.

##### README
- Confirms tech stack: HTML, CSS, JavaScript, PHP, MySQL.
- Describes high-level purpose: manage airline operations in a web interface.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    Browser["Client Browser (Web/Mobile)"]:::client

    %% Application Server Layer
    subgraph "Application Server"
        direction TB

        subgraph "Authentication Module"
            direction TB
            AuthSignup["signup.php"]:::server
            AuthLogin["login.php"]:::server
            AuthLogout["logout.php"]:::server
            AdminLogin["admin-login.php"]:::server
            AdminRegister["admin-register.php"]:::server
        end

        subgraph "Flight Search & Availability Module"
            direction TB
            SearchFlight["search_flight.php"]:::server
            SearchFlights["search_flights.php"]:::server
            Available["available.php"]:::server
            AvailableIndex["availableindex.php"]:::server
        end

        subgraph "Booking & Payment Module"
            direction TB
            BookFlight["book_flight.php"]:::server
            BookingForms["booking-forms.php"]:::server
            CompleteBooking["complete-booking.php"]:::server
            Payment["payment.php"]:::server
        end

        subgraph "User Dashboard Module"
            direction TB
            UserDashboard["user-dashboard.php"]:::server
            Profile["profile.php"]:::server
            MyFlight["myflight.html"]:::server
            TicketCancel["ticket-cancellation.html"]:::server
        end

        subgraph "Admin Dashboard & Airline Management Module"
            direction TB
            AdminDashboard["admin-dashboard.php"]:::server
            AirlineDetails["airline-details.html"]:::server
        end

        subgraph "Feedback & Communication Module"
            direction TB
            Feedback["feedback.php"]:::server
        end

        subgraph "Shared Utilities & Services"
            direction TB
            DBConnect["db_connect.php"]:::util
            GetSearchResults["get-search-results.php"]:::util
            DashboardData["dashboard_data.php"]:::util
        end

        subgraph "Public Entry Points"
            direction TB
            Index["index.php"]:::server
            ErrorPage["error.php"]:::server
        end
    end

    %% Database Layer
    Database["MySQL Database"]:::db
    Schema["airlines_management_system.sql"]:::db

    %% External Services
    ExternalServices["External Services\n(Payment Gateway, Email)"]:::external

    %% Connections
    Browser -->|"HTTP(S) Request"| Index
    Browser -->|"HTTP(S) Request"| SearchFlight
    Browser -->|"HTTP(S) Request"| BookFlight
    Browser -->|"HTTP(S) Request"| UserDashboard
    Browser -->|"HTTP(S) Request"| AdminLogin
    Browser -->|"HTTP(S) Request"| Feedback

    AuthSignup -->|uses| DBConnect
    AuthLogin -->|uses| DBConnect
    AuthLogout -->|uses| DBConnect
    AdminLogin -->|uses| DBConnect
    AdminRegister -->|uses| DBConnect

    SearchFlight -->|executes SQL| DBConnect
    SearchFlights -->|executes SQL| DBConnect
    Available -->|executes SQL| DBConnect
    AvailableIndex -->|executes SQL| DBConnect
    GetSearchResults -->|AJAX Endpoint| SearchFlight

    BookFlight -->|uses| DBConnect
    BookingForms -->|uses| DBConnect
    CompleteBooking -->|uses| Payment
    Payment -->|external API| ExternalServices

    UserDashboard -->|uses| DashboardData
    Profile -->|uses| DashboardData
    MyFlight -->|uses| DashboardData
    TicketCancel -->|uses| DashboardData

    AdminDashboard -->|uses| DashboardData
    AirlineDetails -->|uses| DashboardData

    Feedback -->|uses| DBConnect

    DBConnect -->|queries| Database
    DashboardData -->|queries| Database
    GetSearchResults -->|queries| Database
    Schema -->|defines| Database

    ExternalServices -.->|optional integration| Payment

    %% Click Events
    click AuthSignup "https://github.com/karen-elisha/airlines-management-system/blob/main/signup.php"
    click AuthLogin "https://github.com/karen-elisha/airlines-management-system/blob/main/login.php"
    click AuthLogout "https://github.com/karen-elisha/airlines-management-system/blob/main/logout.php"
    click AdminLogin "https://github.com/karen-elisha/airlines-management-system/blob/main/admin-login.php"
    click AdminRegister "https://github.com/karen-elisha/airlines-management-system/blob/main/admin-register.php"
    click SearchFlight "https://github.com/karen-elisha/airlines-management-system/blob/main/search_flight.php"
    click SearchFlights "https://github.com/karen-elisha/airlines-management-system/blob/main/search_flights.php"
    click Available "https://github.com/karen-elisha/airlines-management-system/blob/main/available.php"
    click AvailableIndex "https://github.com/karen-elisha/airlines-management-system/blob/main/availableindex.php"
    click GetSearchResults "https://github.com/karen-elisha/airlines-management-system/blob/main/get-search-results.php"
    click BookFlight "https://github.com/karen-elisha/airlines-management-system/blob/main/book_flight.php"
    click BookingForms "https://github.com/karen-elisha/airlines-management-system/blob/main/booking-forms.php"
    click CompleteBooking "https://github.com/karen-elisha/airlines-management-system/blob/main/complete-booking.php"
    click Payment "https://github.com/karen-elisha/airlines-management-system/blob/main/payment.php"
    click UserDashboard "https://github.com/karen-elisha/airlines-management-system/blob/main/user-dashboard.php"
    click Profile "https://github.com/karen-elisha/airlines-management-system/blob/main/profile.php"
    click MyFlight "https://github.com/karen-elisha/airlines-management-system/blob/main/myflight.html"
    click TicketCancel "https://github.com/karen-elisha/airlines-management-system/blob/main/ticket-cancellation.html"
    click AdminDashboard "https://github.com/karen-elisha/airlines-management-system/blob/main/admin-dashboard.php"
    click AirlineDetails "https://github.com/karen-elisha/airlines-management-system/blob/main/airline-details.html"
    click Feedback "https://github.com/karen-elisha/airlines-management-system/blob/main/feedback.php"
    click DBConnect "https://github.com/karen-elisha/airlines-management-system/blob/main/db_connect.php"
    click DashboardData "https://github.com/karen-elisha/airlines-management-system/blob/main/dashboard_data.php"
    click Index "https://github.com/karen-elisha/airlines-management-system/blob/main/index.php"
    click ErrorPage "https://github.com/karen-elisha/airlines-management-system/blob/main/error.php"
    click Schema "https://github.com/karen-elisha/airlines-management-system/blob/main/airlines_management_system.sql"

    %% Styles
    classDef client fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef server fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef util fill:#FFA500,stroke:#000,stroke-width:1px;
    classDef db fill:#FFD700,stroke:#000,stroke-width:1px;
    classDef external fill:#D3D3D3,stroke:#000,stroke-dasharray: 5 5;
```
