An open API service indexing awesome lists of open source software.

https://github.com/kwabenberko/currency-converter

An Offline-First Currency Converter For Android and iOS Built With Kotlin Multiplatform 
https://github.com/kwabenberko/currency-converter

android ios kotlin kotlin-multiplatform kotlin-multiplatform-mobile kotlin-native ktor ktor-client swiftui

Last synced: 27 days ago
JSON representation

An Offline-First Currency Converter For Android and iOS Built With Kotlin Multiplatform 

Awesome Lists containing this project

README

        

## Currency Converter ![](https://github.com/KwabenBerko/Currency-Converter/actions/workflows/master.yml/badge.svg)

An Offline-First Currency Converter Built With Kotlin Multiplatform. The main aim of this project was to help improve my knowledge in Kotlin Multiplatform(A framework for sharing code across both IOS and Android), ATDD(Acceptance Test Driven Development) and Clean Architecture.

| Android | iOS |
|------------------------------------------------|--------------------------------------------|
| | |

The UI design for this project was inspired by a design created
by [Oleg Frolov](https://dribbble.com/Volorf). You can find the original
design [here](https://dribbble.com/shots/3667983-Currency-converter).

## Acceptance Criteria

#### Scenario: Sync currencies

Given the following currencies

| Currencies |
|----------------------|
| United States Dollar |
| Ghanaian Cedi |
| Nigerian Naira |

And the following currency rates

| baseCurrency | targetCurrency | rate |
|----------------------|----------------|------------|
| United States Dollar | Ghanaian Cedi | 10.015024 |
| United States Dollar | Nigerian Naira | 422.990183 |

When a user syncs currencies
Then the sync should be successful
And the user should see all currencies
And the user should see `` as the rate for `` to ``

Examples:

| baseCurrency | targetCurrency | rate |
|----------------------|----------------------|------------|
| United States Dollar | Ghanaian Cedi | 10.015024 |
| Ghanaian Cedi | United States Dollar | 0.09985 |
| United States Dollar | Nigerian Naira | 422.990183 |
| Nigerian Naira | United States Dollar | 0.002364 |
| Ghanaian Cedi | Nigerian Naira | 42.235564 |
| Nigerian Naira | Ghanaian Cedi | 0.023677 |

#### Scenario: Convert amounts from base to target currencies

Given the following currency rates

| baseCurrency | targetCurrency | rate |
|----------------------|----------------------|-----------|
| United States Dollar | Ghanaian Cedi | 10.015024 |
| Ghanaian Cedi | Nigerian Naira | 42.235564 |
| Nigerian Naira | British Pound | 0.002041 |
| Euro | United States Dollar | 1.007097 |

When a user converts from `` to `` with an amount of ``
Then the user should have a converted amount of ``

##### Examples:

| baseCurrency | targetCurrency | amount | convertedAmount |
|----------------------|----------------------|--------|-----------------|
| United States Dollar | Ghanaian Cedi | 50 | 500.75 |
| Ghanaian Cedi | Nigerian Naira | 2000 | 84471.13 |
| Nigerian Naira | British Pound | 1 | 0.0020 |
| Euro | United States Dollar | 900 | 906.39 |

#### Scenario: Get currencies available to the user in a sorted order

Given the following currencies

| Currencies |
|----------------------|
| United States Dollar |
| Ghanaian Cedi |
| Nigerian Naira |

When a user retrieves all currencies
Then the user should see all currencies in a sorted order

#### Scenario: Search currencies

Given the following currencies

| Currencies |
|----------------------|
| United States Dollar |
| Ghanaian Cedi |
| Nigerian Naira |

When a user retrieves currencies with a name filter of ``
Then the user should see `` in a sorted order

Examples:

| filter | filteredCurrencies |
|--------|-----------------------------------------------------|
| e | Ghanaian Cedi, Nigerian Naira, United States Dollar |
| g | Ghanaian Cedi, Nigerian Naira |
| GHS | Ghanaian Cedi |
| Ghana | Ghanaian Cedi |
| naira | Nigerian Naira |
| $ | United States Dollar |

#### Scenario: Get GHS and USD as default base and target currencies respectively

Given the following currencies

| Currencies |
|----------------------|
| United States Dollar |
| Ghanaian Cedi |
| Nigerian Naira |

When a user gets default currencies
Then the user should have a default base currency of United States Dollar and a default target
currency of Ghanaian Cedi

#### Scenario: Keep track of default base and target currencies during conversions

Given the following currencies

| Currencies |
|----------------------|
| United States Dollar |
| Ghanaian Cedi |
| Nigerian Naira |
| British Pound |
| Euro |

And a user has converted an amount from `` to ``
When the user get default currencies
Then the user should have a default base currency of `` and a default target currency
of ``

Examples:

| baseCurrency | targetCurrency |
|----------------------|----------------------|
| United States Dollar | Ghanaian Cedi |
| Ghanaian Cedi | Nigerian Naira |
| Nigerian Naira | British Pound |
| Euro | United States Dollar |