Live data from Hacker News

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

withcapsule.app

161–170 of 175 posts

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

#162
Neat!

Another way to achieve something like this is Cosmopolitan C Compiler, Actually Portable Executables. For example, Redbean. (Jart, all of your certs are bad! I can't open your websites any more!) http://justine.lol/

It's a binary that can run on Windows, Mac, Linux, and it is also a zip file. The application can read the zip file and on several systems (not Windows), it can self-modify the zip file. Including hosting SQLite inside the ZIP file.

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

#164
post #12

>>Capsule packs your entire app — UI, data, and everything — into a single portable .capsule file. I'm having Lotus Notes flashbacks.

Indeed. But Lotus Notes actually had the design and data stored independent of one another and you had database templates. You could update your design without breaking the data, or even have entirely different design that works with the existing data model. This capsule thing seems to store the design itself within the database, which is odd to me. I guess I don't get it at 100%.

Yeah, it's not an exact match. But I could email you a lotus notes nsf file and you could open it in your Notes client and have the data and the application in front of you.

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

#165

Neat! Another way to achieve something like this is Cosmopolitan C Compiler, Actually Portable Executables. For example, Redbean. (Jart, all of your certs are bad! I can't open your websites any more!) http://justine.lol/ It's a binary that can run on Windows, Mac, Linux, and it is also a zip file. The application can read the zip file and on several systems (not Windows), it can self-modify the zip file. Including h…

I have been meaning to use Justine's RedBean to build a "project app" (kind of like what the OP describes, but leaning more towards something like Datasette). It would contain the data, the paper(s), and the UI for interacting with the data (and supporting scripts or R that can be run with other tools). I just like the idea of a portable single-file scientific artifact.

(also another call for jart to fix their certs!)

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

#166
post #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 do…

I did not know this! What a cool feature.

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

#167
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…

In a corporate context it's basically impossible for employees to host an app anywhere. So an app that works entirely locally and you can send to colleagues sounds useful.

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

#168
It seems a bit ridiculous but there’s definitely something here. I have been really enjoying building similar single-file prototypes with agents. They seem to have no trouble dealing with all the code being piled in one big file and you can skip all the complexity, time, and token cost of of bundling.

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

#169
post #158
post #154

Earlier quoted context omitted.

Firefox unfortunately does not support the File System Access API. You can try by calling the most fundamental function, the one that asks the user to select a file: window.showOpenFilePicker() What Firefox supports is a "File System API" which creates something similar to the other old ways of storing data in a browser, like cookies and indexeddb. You cannot use it to edit normal files on your disk. This is my main…

> Firefox unfortunately does not support the File System Access API. I would not call it unfortunate. Browsers should not have access to the file system, USB ports, etc. Perhaps in "PWA"s, if the user has a way of giving and withdrawing consent.

Why shouldn’t browsers have these capabilities..?
Post reply on HN