# Getting Started

## What This Project Does

This project is a Java currency converter that fetches live exchange rates from [ExchangeRate-API](https://www.exchangerate-api.com) and converts values between currencies. It is built as a small Maven application with a minimal dependency set, so most of the codebase is focused on rate retrieval, conversion logic, and the user-facing entry point.

## Recommended Reading Order

1. **Start here:** this guide to understand the project layout and where the important files live.
2. **Then read:** [README.md](README.md) for the original usage notes and runtime expectations.
3. **Next inspect:** [src/main/resources/config.properties](src/main/resources/config.properties) to see how the API key is supplied.
4. **Finally open:** the main application entry point, referenced in the README as [CurrencyConverter.java](src/main/java/com/github/blaxk3/converter). If you are looking for the primary runtime behavior, that is the best place to begin.

## Key Entry Points

The repository metadata does not expose a large class graph, so the first places to understand are the project-level entry points and config files:

- [CurrencyConverter.java](src/main/java/com/github/blaxk3/converter) — the main application entry point called out in the README.
- [src/main/resources/config.properties](src/main/resources/config.properties) — holds the API key used by the converter.
- [pom.xml](pom.xml) — defines the build, Java version, and external dependencies.

## Project Structure

The repository is intentionally small:

- `src/main/java/` — Java source code for the application.
- `src/main/resources/` — runtime resources such as configuration and icons.
- `src/main/resources/config.properties` — local configuration for the ExchangeRate-API key.
- `src/main/resources/icon/` — bundled image assets.
- `pom.xml` — Maven build definition.
- `README.md` — brief usage notes and setup instructions.

When you are new to the codebase, read from the app entry point outward: start with the main converter class, then follow any helper classes it uses for API access, parsing, and conversion.

## Configuration

Two files matter most when getting the app running:

- [pom.xml](pom.xml) sets the project to **Java 23** and includes:
  - `gson` for JSON parsing
  - `slf4j-api` and `slf4j-simple` for logging
- [src/main/resources/config.properties](src/main/resources/config.properties) stores `API_KEY`, which must be replaced with your own key from ExchangeRate-API.

If the app fails to fetch rates, check `API_KEY` first.

## Common Patterns

This codebase follows a lightweight application style:

- **Configuration in resources** — runtime secrets and settings are loaded from `config.properties`.
- **External API integration** — exchange rates come from a third-party service, so network and response-handling code are core to the app.
- **Minimal dependency footprint** — the project uses only a small set of libraries, so much of the logic is likely custom rather than framework-driven.
- **Straightforward entry-point flow** — expect the main class to orchestrate input, rate lookup, conversion, and output in one place.

## Where to Go Next

After you understand the entry point and configuration, trace the code path for:

1. loading the API key,
2. calling the exchange-rate service,
3. parsing the response,
4. applying the conversion formula,
5. displaying the result.

That sequence will give you the fastest mental model of the application.
