Giter Club home page Giter Club logo

multiplatform-payments-fe's Introduction

Multiplatform Ktor Repository Module

kotlin-version

Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear OS, Compose for Desktop, Compose for Web, and Kotlin/JS + React clients along with Ktor backend. Currently running on

  • Android (Jetpack Compose)
  • iOS (Compose for iOS - experimental support!)
  • Web (Kotlin/JS + React Wrapper)

Overview

This Project provides Repository Layers that uses Ktor under the hood to provide networking and can be used in Web, iOS and Android platforms

Table of Contents

Features

The repo provides ApiGeeInteractor that does Authentication. Under the hood it calls PaymentsRepository

This repo currently is only a showcase for making only one API.

TODO: Make Generic Interactor that can work for all rest apis.

ALl three platform require some data by the library

host is needed only if you have same host for all apis

clientId and clientSecret are needed if you have Oauth call to get Token. If this data is given Repo layer will take care to token generation and expiry.

JS Platform

Use AppDependenciesContext and provide necessary data to Library

val appConfig = AppConfig(
            host = "",
            clientId = "",
            clientSecret = "")
        AppDependenciesContext.Provider(AppDependencies(appConfig)) {
            child(App)
        }

Android

Call initKoin in Android Apps Application class or in any component during app launch time.

initKoin ({
            androidLogger()
            modules(androidAppModule)
            // TODO provide valid host, clientID and clientSecret
        }, AppConfig("", "", ""))

iOS

@main
struct iOSApp: App {
    init() {
        HelperKt.doInitKoin()
    }
	var body: some Scene {
		WindowGroup {
			ContentView()
		}
	}
}

Getting Started

TODO

Prerequisites

Installation

# Clone the repository
git clone https://github.com/khalid64927/multiplatform-payments-fe.git

# Change into the project directory
cd multiplatform-payments-fe

# Build and run the project
./gradlew build

## Usage
Android

```bash
./gradlew :androidApp:installDebug

iOS

./gradlew :iosApp:installDebug

Web run below command to see demo JS app

./gradlew :web:browserDevelopmentRun

App will open your default web browser and load the page. Now open Web Developer tools and observe console logs you should see as below for successful authenticate call (remember to provide AppConfig values)

plot

run below command to see demo JS app to see instant changes you make

./gradlew :web:browserDevelopmentRun --continuous

To generate npm binary from shared module

./gradlew shared:packJsPackage

Libraries

Contributing

TODO

License

TODO

Changelog

TODO

Acknowledgments

multiplatform-payments-fe's People

Contributors

khalid64927 avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

multiplatform-payments-fe's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency co.touchlab:kermit to v2.0.3
  • Update dependency io.kotest:kotest-assertions-core to v5.8.1
  • Update kotlin monorepo to v1.9.23 (org.jetbrains.kotlin.plugin.serialization, org.jetbrains.kotlin.native.cocoapods, org.jetbrains.kotlin.multiplatform, org.jetbrains.kotlin.android, org.jetbrains.kotlin:kotlin-test, org.jetbrains.kotlin:kotlin-stdlib-js)
  • Update dependency androidx.compose.material3:material3 to v1.2.1
  • Update dependency app.cash.turbine:turbine to v1.1.0
  • Update dependency gradle to v8.7
  • Update org.jetbrains.kotlinx.coroutines.core.version to v1.8.0 (org.jetbrains.kotlinx:kotlinx-coroutines-test, org.jetbrains.kotlinx:kotlinx-coroutines-core, org.jetbrains.kotlinx:kotlinx-coroutines-android)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cocoapods
iosApp/Podfile
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
androidApp/build.gradle.kts
gradle/libs.versions.toml
  • org.jetbrains.kotlin:kotlin-stdlib-js 1.9.22
  • org.jetbrains.kotlin:kotlin-test 1.9.22
  • androidx.activity:activity-compose 1.8.2
  • androidx.compose.ui:ui 1.5.4
  • androidx.compose.ui:ui-tooling 1.5.4
  • androidx.compose.ui:ui-tooling-preview 1.5.4
  • androidx.compose.foundation:foundation 1.5.4
  • androidx.compose.material3:material3 1.1.2
  • io.ktor:ktor-client-android 2.3.7
  • io.ktor:ktor-client-okhttp 2.3.7
  • io.ktor:ktor-client-content-negotiation 2.3.7
  • io.ktor:ktor-client-core 2.3.7
  • io.ktor:ktor-client-logging 2.3.7
  • io.ktor:ktor-client-darwin 2.3.7
  • io.ktor:ktor-client-resources 2.3.7
  • io.ktor:ktor-serialization-kotlinx-json 2.3.7
  • io.ktor:ktor-client-auth 2.3.7
  • io.ktor:ktor-client-js 2.3.7
  • org.jetbrains.kotlinx:kotlinx-html-js 0.7.3
  • co.touchlab:kermit 2.0.2
  • io.kotest:kotest-assertions-core 5.8.0
  • app.cash.turbine:turbine 1.0.0
  • org.jetbrains.kotlinx:kotlinx-serialization-json 1.9.22
  • io.insert-koin:koin-android 3.5.3
  • io.insert-koin:koin-core 3.5.3
  • io.insert-koin:koin-test 3.5.3
  • io.insert-koin:koin-test-junit4 3.5.3
  • org.jetbrains.kotlinx:kotlinx-datetime 0.5.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-android 1.7.3
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.7.3
  • org.jetbrains.kotlin-wrappers:kotlin-react 17.0.2-pre.201-kotlin-1.5.0
  • org.jetbrains.kotlin-wrappers:kotlin-react-dom 17.0.2-pre.201-kotlin-1.5.0
  • org.jetbrains.kotlin-wrappers:kotlin-react-router-dom 5.2.0-pre.201-kotlin-1.5.0
  • org.jetbrains.kotlin-wrappers:kotlin-styled 5.3.0-pre.201-kotlin-1.5.0
  • com.android.application 8.3.0-beta01
  • com.android.library 8.3.0-beta01
  • org.jetbrains.kotlin.android 1.9.22
  • org.jetbrains.kotlin.multiplatform 1.9.22
  • org.jetbrains.kotlin.native.cocoapods 1.9.22
  • org.jetbrains.kotlin.plugin.serialization 1.9.22
  • dev.petuska.npm.publish 3.4.2
  • com.diffplug.spotless:spotless-plugin-gradle 6.23.3
shared/build.gradle.kts
web/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.5

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.