Live data from Hacker News

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

withcapsule.app

41–50 of 176 posts

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

#45
post #31

Earlier quoted context omitted.

This is a frustration of mine as well, but I vaguely remember someone showing something on HN where the file could essentially save itself, I think they were using some file APIs for that... sadly I can't find the details anymore. But I keep running into the "HTML file opened locally can't update itself" issue repeatedly now that I build tools for myself with LLM agents.

The File System Access API can do this, and it works in local ("file:///") HTML files, but it's only currently supported in desktop Chromium browsers: https://caniuse.com/native-filesystem-api However, every browser will let you download a new version of the HTML file and save it over the old one - yes, even from a local HTML file: const blob = new Blob([' \n' + document.documentElement.outerHTML], { type: 'text/html…

This is the approach Bento took I believe (similar idea, but just for decks): https://github.com/nyblnet/bento.

Saw it on HN a few weeks back

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

#46
post #20

is the idea this would be hosted or run locally (like Electron)?

This is for local document like apps. Tauri is actually using the OS webview instead of bundling Chromium like Electron. That's why the download is only 10MB for Mac.

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

#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.

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

#50

An idea for a killer feature: Make it so that auhors can expose their capsules to the internet, and the people whoe wants to use them(lets call them users) can type the name(lets call it address) of the caplsue into the app, and your program will pull that capsule in the the users device..

wow, that sounds revolutionary.
Post reply on HN