GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - AndroidPoet/Material-Notes: ๐Ÿ““ Note taking app using MVVVM architecture with Hilt, Material Motion, Coroutines, Flow, Jetpack (Room, ViewModel)

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
androidApp
androidApp
 
 
art
art
 
 
core
core
 
 
desktopApp
desktopApp
 
 
feature
feature
 
 
gradle
gradle
 
 
iosApp
iosApp
 
 
shared
shared
 
 
supabase
supabase
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle.kts
build.gradle.kts
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle.kts
settings.gradle.kts
 
 

Repository files navigation

Material Notes

License API Platform
Kotlin Compose Multiplatform Navigation 3 DI Auth Sync

๐Ÿ“ Material Notes is a clean, Material 3 note-taking app built with Compose Multiplatform โ€” running on Android, iOS, and Desktop from a single shared, multi-module codebase, with Navigation 3, SQLDelight, Metro DI, Coroutines, Flow, email/Google/Apple sign-in and per-user cloud sync via a Supabase KMP SDK, and a card-to-detail shared-element transition based on MVVM architecture.

Material Notes demo

Tip

The same Compose UI and logic run natively on Android, iOS, and Desktop (JVM) โ€” split across :core and :feature Kotlin Multiplatform modules.

Running

  • Android โ€” ./gradlew :composeApp:assembleDebug, or run the composeApp configuration in Android Studio.
  • Desktop โ€” ./gradlew :composeApp:run
  • iOS โ€” open iosApp/iosApp.xcodeproj in Xcode, set your signing TEAM_ID in iosApp/Configuration/Config.xcconfig, pick a simulator, and run. The "Compile Kotlin Framework" build phase invokes Gradle to build the shared framework.

Tech stack & Open-source libraries

  • Minimum SDK level 24 ยท targets Android, iOS, and Desktop (JVM).
  • Kotlin based, with Coroutines and Flow for async streams.
  • Compose Multiplatform Libraries:
    • Compose Multiplatform โ€” declarative UI + Material 3.
    • Lifecycle & ViewModel โ€” org.jetbrains.androidx.lifecycle (multiplatform).
    • Navigation 3 โ€” NavDisplay + entryProvider with type-safe NavKey routes and entry-scoped ViewModels (org.jetbrains.androidx.navigation3).
    • SQLDelight โ€” typesafe SQL with platform drivers (Android / native / JDBC).
  • Supabase KMP SDK โ€” io.github.androidpoet:supabase-* โ€” email/Google/Apple auth (supabase-auth) plus per-user two-way cloud note sync (push + pull), offline-first.
  • Metro โ€” compile-time dependency injection (a Kotlin compiler plugin), wired across modules.
  • Architecture:
    • MVVM Architecture (View โ†’ ViewModel โ†’ Repository โ†’ SQLDelight queries).
    • Repository Pattern.
    • Multi-module: :core:data, :core:designsystem, :feature:*, :composeApp.
  • kotlinx-datetime โ€” multiplatform date/time formatting.
  • Shared-element transition โ€” SharedTransitionLayout + sharedBounds morph the note card into the detail screen (the AnimatedVisibilityScope comes from Nav3's LocalNavAnimatedContentScope).

Architecture

Material Notes follows MVVM across a multi-module Kotlin Multiplatform setup. Each module targets Android, Desktop (JVM), and iOS; the app shell assembles them and the Metro graph wires dependencies across module boundaries at compile time.

:composeApp          # App shell: App, AppNavHost (Nav3), Metro AppGraph, platform entry points
:core:data           # Note, MainRepository, SQLDelight schema + drivers (Android / native / JDBC)
:core:designsystem   # Theme, palette, icons, shared-element helpers, date util
:feature:auth        # AuthScreen (login / sign-up) + AuthViewModel
:feature:home        # HomeScreen + NotesViewModel
:feature:addnote     # AddNoteScreen + AddNoteViewModel
:feature:detail      # NoteDetailScreen + NoteDetailViewModel
iosApp/              # Xcode project (SwiftUI shell hosting the Compose UI)

Dependencies flow one way โ€” :composeApp โ†’ :feature:* โ†’ :core:* โ€” so the graph stays acyclic. Feature screens receive their ViewModel as a parameter; AppNavHost (which can see both the Metro graph and the screens) creates each entry-scoped ViewModel and passes it down. Each platform supplies a SQLDelight SqlDriver (:core:data/.../DatabaseDriver.*.kt) into buildAppGraph(driver, ioDispatcher). Because Metro validates the graph at compile time, a wiring mistake fails the build instead of crashing at runtime.

Auth + cloud sync (Supabase) โ€” live demo

This repo ships pointed at a real, live Supabase project, so you can clone, run, sign up, and watch your notes sync against the cloud with zero setup. It's a working showcase of AndroidPoet's Supabase KMP SDK end-to-end.

Sign in. On launch the app shows a login screen (:feature:auth). Create an account or sign in with email + password โ€” handled by supabase-auth via AuthService. Google (Android) and Apple (iOS/macOS) buttons are wired in and light up once their OAuth providers are enabled on the project.

Per-user sync. Notes live locally in SQLDelight and the app is fully usable offline. The Sync button in the home header does an explicit two-way sync: it upserts every local note up to the Supabase notes table, then pulls the table back down โ€” so a note saved on any device converges everywhere. Both directions are paged (batched upserts; a count-aware selectWithCount + PostgREST range walk on the pull) so the sync scales to a large notebook. Every request carries the signed-in user's JWT, and a user_id column + Row Level Security scope every row to its owner, so each account sees only its own notebook.

Security. The app uses only the project URL and the public anon key โ€” designed to ship in clients and constrained entirely by RLS (see supabase/schema.sql). The service_role key bypasses RLS and is never used in the client. Credentials are kept out of source control: they are read at build time from local.properties (or SUPABASE_URL / SUPABASE_ANON_KEY env vars) into a generated SupabaseSecrets (see core/data/build.gradle.kts). To run against your own project, add to local.properties:

supabase.url=https://YOUR-REF.supabase.co
supabase.anonKey=YOUR-ANON-KEY

and apply the schema with supabase db push (or paste supabase/schema.sql into the SQL Editor). Leave them unset and the app simply runs offline.

Note

Auth lives in :core:data under .../data/auth/ (AuthService, SessionStore, SocialAuthService) and the sync in .../data/sync/ (SupabaseConfig, SupabaseProvider, RemoteNote, NoteSyncService). A single auth-aware SupabaseProvider client feeds both, wired via Metro; the SessionStore flow gates navigation between the login screen and the notes app.

Version matrix

Kotlin 2.4.0 ยท Compose Multiplatform 1.11.1 ยท Navigation 3 1.1.0 ยท AGP 8.11.1 ยท SQLDelight 2.3.2 ยท Metro 1.2.0 ยท Supabase KMP 0.6.0 ยท Lifecycle (JB) 2.10.0 ยท Gradle 8.14 ยท JDK 21 (see gradle/libs.versions.toml).

Note

Toolchain notes. The Supabase KMP SDK 0.6.0 is built with Kotlin 2.4.0, so the app tracks the same toolchain: Kotlin 2.4.0 with Metro 1.2.0 (its Gradle plugin pins the Kotlin plugin to 2.4.x) and Compose Multiplatform 1.11.1. Metro requires JDK 21 + Gradle 8.13+ โ€” gradle/gradle-daemon-jvm.properties selects the JDK 21 toolchain automatically. On iOS, SQLDelight's native driver (SQLiter) needs the app to link -lsqlite3 (in OTHER_LDFLAGS), and CADisableMinimumFrameDurationOnPhone=true must be set in iosApp/iosApp/Info.plist. material-icons-extended is no longer published for CMP 1.8+, so the few icons used are hand-authored ImageVectors.

Contributing

Contributions are welcome! If you've found a bug, have an idea for an improvement, or want to contribute new features, please open an issue or submit a pull request.

Find this repository useful? โค๏ธ

Support it by joining stargazers for this repository. โญ
Also, follow me on GitHub for my next creations! ๐Ÿคฉ

License

Designed and developed by 2026 AndroidPoet (Ranbir Singh)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

๐Ÿ““ Note taking app using MVVVM architecture with Hilt, Material Motion, Coroutines, Flow, Jetpack (Room, ViewModel)

Topics

androidandroidpoetflowjetpackkotlinmaterialnotesmvvmmvvm-architecturemvvm-patternroom

Resources

Readme
Apache-2.0 license
Activity

Stars

23 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Sponsor this project

Packages

Contributors

Languages

You are visitor 01402503 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.