# zla-artcc/vatis-profiles architecture

> Architecture diagram of the GitHub repository zla-artcc/vatis-profiles, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zla-artcc/vatis-profiles
- Repository: https://github.com/zla-artcc/vatis-profiles

## Overview

##### Project Overview
- This project is a specialized profile compilation tool for vATIS. It takes raw data stored in multiple .station files organized by TRACON/region (CTR, JCF, L30, SBA, SCT) and compiles them into standardized JSON profile files (both production and DEV versions).
- The tool includes two main Python scripts – one for generating production profiles (compiler.py) and another for DEV/test profiles (devcompiler.py).

##### Main Components
a. Input Data:
- The “stations” directory containing subdirectories (CTR, JCF, L30, SBA, SCT).
- Each subdirectory has individual .station files which hold station-specific data.
b. Compilation Engine:
- "compiler.py": Reads all relevant .station files and produces non-DEV, auto-updating JSON files (e.g., vATIS-Profile-ZLA.json, vATIS-Profile-ZLA-2.json, vATIS-Profile-ZLA-Static.json).
- "devcompiler.py": Reads the same or similar inputs for generating DEV test profile JSON files (e.g., vATIS-Profile-DEV-ZLA.json, vATIS-Profile-DEV-SCT.json).
c. Output Artifacts:
- JSON files such as vATIS-Profile-DEV-SCT.json, vATIS-Profile-DEV-ZLA.json, and others which are then used by vATIS systems.
d. Versioning and Contribution Process:
- The README instructs contributors to edit the .station files and not the JSON outputs. This highlights the importance of the raw data and how the compilers process that data.

##### Relationships and Interactions
- The compiler (both production and DEV versions) will have input dependencies on the stations’ data and then output the consolidated JSON profiles.

##### Architectural Patterns and Design Principles
- Design is file-based and script-driven – a simple pipeline: raw files → compiler processing → JSON outputs.
- Separation of concerns is visible by having separate scripts for DEV and production profiles.
- Emphasis on auto-updating for certain profiles indicates that the system is designed for dynamic content updates through periodic (or triggered) compilation.

##### Technologies and Tools
- Python for compiler scripts.
- JSON for data output formats.
- The project is version controlled (with .gitignore present) on GitHub.
- The file organization within stations indicates a modular approach by geographical regions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Input Layer
    subgraph "Input Layer"
        A["Stations Data (CTR, JCF, L30, SBA, SCT)"]:::input
    end

    %% Production Pipeline
    subgraph "Production Pipeline"
        B["Compiler Engine (compiler.py)"]:::process
        P1["vATIS-Profile-ZLA.json"]:::output
        P2["vATIS-Profile-ZLA-2.json"]:::output
        P3["vATIS-Profile-ZLA-Static.json"]:::output
        P4["vATIS-Profile-JCF.json"]:::output
        P5["vATIS-Profile-L30.json"]:::output
        P6["vATIS-Profile-SBA.json"]:::output
        P7["vATIS-Profile-SCT.json"]:::output
    end

    %% DEV Pipeline
    subgraph "DEV Pipeline"
        C["Dev Compiler Engine (devcompiler.py)"]:::process
        D1["vATIS-Profile-DEV-ZLA.json"]:::output
        D2["vATIS-Profile-DEV-SCT.json"]:::output
    end

    %% Version Control and Contribution Guidelines
    subgraph "Version Control and Contribution"
        V1["README.md"]:::misc
        V2[".gitignore"]:::misc
    end

    %% Data Flow
    A -->|"feeds"| B
    A -->|"feeds"| C
    B -->|"generates"| P1
    B -->|"generates"| P2
    B -->|"generates"| P3
    B -->|"generates"| P4
    B -->|"generates"| P5
    B -->|"generates"| P6
    B -->|"generates"| P7
    C -->|"generates"| D1
    C -->|"generates"| D2

    %% Contribution Guidelines influence raw data
    V1 -->|"guide_editing"| A
    V2 -->|"guide_editing"| A

    %% Click Events
    click A "https://github.com/zla-artcc/vatis-profiles/tree/main/stations/"
    click B "https://github.com/zla-artcc/vatis-profiles/blob/main/compiler.py"
    click C "https://github.com/zla-artcc/vatis-profiles/blob/main/devcompiler.py"
    click P1 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-ZLA.json"
    click P2 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-ZLA-2.json"
    click P3 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-ZLA-Static.json"
    click P4 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-JCF.json"
    click P5 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-L30.json"
    click P6 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-SBA.json"
    click P7 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-SCT.json"
    click D1 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-DEV-ZLA.json"
    click D2 "https://github.com/zla-artcc/vatis-profiles/blob/main/vATIS-Profile-DEV-SCT.json"
    click V1 "https://github.com/zla-artcc/vatis-profiles/blob/main/README.md"
    click V2 "https://github.com/zla-artcc/vatis-profiles/blob/main/.gitignore"

    %% Styles
    classDef input fill:#ffefba,stroke:#333,stroke-width:2px;
    classDef process fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef output fill:#d4edda,stroke:#333,stroke-width:2px;
    classDef misc fill:#f8d7da,stroke:#333,stroke-width:2px;
```
