Capsule: Pack Web Apps and Data into a Single SQLite File

Capsule bundles HTML apps and their data into a single portable SQLite file with no backend required.
Capsule is a desktop app built with Rust and Tauri 2.0 that packs an HTML interface, scripts, and user data into a single SQLite file (`.capsule`), making one file a complete, self-contained app. It offers localStorage-style key-value storage and a MongoDB-inspired collections API, supports embedding PDFs and images, and exports to CSV/JSON. Documents are sandboxed by default with no filesystem access and opt-in internet permissions. Each record gets a UUID and timestamp to support copy merging, and the author plans to open the format spec in v1.0 and add AI-assisted app generation.
A Overlooked Pain Point: Easy to Build, Hard to Store
Building HTML pages has never been easier — but the moment you need to store data, things get complicated. You need somewhere to host it, a database, a backend service, and if you want to share it with someone, they need a whole environment set up. That's exactly the pain point that inspired Capsule.
In a Show HN post on Hacker News, the author described the frustration: building a UI is easy, but saving data always requires hosting it somewhere, and sharing it afterward is a hassle. After several months of work, they built an app called Capsule using Rust and Tauri 2.0 — where "Capsule" is both the app name and the file extension. The core idea is to pack an HTML application along with all its data into a single SQLite file.
The project earned 255 points and over 110 comments on HN, signaling that it resonated with a broad audience.

App and Data, All in One File
Capsule's technical design is straightforward: HTML files and related assets are embedded directly into a SQLite database, and user data can be saved in one of two ways.
The first is a key-value store similar to localStorage. The second is a MongoDB-inspired collections API that stores documents as rows in a table within the file. Beyond that, assets like PDFs and images can be stored directly in the database, keeping everything from different documents together. All data can be easily exported as CSV or JSON, eliminating concerns about being locked into a proprietary format.
This "everything in one file" design essentially treats SQLite as a portable application container. A user who receives a .capsule file gets both the application interface and all its data — copying, backing up, and sharing is as simple as copying a single file.
The concept of using SQLite as an "app container" isn't new, but Capsule takes it to an unusually complete extreme. SQLite itself is a serverless, zero-configuration embedded relational database whose file format is a standard cross-platform binary that can be copied and transferred like any ordinary file. It's already deeply embedded in browsers, operating systems, and mobile apps, earning the title of "the most widely deployed database engine in the world." Capsule uses SQLite's BLOB fields to store HTML, CSS, JavaScript, and binary assets (images, PDFs) inside the database, making the same .capsule file both the "program" and the "database." This stands in sharp contrast to traditional web apps, which require layered deployment of a frontend, backend service, and database — the tradeoff being the loss of horizontal scalability in exchange for ultimate portability.
A Privacy-First Permission Model
The author placed privacy and security at a high priority. By default, Capsule documents "can't do anything" — they have no direct access to the file system, and internet access requires explicit authorization.
This sandboxed, deny-by-default approach is especially important for a file format designed to be shared: you don't want opening someone else's Capsule file to secretly read your local files or send data to external servers. The author also acknowledges that the permission model is still being actively refined.
Notably, Capsule documents can call local or remote AI models, enabling document-specific AI capabilities. This means it's not just a static data container — it has meaningful potential for intelligent extensibility.
Tauri 2.0 is one of the technical foundations of Capsule's security model. Unlike Electron, Tauri uses the operating system's native WebView to render the UI, with a Rust-based backend process that strictly controls which system APIs the frontend can call. Tauri 2.0 introduced a more granular permission system, allowing developers to precisely declare in a manifest file which plugins and capabilities are visible to the web frontend — anything undeclared is simply inaccessible at runtime. This means Capsule can implement a "deny by default" strategy at the framework level, rather than relying solely on application-layer logic, providing relatively reliable isolation when opening third-party Capsule files.
The Collaboration Challenge and the UUID Solution
Single-file designs have an inherent weakness: when multiple people collaborate, each person ends up with a different copy of the file. This is the classic problem every "local-first" tool has to face.
Capsule addresses this by assigning a unique UUID and timestamp to every data entry, making it possible to merge different copies. This mechanism draws on conflict-resolution thinking from distributed systems — it's not a full CRDT implementation, but it lays the groundwork for future merge functionality.
CRDT (Conflict-free Replicated Data Type) is a class of data structures used in distributed systems to resolve conflicts from concurrent writes across multiple replicas. The core idea is that as long as data operations satisfy certain mathematical properties (typically commutativity and idempotency), modifications from different nodes can be automatically merged without a central coordinator, with a deterministic result. Tools like Notion, Linear, and Figma all use CRDTs or similar approaches to varying degrees. Capsule's current UUID + timestamp approach is a simpler "Last-Write-Wins" strategy — sufficient for scenarios without network conflicts, but still capable of losing one party's changes when two replicas modify the same record at nearly the same time. This is why the author describes it as "laying the groundwork for future merge functionality" rather than claiming full CRDT support.
Open Format and Getting Started
The author plans to open the file format specification with version 1.0, allowing other applications to read and write Capsule files. This is a key commitment — an open format means data won't be locked to a single application, and it makes building an ecosystem far more feasible.
For concerns about data migration, the author says each new version will include migration logic to ensure no data is lost when upgrading.
Users who want to try it out can use pre-built templates via the web preview at withcapsule.app/preview, or use any AI provider along with the author's provided prompt to have AI design a custom app optimized for Capsule. This "AI-assisted app generation" path also aligns with the current trend of rapidly building tools using natural language.
Who Is It For?
Capsule sits somewhere between a "personal utility" and a "shareable data document." For anyone who wants to quickly build a budget tracker, checklist manager, or small knowledge base without wrestling with servers and databases, it offers an extremely minimal path.
The limitations are equally clear: real-time multi-user collaboration isn't mature yet, the permission model is still being refined, and as an early-stage project, many details remain to be proven. But the combination of SQLite's portability, HTML's developer-friendliness, and local-first privacy principles makes this a direction worth watching.
Related articles

The Truth About Open-Source AI: You Got the Cake, Not the Recipe
Open-source AI exposed: what you download is weights (the cake), not training data or code (the recipe). A deep dive into open weights vs. true open source, Meta/Alibaba/DeepSeek business strategies, and how US/China/EU governments are redrawing the boundaries of openness.

Free DeepSeek V4.1 Flash via DSH: Bulk Point Collection & International WorkBuddy Tested
DSH project update tested: WorkBuddy now offers 100 points per claim, rate limits raised beyond 80M tokens with faster resets, and international WorkBuddy supports free Hunyuan 4 and DeepSeek V4.1 Flash.

DSH-SUBAGENT-UI Plugin: The Ultimate Sub-Agent Manager for DeepSeek Harness
DSH-SUBAGENT-UI is a DeepSeek Harness browser plugin offering sub-agent overview, search, local categorization, and completion snapshots — install with one command.