# Com / Github / Blaxk3 / Converter

## Overview

The `com.github.blaxk3.converter` package is the application entry point for the converter UI. It does not implement conversion logic itself; instead, it boots the Swing user interface on the Event Dispatch Thread so the rest of the application can start safely in a desktop UI context. In practice, this module appears to exist as a small launcher layer that hands control over to the UI package.

## Key Classes and Interfaces

### [CurrencyConverter](src/main/java/com/github/blaxk3/converter/CurrencyConverter.java:7)

`CurrencyConverter` is the only class in this package and serves as the executable entry point. Its job is intentionally narrow: when the application starts, it schedules creation of the UI with `SwingUtilities.invokeLater(...)`.

#### `main(String[] args)`

- **Purpose:** Starts the application.
- **Parameters:** `args` is the standard JVM command-line argument array, but this implementation does not inspect it.
- **Returns:** `void`.
- **Side effects:** Queues a new `UI` instance to be created on Swing's Event Dispatch Thread.
- **Why it matters:** Swing components should generally be created and manipulated on the EDT. This method ensures the UI starts in the correct threading context rather than constructing it directly on the main thread.

## How It Works

1. The JVM invokes `CurrencyConverter.main(...)` when the application is launched.
2. `main(...)` calls `SwingUtilities.invokeLater(UI::new)`.
3. Swing defers execution until the Event Dispatch Thread is ready.
4. The `UI` constructor runs, which likely initializes the visible converter interface and any related application state.

A simple view of the startup flow is shown below.

```mermaid
flowchart LR
A["CurrencyConverter"] --> B["SwingUtilities.invokeLater"]
B --> C["UI"]
```

## Data Model

This package does not define any domain entities, DTOs, or data structures of its own. Based on the available code, it is only responsible for launching the user interface and does not own conversion data or state.

## Dependencies and Integration

### Internal dependency

- [`com.github.blaxk3.ui.UI`](src/main/java/com/github/blaxk3/ui/UI.java) — the application UI that is instantiated at startup.

### Platform dependency

- `javax.swing.SwingUtilities` — used to schedule UI creation on the Swing Event Dispatch Thread.

This package acts as the bridge between the JVM entry point and the UI layer. It does not communicate with other modules directly beyond constructing the UI.

## Notes for Developers

- `CurrencyConverter` is intentionally minimal, so changes here should usually be limited to startup behavior.
- If you add initialization logic, keep Swing threading rules in mind and prefer to do UI setup through `SwingUtilities.invokeLater(...)` or other EDT-safe mechanisms.
- Because this class ignores command-line arguments, any future CLI configuration would need to be added explicitly.
- The package currently has no child modules, so any new converter-related functionality will likely need to live in sibling packages or be introduced here as additional startup wiring.
