RubyLichtenstein / Kotlin-Multiplatform-Firebase

Kotlin Multiplatform - Android/iOS/Web/Node.Js(FIrebase)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kotlin Multiplatform Firebase.

Build Status Kotlin

Kotlin is everywhere!

This project demonstrates the benfits of kotlin multiplatform by implementating a multiplatform mobile application (Android/iOS) with firebase as a backend (Node.js) all in kotlin.

The application is using Firestore to store a list of posts and firebase functions to send notifications for new posts.

Modules.

  • common-all - Multiplatform Module - shared code between clients/server.
  • common-client - Multiplatform Module - shared code between clients (Android/iOS).
  • firebase - Node.Js app.
  • android - Android app.
  • iOS - iOS app.

modules_diagrams

Project Architecture

modules_diagrams

common-all

Clients/Server shared code.

  • Data Models.
  • Repositories.

common-client

Clients shared code.

  • Presenters.

Platform specific code.

  • Views.

Testing

Testing libraris

Common module testing. https://github.com/mockk/mockk

JVM

JS

Jest https://jestjs.io/

Native

//TODO

Build run and test.

Setup

  1. Clone this project.
  2. enable kotlin 1.3 (https://proandroiddev.com/setup-kotlin-eap-in-your-android-app-73f2c06308e5)
  • if you're using the canary version of Android Studio check if kotlin 1.3 plugin is enabled for your version

https://plugins.jetbrains.com/plugin/6954-kotlin

Running the Android app.

./gradlew android:app:installDebug

Running the iOS app.

//TODO

Running the Node.js App (deploy to Firebase)

  1. cd firebase/functions
  2. npm install
  3. ./gradlew common-all:firebaseDeploy

Testing the Node.js App.

  • ./gradlew common-all:firebaseTest

Libraries used in this project

common

About

Kotlin Multiplatform - Android/iOS/Web/Node.Js(FIrebase)

License:Apache License 2.0


Languages

Language:C++ 36.4%Language:C 31.4%Language:Objective-C 18.8%Language:JavaScript 10.5%Language:Kotlin 2.7%Language:Swift 0.2%Language:Ruby 0.0%Language:Groovy 0.0%