A currency converter application for most of the currencies used in the world.
You can quickly convert and make mathematical operations between currencies.
graph TD;
ad-->android
billing-->android
BASEMOB --> android
test --> config
test --> client
test --> android
test --> res
test --> analytics
test --> backend
test --> common
PARSERMOB --> client
SCOPEMOB --> billing
SCOPEMOB --> android
SCOPEMOB --> client
config-->client
analytics-->client
analytics --> android
analytics --> provider
analytics --> ios
client-->android
client --> ios
client-->provider
provider --> ios
res-->android
res-->ios
LOGMOB --> ad
LOGMOB --> billing
LOGMOB --> android
LOGMOB --> provider
LOGMOB --> ios
LOGMOB --> client
LOGMOB --> config
LOGMOB --> test
LOGMOB --> common
LOGMOB --> backend
common-->client
common-->backend
LOGMOB{LOGMOB}
test{test}
analytics{analytics}
common{common}
client{client}
SCOPEMOB{SCOPEMOB}
config{config}
res{res}
PARSERMOB{PARSERMOB}
provider{provider}
ad
billing
BASEMOB
android(android)
ios(ios)
backend(backend)
graph TD;
target(target)
kmp_library{kmp_library}
KMP_SUBMODULE_LIBRARY{KMP_SUBMODULE_LIBRARY}
library
SUBMODULE_LIBRARY
graph TD;
client-->android(android)
client-->ios(ios)
common-->client
common-->backend(backend)
submodule{submodule}
test
All the modules in the project are grouped into 6 targets:
android
,ios
andbackend
are app modules that contains platform only codesclient
is a KMM module that shared betweenios
andandroid
.common
is a KMP modules that shared between all the platforms (android
,ios
andbackend
)submodule
these are different git repositories and can be used in any of these modules. (arrows are not shown for the sake of simplicity)test
contains test cases for architecture and coding conventions
The project uses submodules, please clone it as below:
git clone https://github.com/CurrencyConverterCalculator/CCC.git &&
cd CCC &&
git submodule update --init --recursive
Submodules:
- LogMob KMP logging library with Crashlytics support
- ScopeMob Useful set of Kotlin scope functions with KMP support
- BaseMob Android base classes
- ParserMob KMP parsing library
Be sure that you have latest Android Studio Canary build installed and XCode 13.0 or later.
Open CCC folder with Android Studio and select android:app
from configurations and run
Open CCC/ios/CCC.xcworkspace
with XCode after the packages are resolved you can run the project. Generally you should use the latest stable XCode version.
./gradlew :backend:run
After you run the app probably your all API calls will fail, it is expected since the private URLs are not shared publicly. If you want the test the app with real API calls, I have prepared a fake response. Please replace all the getConversion
methods in
com.oztechan.ccc.common.core.network.api.backend.BackendApiImpl
com.oztechan.ccc.common.core.network.api.premium.PremiumApiImpl
with below;
override suspend fun getConversion(base: String): ExchangeRate = client.get {
url {
takeFrom("https://gist.githubusercontent.com/mustafaozhan/fa6d05e65919085f871adc825accea46/raw/d3bf3a7771e872e0c39541fe23b4058f4ae24c41/response.json")
}
}.body()
graph TD;
subgraph Backend[Backend]
database(database) --> datasource
api(api) --> service
datasource --> Controller
service --> Controller
Controller --> App
end
subgraph Mobile[Mobile]
Persistence(Persistence) --> Storage
Database(Database) --> DataSource
API(API) --> Service
RemoteConfig(RemoteConfig) --> ConfigService
Storage --> ViewModel
DataSource --> ViewModel
Repository --> ViewModel
Storage --> Repository
DataSource --> Repository
Service --> Repository
ConfigService --> Repository
Service --> ViewModel
ConfigService --> ViewModel
ViewModel --> Views
end