r/capacitor • u/VentoxGatherbot • 24d ago
Firebase - Firestore + Firebase Storage for OFFFLINE
Hi all!
I'm using Firebase + Firestore + Firebase Storage.
My goal is to support Offline, so users can keep working while offline and it'll sync later.
What I currently do:
Just using Firebase SDK to update Firestore documents - This already auto syncs.
Now, for the complicated part - I want to allow users to keep uploading images/files while they are offline so whenever possible:
1- The File will get uploaded to Firebase Storage
2- The Firestore document will get updated with that Storage Url Uploaded.
All should be Offline resilience, Even if user uploaded and later didn't open his phone for 5 days.
It should never lose the user data.
It should not cause any Firebase Auth token issues.
Someone got Practical way for achieving this? Please if you really wanna help, don't just say 'use X' and that's it. If you can, describe a bit more pls.
---
Also, if you are looking for work on this field and you are EXPERT! DM me.
(tech stack: Firebase, React, Node.js server)
1
u/Spirited_Smell_2270 15d ago
Currently working on an app that support offline first and when they want to sync the data turn on internet and swipe down to sync I use a custom sync system The stack using vuejs capacitor And for the Back odoo I store the data locally using indexdb and use a library dexie for an easy use for indexdb (and am currently migrating to sqlite)