# jaremko/archerbc2 architecture

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

- Interactive diagram: https://gitdiagram.com/jaremko/archerbc2
- Repository: https://github.com/jaremko/archerbc2

## Overview

##### Main Components Identification

The system can be broken down into these key components:

a. User Interface Layer
- Located in src/tvt/a7/profedit/frames.clj and related UI files
- Uses Seesaw library for Swing-based GUI components
- Multiple themes/skins support (resources/skins/)
- Internationalization support (loc/ directory)

b. Core Business Logic
- Ballistic calculations (src/tvt/a7/profedit/ballistic.clj)
- Profile management (src/tvt/a7/profedit/profile.clj)
- Configuration handling (src/tvt/a7/profedit/config.clj)

c. Data Management
- File I/O operations (src/tvt/a7/profedit/fio.clj)
- Data format conversion (src/tvt/a7/profedit/rosetta.clj)
- Protocol buffers integration (resources/proto/profedit.proto)

d. Utility Services
- Logging system (src/tvt/a7/profedit/fulog.clj)
- Update mechanism (src/tvt/a7/profedit/update.clj)
- Calculator functions (src/tvt/a7/profedit/calc.clj)

**[User Interface Layer]**
- ↑↓
**[Application Layer]**
- ↑↓
**[Core Services Layer]**
- ↑↓
**[Data Access Layer]**

##### Component Relationships

Key interactions:
- UI Layer → Application Layer (user input handling)
- Application Layer → Core Services (business logic processing)
- Core Services → Data Access (profile storage/retrieval)
- Cross-cutting concerns like logging and configuration

##### Additional Details

- External library dependencies (shown in lib/ directory)
- Configuration files and resources
- Build and deployment artifacts

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef ui fill:#b3d1ff,stroke:#333
    classDef core fill:#90EE90,stroke:#333
    classDef data fill:#FFE5B4,stroke:#333
    classDef util fill:#D3D3D3,stroke:#333

    %% User Interface Layer
    subgraph UI
        MainUI["Main UI Framework"]:::ui
        Themes["Theme System"]:::ui
        I18n["Internationalization"]:::ui
        UIActions["UI Actions"]:::ui
        UIWidgets["UI Widgets"]:::ui
    end

    %% Core Business Logic Layer
    subgraph Core
        Ballistic["Ballistic Calculations"]:::core
        Profile["Profile Management"]:::core
        Config["Configuration Handler"]:::core
        Distance["Distance Calculations"]:::core
    end

    %% Data Management Layer
    subgraph Data
        FileIO["File I/O Operations"]:::data
        DataConv["Data Format Conversion"]:::data
        ProtoBuf["Protocol Buffer Definitions"]:::data
    end

    %% Utility Services Layer
    subgraph Utils
        Logger["Logging System"]:::util
        Updater["Update Mechanism"]:::util
        Calc["Calculator Functions"]:::util
        Util["Utility Functions"]:::util
    end

    %% Relationships
    MainUI --> UIActions
    MainUI --> UIWidgets
    MainUI --> Themes
    MainUI --> I18n
    
    UIActions --> Profile
    UIActions --> Ballistic
    
    Profile --> FileIO
    Profile --> DataConv
    
    Ballistic --> Distance
    Ballistic --> Calc
    
    FileIO --> ProtoBuf
    FileIO --> Logger
    
    Config --> FileIO
    Updater --> FileIO
    
    %% Click Events
    click MainUI "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/frames.clj"
    click Themes "https://github.com/jAremko/archerbc2/tree/main/resources/skins/"
    click I18n "https://github.com/jAremko/archerbc2/tree/main/loc/"
    click UIActions "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/actions.clj"
    click UIWidgets "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/widgets.clj"
    click Ballistic "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/ballistic.clj"
    click Profile "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/profile.clj"
    click Config "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/config.clj"
    click Distance "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/distances.clj"
    click FileIO "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/fio.clj"
    click DataConv "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/rosetta.clj"
    click ProtoBuf "https://github.com/jAremko/archerbc2/blob/main/resources/proto/profedit.proto"
    click Logger "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/fulog.clj"
    click Updater "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/update.clj"
    click Calc "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/calc.clj"
    click Util "https://github.com/jAremko/archerbc2/blob/main/src/tvt/a7/profedit/util.clj"

    %% Legend
    subgraph Legend
        UI_L["UI Components"]:::ui
        Core_L["Core Components"]:::core
        Data_L["Data Components"]:::data
        Util_L["Utility Components"]:::util
    end
```
