Live data from Hacker News

Show HN: Capsule – Single-file web apps that save their data into SQLite

withcapsule.app

141–150 of 175 posts

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#141
For the curious, the note taking app Trilium has a "standalone" mode¹, built on top of OPFS² and sqlite OPFS persistence, such that your notes (~web pages here) are stored in sqlite locally, offline-available, optionally syncing with a remote, while being a pure local web app (after the app assets have been downloaded once). If you want to take your whole personal notes/wiki/pkms for offline access on a device you don't own/have install rights, that's the only way I know. I suspect that OP could have gone this route instead had he known about it?

¹: https://app.triliumnotes.org/

²: https://developer.mozilla.org/en-US/docs/Web/API/File_System...

³: https://sqlite.org/wasm/doc/trunk/persistence.md#opfs

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#142
post #47
post #26

My take: If your app needs to update and preserve state (using SQLite or any other DB), it is probably not something you want to pass around as a bundled file. Or at least, it's extremely limiting, compared with hosting it somewhere on the web, which is not that hard to do these days. Think of the workflow: Any time the state changes, you need to email a new Capsule file to whoever else is using the app. And one woul…

> Isn't that a lot simpler? You’re glossing over the recurring cost and annoyance of dealing with the hosting and having to secure the data. This way you just share and it’s local. Sure, if you have to share data between people, your points are valid. But this seems like a way to build apps geared for individual users, like a notes or recipes app.

For most users having to mail a file to someone is way more work than having to just share a link. The cost of cloud storage is almost nothing (since email is mentioned I assume 50MB max per project). A notes app that don't sync between all devices is just a text editor to most.

I do like apps that have sensible export formats though. Having control over my data is important.

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#144

I love this idea! One of the fallouts from widespread AI adoption that I've seen: They're very good at creating visual artifacts, but if you ever have to provide data in those artifacts, you don't really have a great way to share it without hard coding it. > One downside with this approach is that multiple people working on it will create different copies. To make it possible to merge different copies of the same fil…

Git, html+css+svg and data in json.

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#145
I miss from the home page a link to github and/or a description of it's license and/or some code of an actual capsule app (what backend language is used? -- I have no clue and cannot find out) and/or does this bundle Node?

While I wish your project success and like the simplicity of Sqlite; I prefer to start with Postgres. PG has many of the benefits (x-platform, free, embeddable, etc) that sqlite has, but also provides an industrial strength db in case you need to scale at some point, or want to use more complicated constructs.

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#146
I was literally thinking of building something similar this summer, one requirement I had however was that it should be runnable/shareable over the web (it's web-tech after all).

My use case was storing a family tree with data/app that could be shared, and family members they would be able to add to it and later merge also.

Ie, it's a webpage you can dump anywhere, then download/edit locally.

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#147

Earlier quoted context omitted.

That file editor seems to work in Firefox. I just tested the save/open functionality.

It's not using the File System Access API, on Firefox it uses for file-picking, and the save just downloads it. It's not synchronizing anything with your filesystem.

Iirc the File System Access API should always originate File objects from an input picker so that the user selects the file to be opened and not give more access to apps than users allows?

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#148
post #60

> but trying to save data required hosting it somewhere With the File System Access API, webpages nowadays can read and write local files just like desktop applications: https://developer.chrome.com/docs/capabilities/web-apis/file... Try this text editor for example: https://googlechromelabs.github.io/text-editor/ It works nicely on Desktop and Mobile.

My dream is that you could write to Google Drive or iCloud Drive transparently too if the browser allows you to

This is possible with RxDB, you can sync from browser to google drive or ms onedrive

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#149

Earlier quoted context omitted.

That file editor seems to work in Firefox. I just tested the save/open functionality.

It's not using the File System Access API, on Firefox it uses for file-picking, and the save just downloads it. It's not synchronizing anything with your filesystem.

Do you know the reason for that? The File System API does seem to be well supported on Firefox: https://developer.mozilla.org/en-US/docs/Web/API/File_System...

Re: Show HN: Capsule – Single-file web apps that save their data into SQLite

#150
post #26

My take: If your app needs to update and preserve state (using SQLite or any other DB), it is probably not something you want to pass around as a bundled file. Or at least, it's extremely limiting, compared with hosting it somewhere on the web, which is not that hard to do these days. Think of the workflow: Any time the state changes, you need to email a new Capsule file to whoever else is using the app. And one woul…

> hosting it somewhere on the web, which is not that hard to do these days.

Tell any non-tech person that.

Post reply on HN