Share business logic across
Front-End: Android, iOS, Web
Back-End: JVM, NodeJS, Go
You can write your Data / Logic / Framework layer in Kotlin Multiplatform using this. It will let you build your UI and Server layers independently of business logic.
- Create Spec(Interface) and Model classes in TypeScript
- Create Kotlin modules which access Platform APIs and expose configurable APIs
- Create a Bifrost module which allows easy use from RN, and facilitates gradle, turbo modules, etc
Both in (JVM / JS) and (Android / iOS / JS) to share all non UI logic
Plan is to create a Myntra Framework layer to abstract out android / iOS / web / server This would accelerate creating new apps here Analytics, Database, Networking, etc would be common and configurable (micro frontends)
We use Hermes and pure Turbo Modules
Library and plugin to ease out Turbo Module interop
Babel replacement plugin to directly replace TurboModules in RNW with Kotlin/JS
Common model classes exposed through Kotlin/JS, Kotlin/JVM (and gobind)
Use Zipline to modify some client logic ondemand without app deploys
- Cache Module
- LRU ( In Memory / File Based ) Cache
- Key Value Stores ( DataStore, CoreData, IndexedDB )
- Relational Database ( SQLite, SQL.js with IndexedDB backend )
- Bifrost ( Plugin to make this available for clients to use )
- Android / iOS by default behaviour
- Gradle Webpack task for connecting from Web with TypeScript
- React Native Turbo Module connector
- Flutter Channel based connector
Normal / Coroutine based Least Recently Used Cache. (Study a good LRU library) Meant to be configurable at-least:
- Cache size in items and length
- CRUD Storage interface ( file, database, network )
- Try to copy some items from how service workers work
RelationalInterface - none for web initially
KeyValueInterface
JSI - github repo
KV - possible for 3, easier
SQL - possible for 2, 1 with hack
LRU - pure code
Current Status
SQLDelight working on all 3 platforms (including web, but in memory right now)
It is possible to send over simple data types both directly as well as a promise from a Turbo Module. ( Simple Data + TurboObject + TurboArray + TurboPromise )
We can write a small extension function which can interconvert between the types.
A simple gradle bifrost plugin which would connect KMM to React Native easily
A KMM Starter with RN Turbo Module support