Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Oztechan/CCC
💰 Currency Converter Calculator for Android, iOS and Backend with power of Kotlin Multiplatform :muscle:
https://github.com/Oztechan/CCC
android buildsrc combine coroutines ios kmp kotlin kotlin-dsl kotlin-multi-platform kotlin-multiplatform kotlin-multiplatform-mobile ktor multimodule multiplatform mvvm sqldelight stateflow submodules swiftui viewbinding
Last synced: 3 months ago
JSON representation
💰 Currency Converter Calculator for Android, iOS and Backend with power of Kotlin Multiplatform :muscle:
- Host: GitHub
- URL: https://github.com/Oztechan/CCC
- Owner: Oztechan
- License: apache-2.0
- Created: 2017-09-06T16:39:51.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2024-10-29T22:32:16.000Z (3 months ago)
- Last Synced: 2024-10-30T00:45:01.447Z (3 months ago)
- Topics: android, buildsrc, combine, coroutines, ios, kmp, kotlin, kotlin-dsl, kotlin-multi-platform, kotlin-multiplatform, kotlin-multiplatform-mobile, ktor, multimodule, multiplatform, mvvm, sqldelight, stateflow, submodules, swiftui, viewbinding
- Language: Kotlin
- Homepage:
- Size: 53.2 MB
- Stars: 332
- Watchers: 9
- Forks: 30
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Currency Converter & Calculator
A currency converter application for most of the currencies used in the world.
You can quickly convert and make mathematical operations between currencies.
## Modularization
```mermaid
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` and `backend` are app modules that contains platform only codes
- `client` is a KMM module that shared between `ios` and `android`.
- `common` is a KMP modules that shared between all the platforms (`android`, `ios` and `backend`)
- `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## How to clone
The project uses submodules, please clone it as below:
```shell
git clone https://github.com/CurrencyConverterCalculator/CCC.git &&
cd CCC &&
git submodule update --init --recursive
```Submodules:
- [LogMob](https://github.com/SubMob/LogMob) KMP logging library with Crashlytics support
- [ScopeMob](https://github.com/SubMob/ScopeMob) Useful set of Kotlin scope functions with KMP support
- [BaseMob](https://github.com/SubMob/BaseMob) Android base classes
- [ParserMob](https://github.com/SubMob/ParserMob) KMP parsing library## How to run
Be sure that you have latest Android Studio Canary build installed and XCode 13.0 or later.
### Android
Open CCC folder with Android Studio and select `android:app` from configurations and run
### iOS
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.
### Backend
```shell
./gradlew :backend:run
```## Testing
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;
```kotlin
override suspend fun getConversion(base: String): ExchangeRate = client.get {
url {
takeFrom("https://gist.githubusercontent.com/mustafaozhan/fa6d05e65919085f871adc825accea46/raw/d3bf3a7771e872e0c39541fe23b4058f4ae24c41/response.json")
}
}.body()
```## Architecture
```mermaid
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
```## Android Preview
## iOS Preview
## Included Currencies
[![currencies.png](https://github.com/CurrencyConverterCalculator/CCC/raw/develop/art/currencies.png)](https://github.com/CurrencyConverterCalculator/CCC/raw/develop/art/currencies.png)
## License
```text
Copyright 2017 Mustafa OzhanLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```