https://github.com/openmf/fineract-client-kmp
A Kotlin Multiplatform and Ktor based Fineract Client Library that you can use to interact with the Apache Fineract 1.x Platform.
https://github.com/openmf/fineract-client-kmp
fineract kmp kotlin ktor ktorfit
Last synced: about 2 months ago
JSON representation
A Kotlin Multiplatform and Ktor based Fineract Client Library that you can use to interact with the Apache Fineract 1.x Platform.
- Host: GitHub
- URL: https://github.com/openmf/fineract-client-kmp
- Owner: openMF
- License: mpl-2.0
- Created: 2024-09-12T18:10:38.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-04-21T17:54:01.000Z (about 2 months ago)
- Last Synced: 2025-04-26T22:48:57.703Z (about 2 months ago)
- Topics: fineract, kmp, kotlin, ktor, ktorfit
- Language: Kotlin
- Homepage:
- Size: 21.1 MB
- Stars: 1
- Watchers: 4
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fineract Client Kotlin Multiplatform
Fineract Client KMP is a Kotlin Multiplatform library built with Ktorfit that enables interaction with the Apache Fineract 1.x Platform. This library includes all necessary services and data payload models, along with a Ktorfit instance used by the [Fineract Client KMP SDK](https://github.com/openMF/fineract-client-kmp-sdk).
All services and payload models in this library are generated using the OpenAPI Generator. However, `FineractClient.kt` is not a generated file. it is responsible for creating the Ktorfit instance and serves as the entry point for accessing the services within the Fineract Client KMP SDK.




[](http://makeapullrequest.com)
[](https://github.com/openMF/fineract-client-kmp/tree/main)
[](https://github.com/openMF/fineract-client-kmp/releases/)
[](https://github.com/openMF/fineract-client-kmp/issues/)
[](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA)## Architecture
The library is organized into three main packages inside the fineract-client module:
- models - Contains all the payloads, including request and response models for various services.
- apis - Includes all service interfaces, such as ClientService, AuthService, etc.
- infrastructure - Contains the [FineractClient.kt](https://github.com/openMF/fineract-client-kmp/blob/main/fineract-client/src/commonMain/kotlin/org/mifos/fineract/client/infrastructure/FineractClient.kt) file, which initializes the Ktorfit instance and exposes all services to the Fineract Client KMP SDK.
## Code Generation
- Follow these steps to generate data models and services using OpenAPI Tools:### Install OpenAPI Generator CLI
- Install NPM (Skip this step if you already have npm installed).
- Install OpenAPI Generator CLI using npm:
```cmd
npm install @openapitools/openapi-generator-cli -g
```### Download fineract.yml File
- Download the fineract.yml file from [Here](https://github.com/openMF/fineract-client-kmp/wiki/Download-fineract.yml-File)### Generation
- Once OpenAPI Generator CLI is installed, use the following command to generate the code:```cmd
openapi-generator-cli generate \
-i "C:\Users\Aditya\Downloads\fineract.yaml" \
-o "C:\Users\Aditya\Desktop\MIFOS\web-app\packages\fineract-client\src" \
-g kotlin \
--library=jvm-retrofit2 \
--additional-properties=useCoroutines=true,returnPlainBody=true \
--skip-validate-spec
```
- Replace `-i "C:\Users\Aditya\Downloads\fineract.yaml"` with the actual path to your fineract.yml file.- Note: Back in 2024, when these data models and services were generated, Ktorfit support was not available. So, we generated them using Retrofit2 and later modified the services to use Ktorfit. In the future, before generating the code, check whether Ktorfit support is available.
## Quickstart Setup
### Installation
Add dependency in the `build.gradle`.
- Kts
```kts
dependencies {
implementation("com.github.openMF:fineract-client-kmp:$version")
}
```- Groovy
```groovy
dependencies {
implementation 'com.github.openMF:fineract-client-kmp:$version'
}
```Add this in your root `settings.gradle`.
- Kts
```Kotlin
dependencyResolutionManagement {
repositories {
maven {
setUrl("https://jitpack.io")
}
}
}
```- Groovy
```groovy
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```## How to Contribute
Thank you for your interest in contributing to the Fineract Client KMP project by Mifos! We welcome all contributions and encourage you to follow these guidelines to ensure a smooth and efficient collaboration process.
To get started, please refer to the [Contribution Guide](https://github.com/openMF/fineract-client-kmp/wiki/How-to-Contribute) for detailed instructions on how to contribute to the project.## Wiki
Please visit our [Wiki](https://github.com/openMF/fineract-client-kmp/wiki) page for a detailed overview of the project's architecture and guidelines. Explore further to gain a deeper understanding of our project.
## Contributors
Special thanks to the incredible code contributors who continue to drive this project forward.