# no-tn-nag/flightparser architecture

> Architecture diagram of the GitHub repository no-tn-nag/flightparser, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/no-tn-nag/flightparser
- Repository: https://github.com/no-tn-nag/flightparser

## Overview

FlightParser is a C# console application that reads a PDF, identifies operational-flight-plan and crew-briefing pages, and emits either parsed records or combined flights as readable text or JSON. The CLI opens the document and coordinates page parsing, flight-number matching, and output; the two parsers extract their respective fields, while Flight represents the combined result. The excerpts show the runtime flow and PDF library usage; the README does not document further capabilities, and no storage or external service integration is shown.

Main entry points: [`Program.cs`](https://github.com/no-tn-nag/flightparser/blob/main/Program.cs) (CLI coordinator), [`Models/Flight.cs`](https://github.com/no-tn-nag/flightparser/blob/main/Models/Flight.cs) (Flight matcher), [`Models/OperationalFlightPlan.cs`](https://github.com/no-tn-nag/flightparser/blob/main/Models/OperationalFlightPlan.cs) (OFP parser), [`Models/CrewBriefing.cs`](https://github.com/no-tn-nag/flightparser/blob/main/Models/CrewBriefing.cs) (Crew parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflow"]
  node_program["CLI coordinator<br/>[Program.cs]"]
end

subgraph group_parsing["PDF parsing"]
  node_ofp["OFP parser"]
  node_crew["Crew parser<br/>[CrewBriefing.cs]"]
end

subgraph group_domain["Flight data"]
  node_flight["Flight matcher<br/>[Flight.cs]"]
end

node_user(("CLI user"))
node_pdfpig["PdfPig library"]

node_user -->|"provides arguments"| node_program
node_program -->|"opens PDF"| node_pdfpig
node_program -->|"finds OFP pages"| node_ofp
node_program -->|"finds crew pages"| node_crew
node_ofp -->|"reads page words"| node_pdfpig
node_crew -->|"reads page words"| node_pdfpig
node_program -->|"matches and assembles"| node_flight
node_flight -->|"holds briefing"| node_crew
node_flight -->|"holds flight plan"| node_ofp
node_program -->|"prints text or JSON"| node_user

click node_program "https://github.com/no-tn-nag/flightparser/blob/main/Program.cs"
click node_ofp "https://github.com/no-tn-nag/flightparser/blob/main/Models/OperationalFlightPlan.cs"
click node_crew "https://github.com/no-tn-nag/flightparser/blob/main/Models/CrewBriefing.cs"
click node_flight "https://github.com/no-tn-nag/flightparser/blob/main/Models/Flight.cs"

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_program,node_user toneBlue
class node_ofp,node_crew toneAmber
class node_flight toneMint
class node_pdfpig toneIndigo
```

## Components

### CLI workflow

- [CLI coordinator](https://github.com/no-tn-nag/flightparser/blob/main/Program.cs): `Program.cs`

### PDF parsing

- [OFP parser](https://github.com/no-tn-nag/flightparser/blob/main/Models/OperationalFlightPlan.cs): `Models/OperationalFlightPlan.cs`
- [Crew parser](https://github.com/no-tn-nag/flightparser/blob/main/Models/CrewBriefing.cs): `Models/CrewBriefing.cs`

### Flight data

- [Flight matcher](https://github.com/no-tn-nag/flightparser/blob/main/Models/Flight.cs): `Models/Flight.cs`

### Other components

- **CLI user**
- **PdfPig library**

## Connections

- CLI user → CLI coordinator: provides arguments (evidence: `Program.cs`)
- CLI coordinator → PdfPig library: opens PDF (evidence: `Program.cs`)
- CLI coordinator → OFP parser: finds OFP pages (evidence: `Program.cs`)
- CLI coordinator → Crew parser: finds crew pages (evidence: `Program.cs`)
- OFP parser → PdfPig library: reads page words (evidence: `Models/OperationalFlightPlan.cs`)
- Crew parser → PdfPig library: reads page words (evidence: `Models/CrewBriefing.cs`)
- CLI coordinator → Flight matcher: matches and assembles (evidence: `Program.cs`)
- Flight matcher → Crew parser: holds briefing (evidence: `Models/Flight.cs`)
- Flight matcher → OFP parser: holds flight plan (evidence: `Models/Flight.cs`)
- CLI coordinator → CLI user: prints text or JSON (evidence: `Program.cs`)
