-
Notifications
You must be signed in to change notification settings - Fork 28
[Demo] Local-only supabase todo app #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@kobiebotha @stevensJourney I've updated the readme, schema comment about switching, and allowed the app to work without specifying credentials in which case login/sign up is disabled. |
Good work! Much needed for a seamless experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Hey @guillempuche, a JS/TS version is on the one in the coming weeks too. |
…ging the local and online prefixes.
There is currently a bug where if the user logs in immediately without creating data, existing data doesn't sync down. Edit: The issue pertains to the .connect() in powersync.dart resolving too early and watch() breaking when logging in without having any local table entries during the switch from local-only to synced mode. |
8ec2134
to
26e5455
Compare
# Conflicts: # demos/django-todolist/pubspec.lock # demos/supabase-anonymous-auth/pubspec.lock # demos/supabase-edge-function-auth/pubspec.lock # demos/supabase-simple-chat/pubspec.lock # demos/supabase-todolist-drift/pubspec.lock # demos/supabase-todolist-drift/pubspec.yaml # demos/supabase-todolist/pubspec.lock # demos/supabase-todolist/pubspec.yaml
I'm ready for Typescript! |
This adds a demo project that aims to demonstrate how an app could be built starting from a local-only state and later being "upgraded" to a version that has sync capabilities. It started off as a copy of the existing todo app that was stripped of some of the features. The biggest changes are in
powersync.dart
, login/signup views, andmodels/schema.dart
(which illustrates how to update the schema to supporting syncing).The readme has a basic description of how everything works, with a small mermaid diagram to show how the app switches from the local-only mode to sync mode.