Skip to content

Offline mode#1183

Open
rolandgeider wants to merge 224 commits into
masterfrom
feature/offline-mode
Open

Offline mode#1183
rolandgeider wants to merge 224 commits into
masterfrom
feature/offline-mode

Conversation

@rolandgeider
Copy link
Copy Markdown
Member

@rolandgeider rolandgeider commented Apr 23, 2026

Proposed Changes

Note: this needs a powersync service running additionally to the regular backend. The way this works is that you use a local sqlite database on the device and powersync takes care of making sure new entries are synced once you're connected to the internet again. Note that this doesn't make the whole application work offline, as some entries such as the routines need some backend logic that we don't want to replicate (also, this transparently and smoothly takes care of keeping the exercise db in sync). These parts are aware there is no network connectivity and won't endlessly try to fetch the data, so you can open your routine and go to the gym where there's no internet and log everything.

Also all providers were moved to riverpod since it made working with the new ones much easier and due to these refactors the PR should also get rid of all the weird loading bugs we had in the past.

Related Issue(s)

Offline mode
Closes #6 🥳
Closes #12

All kinds of miscellaneous "can't load x", "doesn't show y", "timeout at x" issues
Closes #51
Closes #548
Closes #558
Closes #577
Closes #722
Closes #861
Closes #867
Closes #881
Closes #936
Closes #983
Closes #1035
Closes #1054
Closes #1055
Closes #1063
Closes #1070
Closes #1089
Closes #1103
Closes #1114
Closes #1133
Closes #1147
Closes #1152
Closes #1163
Closes #1193
Closes #1199

Needs backend wger-project/wger#1747

This is now handled automatically by powersync
If the user is logged in, they can access the app
The previous process was depending too much on the backend being available, we
can now bypass many of these checks if the user had already logged in before
This allows the user to login via all supported methods, such as social auth,
passkeys, etc. without needing to implement them individually here.
This should make the app flash men the user is returning from the "login via web"
workflow. Seems bringing the app back to the foreground is a bit more involved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

next version Incompatible changes that will be merged for the next version

Projects

None yet

2 participants