Skip to content

Latest commit

Β 

History

History
111 lines (81 loc) Β· 3.93 KB

File metadata and controls

111 lines (81 loc) Β· 3.93 KB

✈️ Airline Management System (C++ TUI)

C++ CMake FTXUI Docker Badge Workflow Status

A complete Airline Management System built in C++. This project demonstrates object-oriented programming, data persistence, and modern C++ build systems. It features both a standard Command Line Interface (CLI) for automated testing environments and a fully interactive Terminal User Interface (TUI) built with FTXUI.


πŸ“Έ Previews

image image

✨ Key Features

  • Dual Interfaces: Contains two distinct executablesβ€”a standard CLI and an interactive, mouse-driven TUI.
  • Interactive TUI Dashboard: Navigate through visually formatted tables to view Planes, Crew Members, and Flights.
  • Dynamic Form Validation: Seamlessly add new data (Cargo vs. Regular planes, Pilots vs. Hosts) through interactive terminal forms.
  • Data Persistence: All states and entries are read from and saved to data/Delta.txt on exit.
  • Polymorphism in Action: Deep reliance on inheritance (CPlane -> CCargo, CCrewMember -> CPilot) for rendering dynamic properties.

🐳 Docker

You can build and run the project in a container without installing any C++ toolchain locally.

Pull Pre-built Image

A pre-built image is automatically published to GitHub Container Registry on every push to master:

docker pull ghcr.io/idobaruch7/airline-project:latest
docker run -it ghcr.io/idobaruch7/airline-project:latest

Build Locally

docker build -t airline-project .

# Interactive TUI (default)
docker run -it airline-project

# CLI version
docker run -it airline-project AirlineProject

The image uses a multi-stage build. GCC 13 compiles the project in the first stage, then only the binaries are copied into a slim Debian runtime (~78MB).


πŸ› οΈ Build & Installation Instructions

This project uses CMake to automatically handle dependencies (it will download the FTXUI library for you during configuration).

Prerequisites

  • A C++17 compatible compiler (g++, clang, or MSVC)
  • CMake (3.14 or higher)
  • Make

Building the Project

Clone the repository and run the standard CMake build commands:

# 1. Clone the repository
git clone https://github.com/yourusername/Airline-Project.git
cd Airline-Project

# 2. Create the build directory
mkdir -p build && cd build

# 3. Configure and compile the code
cmake ..
make

Running the Application

Ensure you run the executables from the root of the project so they can correctly locate the data/Delta.txt mock database!

To run the modern Interactive TUI:

./build/AirlineProject_TUI

To run the standard CLI version:

./build/AirlineProject

πŸ“‚ Project Structure

Airline-Project/
β”œβ”€β”€ CMakeLists.txt         # Build configuration & dependency fetcher
β”œβ”€β”€ Dockerfile             # Multi-stage Docker build
β”œβ”€β”€ .dockerignore          # Files excluded from Docker builds
β”œβ”€β”€ src/                   # C++ Implementation Files
β”‚   β”œβ”€β”€ main.cpp           # Standard CLI Entry Point
β”‚   β”œβ”€β”€ main_tui.cpp       # FTXUI Interactive Entry Point
β”‚   └── ...                # Core classes (CFlight, CPlane, etc.)
β”œβ”€β”€ include/               # C++ Header Files
β”œβ”€β”€ data/                  # Persistent data storage
β”‚   └── Delta.txt          
└── build/                 # Compiled binaries (generated by CMake)