←back to thread

200 points dcu | 1 comments | | HN request time: 0.43s | source
Show context
TekMol ◴[] No.44456461[source]
Do we still need a back-end, now that Chrome supports the File System Access API on both desktop and mobile?

I have started writing web apps that simply store the user data as a file, and I am very pleased with this approach.

It works perfectly for Desktop and Android.

iOS does not allow for real Chrome everywhere (only in Europe, I think), so I also offer to store the data in the "Origin private file system" which all browsers support. Fortunately it has the same API, so implementing it was no additional work. Only downside is that it cannot put files in a user selected directory. So in that mode, I support a backup via an old-fashioned download link.

This way, users do not have to put their data into the cloud. It all stays on their own device.

replies(5): >>44456656 #>>44456687 #>>44457268 #>>44457361 #>>44460545 #
nico ◴[] No.44457268[source]
> Do we still need a back-end, now that Chrome supports the File System Access API on both desktop and mobile?

Could this allow accessing a local db as well? Would love something that could allow an app to talk directly to a db that lives locally in my devices, and that the db could sync across the devices - that way I still get my data in all of my devices, but it always stays only in my devices

Of course this would be relatively straightforward to do with native applications, but it would be great to be able to do it with web applications that run on the browser

Btw, does Chrome sync local storage across devices when logged in?

replies(2): >>44457578 #>>44460208 #
1. stephenlf ◴[] No.44460208[source]
> Could this allow accessing a local db as well?

Like IndexDB? It’s a browser API for an internal key-value storage database.

> Btw, does Chrome sync local storage across devices when logged in?

Syncing across devices still requires some amount of traffic through Google’s servers, if I’m not mistaken. Maybe you could cook something up with WebRTC, but I can’t imagine you could make something seamless.