Coder Social home page Coder Social logo

pablichjenkov / macao-marketplace Goto Github PK

View Code? Open in Web Editor NEW
27.0 1.0 2.0 664 KB

Server driven UI experiment

License: The Unlicense

Kotlin 97.62% Swift 1.96% HTML 0.09% JavaScript 0.33%
compose-multiplatform jetpack-compose server-driven-ui koin-mvvm server-side-ui kmp-app kmp-mvvm kmp-viewmodel sdui

macao-marketplace's Introduction

Macao Server UI

This repo is an experiment with server driven ui concepts. A remote server sends a json file which describe the hierarchy of components to render. The project relies on the Macao Components library. Such a library has the flexibility to extend functionality in existing components but also create custom ones.
The project also showcase an opinionated architecture to inject swift 3rd party library implementations

Modules

  1. macao-sdk-koin: The foundation to build an App that integrates koin and the Macao component-toolkit. It has already implemented an App startup flow including Koin module initializers and the basic scaffolding to inject pure swift implementations of Macao plugins.

  2. composeApp: The compose application demo using macao-sdk-koin arch.

  3. iOSDemoApp: Where the iOS app lives. This module consumes the ComposeApp.framework produced by composeApp as direct or local framework integration. Also this project is configured to use SPM as the dependency resolver.

  4. flavor-theme-a: A module that provides specific styles and assets for a demonstration of what would be the KMP equivalent of Android flavors.

  5. flavor-theme-b: A different module providing styles and assets for the Android flavors equivalent demonstration.

  6. auth-firebase: This module contains the abstractions to wrap the MacaoAccountPlugin with the Firebase swift SDK. The implementation lives in a hosted swift package located here:

    https://github.com/pablichjenkov/firebase-kmp/blob/main/FirebaseAuthKmp/Sources/FirebaseAuthKmpWrapperImpl.swift

    The local swift package iOSDemoAppPackage located in iOSDemoApp will declare FirebaseAuthKmp package as a dependency. So the hosted package will be pull down in the xcode build process to provide the swift actual implementation of auth-firebase abstractions.

  7. auth-supabase: Similar to auth-firebase, this module implements the MacaoAccountPlugin but in kotlin land. Since supabase supports KMP we don't have to inject swift code, everything is done in kotlin. It is used to demontrate how you can swap Macao Plugins implementations at build time, based on build configurations. The so called opinionated Plugin Architecture mentioned before.

To run the App locally it is required an API key and secret from Amadeus Travel company. Place the respective values in a local gradle.properties file or supply them as environment variable.

amadeus.apiKey=Your-Given-Amadeus-Api-Key
amadeus.apiSecret=Your-Given-Amadeus-Api-Secret

You will also need an account in firebase with firebase authorization product enabled. Place the google-services.json given by firebase, in the root directory of composeApp module.

Demo App

Contributions

We welcome contributions from the community! If you have ideas for new features, bug fixes, or improvements, please open an issue or submit a pull request.

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.