paulgessinger / swift-paperless

Native iOS app for interacting with a Paperless-ngx installation to manage documents
https://swift-paperless.gessinger.dev/
MIT License
371 stars 15 forks source link

Offline, read-only mode (persistent state/ cache) #114

Open petruut opened 5 months ago

petruut commented 5 months ago

Issue:

Sometimes/ often, we need documents the most when the internet is not available or connections are weak (e.g. show an extra document at passport control when you land, etc.)

Potential solution:

The app should cache/ persist documents (either all, or a subset) locally on the device, to allow the user to access them via a read-only mode, even when there is no connectivity to server available.

This would greatly increase the functionality and allow me/ many to stop taking screenshots of things, just in case the app/ server is not accessible. 😂

paulgessinger commented 5 months ago

I've been thinking about this. I think using SwiftData a local cache should be somewhat feasible, but it's a major refactoring. In this scenario, editing would simply not be permitted at all while offline, to avoid any syncing issues.

petruut commented 5 months ago

That's really encouraging - don't know if you have anyone to bounce ideas around how this/ other functionality could work, but happy to brainstorm/ design by your side.

(especially since something like this doesn't just require the back-end, but also some front-end thinking about user touchpoint, etc. - which I'm sure you're on top of, since the app is amazing already, but just in case you want to multiplayer some of it through)

tess1o commented 4 weeks ago

Editing is not required in offline mode. Keep it simple. It's really nice to have an offline mode similar to Google drive, where you can select which documents should be available without internet. It would be a huge win comparing to the native Paperless Web UI since the web app obviously can't provide any offline mode.