paulgessinger / swift-paperless

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

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

Open petruut opened 3 months ago

petruut commented 3 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 3 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 3 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)