Skip to content

solita-michalguspiel/DevNotary

Repository files navigation

Dev Notary

  • Kotlin Multiplatform Mobile
  • MVVM with clean architecture
  • Firebase SDK
  • Firebase Authentication
  • SQL Delight
  • Kotlin corutines in shared module
  • Declarative UIs

Dev Notary is a simple application that lets developers create notes, documentations or memos and interact with them. Basic CRUD with addition of sharing the notes with other users. The functional requirements were simple:

  • Authentication
  • Managing a note: create, read, edit, delete, share
  • Restore notes
  • List, sort, search

Instruction

In order to run an app you need to provide firebase related files:

  • for Android: google-services.json
  • for iOS GoogleService-Info.plist

Both of them are generated by firebase.

Inspiration, educational resources

Since KMM community is still relatively slow and the internet isn't yet rich in tutorials and guides how to work with Kotlin Multiplatform Mobile I had to gain knowledge straight from KMM samples. In particular I've had analysed carefully https://github.com/MartinRajniak/CatViewerDemo and https://github.com/joreilly/MortyComposeKMM.

Application Demo

Running application Creating notes

Sharing note Sharing notes

Architecture

One of the goals of this application was to explore KMM and try to share as much code between platforms as it is possible. Since my stronger side is on Android Development, I've decided to develop this project with common for Android MVVM pattern. Additionally, I spiced it up with clean architecture. With a little help of ViewModel wrapper class on iOS side, everything turned out great. Wrapper class is essential because flows that are widely used in shared module can't be consumed in iOS app.

Architecture diagram

Libraries

Shared Module:

  • Firebase Kotlin SDK
  • SQL Delight
  • Kodein DI
  • Navigation Component
  • Multiplatform UUID
  • Kotlin Coroutines
  • KotlinX Datetime
  • Multiplatform Settings
  • KotlinX Serialization

Android:

  • Jetpack Compose
  • Accompanist

iOS

  • Swift UI

LOC:

Perhaps someone might be interested in actual code distribution between each module. I find it interesting that iOS app needs much less code than an Android application. However, code percentage is a little biased because there are UI test included in Android App. For Android and Shared modules only .kt files are counted. For iOS module only .swift files are counted.

Android:

2805

iOS:

1451

Shared KMM code:

2887

100% of code = 39.3% (Android App code) + 20.3% (iOS App code) + 40.4% (Shared KMM code)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published