https://github.com/mmj-dev-git/currency-conversion
An exchange rates currency converter for Android using Kotlin following modern best practices
https://github.com/mmj-dev-git/currency-conversion
android clean-architecture currency-conversion currency-converter currency-exchange-rates currency-rates jetpack-compose kotlin mvvm open-exchange-rates
Last synced: 5 months ago
JSON representation
An exchange rates currency converter for Android using Kotlin following modern best practices
- Host: GitHub
- URL: https://github.com/mmj-dev-git/currency-conversion
- Owner: mmj-dev-git
- Created: 2025-02-19T17:58:26.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-02-19T18:46:30.000Z (10 months ago)
- Last Synced: 2025-07-01T11:54:59.995Z (5 months ago)
- Topics: android, clean-architecture, currency-conversion, currency-converter, currency-exchange-rates, currency-rates, jetpack-compose, kotlin, mvvm, open-exchange-rates
- Language: Kotlin
- Homepage:
- Size: 2.53 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Currency Conversion App Following Modern Best Practices
This app allows users to view a given amount in a selected currency, converted into other currencies using real-time exchange rates.
Check out the app's demo video:
[App Video Link](https://www.youtube.com/shorts/4Ee9whmzfxk)
## Build On
- **Kotlin version:** 2.0
- **Android Studio:** Ladybug
- **Runtime version:** 17.0.11+1-b1312.2 aarch64 (JCEF 122.1.9)
- **VM:** OpenJDK 64-Bit Server VM by JetBrains s.r.o.
## Functional Requirements
- Fetches exchange rates data from the free version of an exchange rates service.
- Perform the conversions on the app side if exchange rates for the selected currency are unavailable through Open Exchange Rates.
- Supports **offline mode**, allowing the app to be used after the data is fetched and persisted locally.
- The app refreshes the required data no more frequently than once every **30 minutes** to minimize bandwidth usage.
## User Interactions
The app's UI is built using **Jetpack Compose** and provides the following features:
- **Currency Amount Input:** The user can enter the amount they want to convert.
- **Currency Selection:** The user can select a currency from a list provided by Open Exchange Rates.
- **Converted Amount Display:** After selection, the app displays the desired amount converted into various currencies.
## Environment Configuration
The app uses the **Base URL** and **OpenExchange App ID** from the `env.secrets.json` file, located in the app directory, to make API requests.
## Testing
- **Unit Tests:** The project contains unit tests that ensure the correct operation of the app.
## Architecture
The app adopts the **MVVM** architecture, following the principles of **The Clean Architecture** and **S.O.L.I.D** to maintain a scalable, maintainable, and testable codebase.
## Libraries and Tools Used
The app uses the following libraries:
- **Kotlin Flow**
- **Coroutines**
- **ViewModel**
- **Jetpack Compose**
- **Dagger Hilt**
- **Retrofit**
- **Room**
- **JUnit**
- **Turbine**
- **Espresso**
**Note:** To run the project, add your Open Exchange `app_id` to `env.secret.json`.