PeriodPals / periodpals

3 stars 1 forks source link

Research and working app in offline mode #145

Open charliemangano opened 1 week ago

charliemangano commented 1 week ago

Description:

This is a subtask from #137. It aims at modifying the app's backend to have an offline-first approach using PowerSync.

Done:

charliemangano commented 1 week ago

We are going to be using PowerSync, which is a Postgres-SQLite sync layer for local-first apps. It is designed to work well with Supabase and has supports Kotlin (beta). It allows us to cache locally data that we would usually store in Supabase, which will give us the possibility of having an offline mode (here for an overview of how it works).

To implement it, I'm following this tutorial.

Our app architecture will look like this when finished implementing: Image

charliemangano commented 1 week ago

Our PowerSync instance is at this link and is now associated to our Supabase project.

We still need SyncRules.

See here an example of using PowerSync for the Supabase Authentication.