Live data from Hacker News

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

withcapsule.app

51–60 of 175 posts

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

#51

You can get a cheap approximation of this with chromium browsers + Filesystem API and a PWA manifest for that native-ish feel. AI has reignited my interest in building based 100% on browser native features. https://developer.mozilla.org/en-US/docs/Web/API/File_System...

If you want to distribute apps to many users this would probably be a better solution. The main benefit of Capsule is the personal document like app. You create a capsule, move it to an USB stick, save it in your cloud storage and it's still the same document. Nothing has changed, not the UI, not the data. The document will stay the same.

If it’s web native, anyone can just use it. If it’s a capsule, they first need to download the capsule app to associate the file extension with the OS and have it launch, right?

That feels like a big barrier, almost like a Java runtime.

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

#53
I wish there was a way to see the underlying HTML/JS and schema of these container files. Maybe you can on the desktop app? But it would be cool to see what's happening under the hood.

Do you have any plans to do merging of two versions of the same app? E.g. I send a todo list to someone, they mark some things as done and send it back to me. Will that merge into my copy if I've added some more items or would it open as a "fresh" app?

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

#54
post #7
post #3

This is great. Curious: this requires users to have a host app installed on their machine that can read .capsule file right? Won't that be a point of friction for distribution? Isn't html/css a better distribution mechanism as most computers already have the tech to run them?

You'd think so, but web browsers are downright lobotomizing the ability for local HTML files to run any meaningful javascript code. Want to run a JS file from the same directory? CORS ERROR!!!! Hence 200MB applications that are complete copies of the Chromium browser to run under 1MB of actual web code.

couldn't you just embed the js directly into the html file though? that would sidestep the CORS error. and since most of the people using a program like this are likely to be using AI to generate their ( likely throwaway ) applets anyway, readability and maintainability for the source doesn't matter as much as it would with human authors so having a separate js file doesn't bring that many advantages anyway.

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

#56

What is wrong with using IndexedDB?

For saving data in the capsule file it would create complexity regarding migration handling when updating the HTML file to add a field to a form for example. Keeping the data schemaless makes it also easier for merging data or importing data from a CSV.

Doesn't indexedDB have builtin migration mechanism?

>Keeping the data schemaless makes it also easier for merging data or importing data from a CSV.

Not sure how it makes easier. There is always an implicit or explicit schema. IMHO explicit is often better.

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

#57

Earlier quoted context omitted.

If you want to distribute apps to many users this would probably be a better solution. The main benefit of Capsule is the personal document like app. You create a capsule, move it to an USB stick, save it in your cloud storage and it's still the same document. Nothing has changed, not the UI, not the data. The document will stay the same.

If it’s web native, anyone can just use it. If it’s a capsule, they first need to download the capsule app to associate the file extension with the OS and have it launch, right? That feels like a big barrier, almost like a Java runtime.

In defense of capsule, the Filesystem API is janky and has kind of shit UX. Less sophisticated users would probably prefer the UX of a purpose built tool.

I prefer worse UX for the sake of standards and zero install, but many people would prefer the opposite. I don't think Capsule is intended for the HN crowd.

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

#58

With the battle of AI versus human agency raging I have a prediction that local-first desktop apps are going to make a comeback. It's nice to see something like this make it easier.

I agree and would love to see a shift back to what we had circa ~2009-2010: high quality, desktop and platform-specific apps that you could just pay for once (the best variant for everyone being an app that works indefinitely, but only receives updates if you renew your license every year).

The whole shift to SaaS has decimated software quality and has made most tasks a nightmare to complete (or at best, an obstacle course of multiple tools and "upgrades" and other bs).

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

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

Post reply on HN