Top
Best
New

Posted by bashtian 23 hours ago

Show HN: Capsule – Single-file web apps that save their data into SQLite(withcapsule.app)
Hey HN,

I always had the problem that building HTML pages is really simple now, but trying to save data required hosting it somewhere, and sharing it afterwards was not easy. Over the last few months, I've been building an app called Capsule (it’s also the file extension name) written in Rust with Tauri 2.0 that allows packing an HTML app and its data into a single SQLite file.

The HTML file and any related assets are directly embedded in the database. User data can either be saved as a localStorage key/value store or via a MongoDB-inspired collections API as documents, saved in a table in the file. You can also save other assets, like PDF files or images, directly in the database to keep different documents together. All data can be easily exported to CSV or JSON if needed.

Privacy and security were a big priority for me, so documents cannot do anything out of the box. They don’t have direct access to the file system and they require permission to access the internet. The permission model is still something I’m working to improve. Capsule documents can also use local or remote AI models for document specific AI features.

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 file, each data entry has a unique UUID and timestamp.

I’m planning to open up the file format specification for the 1.0 version of the app so other apps can read or write Capsule files.

You can try it out in the web preview at https://withcapsule.app/preview with pre-built templates or use any AI provider of your choice to create a custom, Capsule-optimized app by using the following prompt:

"Please read the app wizard instructions at https://withcapsule.app/prompt.txt and help me design an app.“

I’m still working on the file format but there are migrations for each new version, so data should never be lost when using newer versions of the app in the future. Please let me know if you have any ideas or use cases where this might make sense or does not work.

335 points | 143 commentspage 6
4ndrewl 16 hours ago|
It's 1990s Microsoft Access but with AI
saejox 19 hours ago||
like downloading exe files from the web. but we should invent something to catch bad actors putting bad stuff in them
bbstats 18 hours ago||
this is great for the 'make a webapp for me and my family' thing
xori 12 hours ago||
my-bookreport-v2-final-final-done.capsule
altern8 18 hours ago||
Looks amazing, I don't know if this is legit or useful feedback, but I navigated away after reading "Generate & update apps using AI".

I'm so tired of AI everywhere and everything trying to sell to you because of AI this and AI that.

I think that at this point we assume AI will be available if it makes sense for the product, making it a selling point to me is like slapping "No cholesterol!" on lettuce.

tamimio 21 hours ago||
New way to deliver viruses just dropped! Great idea but it can be abused for sure.
bashtian 20 hours ago|
The HTML files does not have any permission to access anything on the file system. Ideally the whole app will be running inside a sandbox on desktop, for mobile apps this will be the default anyway.
xd1936 21 hours ago||
"No cloud. No accounts. Just share it." close tab
mionhe 20 hours ago||
Can you elaborate a little?
al_borland 20 hours ago||
It reads like the whole thing was vibe coded and 0 work was done beyond what the AI spit out.
derpyzza 20 hours ago|||
well that's a first
j-pb 20 hours ago||
yes yes we get it, you don't like AI ...
pmkary 22 hours ago||
Really really nice
ninininino 19 hours ago||
I'm surprised to not see Pocketbase mentioned in this thread at all.

https://pocketbase.io/docs/

"PocketBase is an open source backend consisting of embedded database (SQLite) with realtime subscriptions, builtin auth management, convenient dashboard UI and simple REST-ish API. It can be used both as Go framework and as standalone application.

The easiest way to get started is to download the prebuilt minimal PocketBase executable"

rvz 19 hours ago|
Attackers / Malware Developers: "A document as a web app?, What could possibly go wrong?"
More comments...