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
-
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.
-
composeApp: The compose application demo using macao-sdk-koin arch.
-
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. -
flavor-theme-a: A module that provides specific styles and assets for a demonstration of what would be the KMP equivalent of Android flavors.
-
flavor-theme-b: A different module providing styles and assets for the Android flavors equivalent demonstration.
-
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:
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.
-
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.
![](https://private-user-images.githubusercontent.com/5303301/335039470-99efccca-8f13-4b1b-a7df-29538f26872a.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI5NjgxNDEsIm5iZiI6MTcyMjk2Nzg0MSwicGF0aCI6Ii81MzAzMzAxLzMzNTAzOTQ3MC05OWVmY2NjYS04ZjEzLTRiMWItYTdkZi0yOTUzOGYyNjg3MmEuZ2lmP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MDZUMTgxMDQxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTUxNjY5ZDJmMjg3Y2ExZTdlNTUwNDg1MDBhYWU1OWRjNmMxZjI0MWMyNzA5OTQ5ZTk5NzA2ZThlZDNjMjM3OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.pVjKRiXM0U8zoZ_WttI3h3YnItAA3Y4LnUFPVj-IrMk)
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.