# picolo21/onthefly architecture

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

- Interactive diagram: https://gitdiagram.com/picolo21/onthefly
- Repository: https://github.com/picolo21/onthefly

## Overview

##### Project type and purpose
- This is a microservices-based .NET solution (“OnTheFly.sln”) for an airline/reservation system.
- Each microservice focuses on a single business capability (Aircraft, Airport, Company, Flight, Passenger, Sale, PostOffice).
- There are two consumer/worker apps (ConsumerReservation, ConsumerSale) and a test project.

##### File structure
- Top-level solution file: OnTheFly.sln
- Shared libraries:
- OnTheFly.Models – domain entities and DTOs
- OnTheFly.Connections – HTTP/DB connectors for each domain
- Microservices (each is an ASP.NET Core Web API):
- OnTheFly.AirCraftService
- OnTheFly.AirportService
- OnTheFly.CompanyService
- OnTheFly.FlightService
- OnTheFly.PassengerService
- OnTheFly.SaleService
- OnTheFly.PostOfficeService (stateless worker/service)
- Consumer applications:
- OnTheFly.ConsumerReservation
- OnTheFly.ConsumerSale
- Test project:
- OnTheFly.Test

##### (limited) README
- Only a project title; no architecture details provided.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Consumers
    subgraph "Consumers"
        CR["ConsumerReservation"]:::consumer
        CS["ConsumerSale"]:::consumer
    end

    %% Services
    subgraph "Microservices"
        SS["SaleService"]:::service
        FS["FlightService"]:::service
        PS["PassengerService"]:::service
        ACS["AircraftService"]:::service
        ARS["AirportService"]:::service
        CoS["CompanyService"]:::service
        POS["PostOfficeService"]:::service
    end

    %% Shared Libraries
    subgraph "Shared Libraries"
        M["Models"]:::shared
        C["Connections"]:::shared
    end

    %% External API
    EX["airportsapi"]:::external

    %% Connections
    CR -->|calls| SS
    CS -->|calls| SS
    SS -->|calls FlightService| FS
    SS -->|calls PassengerService| PS
    FS -->|calls AircraftService| ACS
    FS -->|calls AirportService| ARS
    CoS -->|calls AircraftService| ACS
    ARS -->|consumes| EX

    %% Shared dependencies
    SS -->|uses| M
    FS -->|uses| M
    PS -->|uses| M
    ACS -->|uses| M
    ARS -->|uses| M
    CoS -->|uses| M
    POS -->|uses| M

    SS -->|uses| C
    FS -->|uses| C
    PS -->|uses| C
    ACS -->|uses| C
    ARS -->|uses| C
    CoS -->|uses| C
    POS -->|uses| C

    %% Click Events
    click M "https://github.com/picolo21/onthefly/tree/main/OnTheFly.Models/"
    click C "https://github.com/picolo21/onthefly/tree/main/OnTheFly.Connections/"
    click ACS "https://github.com/picolo21/onthefly/tree/main/OnTheFly.AirCraftService/"
    click ARS "https://github.com/picolo21/onthefly/tree/main/OnTheFly.AirportService/"
    click CoS "https://github.com/picolo21/onthefly/tree/main/OnTheFly.CompanyService/"
    click FS "https://github.com/picolo21/onthefly/tree/main/OnTheFly.FlightService/"
    click PS "https://github.com/picolo21/onthefly/tree/main/OnTheFly.PassengerService/"
    click SS "https://github.com/picolo21/onthefly/tree/main/OnTheFly.SaleService/"
    click POS "https://github.com/picolo21/onthefly/tree/main/OnTheFly.PostOfficeService/"
    click CR "https://github.com/picolo21/onthefly/tree/main/OnTheFly.ConsumerReservation/"
    click CS "https://github.com/picolo21/onthefly/tree/main/OnTheFly.ConsumerSale/"

    %% Styles
    classDef consumer fill:#f9d5a2,stroke:#e37b00,color:#000;
    classDef service fill:#aed4f1,stroke:#2171b5,color:#000;
    classDef shared fill:#b2e0a1,stroke:#2e7d32,color:#000;
    classDef external fill:#e0e0e0,stroke:#616161,color:#000;
```
