This is a demo of a chat app using Compose Multiplatform, Koin and supabase-kt.
Available platforms: Android, iOS, Desktop, JS Canvas
Modules used: Realtime, Auth*, Postgrest, Compose Auth UI
- Integrated flows: Password, Google login & password recovery
firefox_HOcnZjjRpE.mp4
To run the app, you need to create a Supabase project and create a table called messages
with the following columns:
Then you need to specify your Supabase url and key in supabaseModule.kt
If you want Google login to work, set it up in the Supabase dashboard and add io.jan.supabase://login
to the registered urls.
To run the app, you need to run the following commands in the root directory of the project:
./gradlew :sample:chat-demo-mpp:desktop:runDistributable (Desktop)
./gradlew :sample:chat-demo-mpp:web:jsBrowserDevelopmentRun (JS Canvas)
For android, use the IDE to run the app.
Set up with XCode 15 and run the app on iOS 17
Open the project with workplace file (chatdemoios.xcworkspace
)
Open project settings
Go to Build phases
section, create New Run Script Phase with this value
cd "$SRCROOT/.."
./gradlew :sample:chat-demo-mpp:common:embedAndSignAppleFrameworkForXcode
Then move run script to be above Compile Sources
Switch to Build Settings
and set these values
-
Framework Search Paths -
$(SRCROOT)/../common/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)
-
Other linker flags -
$(inherited) -framework common
At this point, the app can be run either with Android Studio with iOS configuration or XCode