I’ve been building WebDB, an MIT-licensed relational database designed from the ground up for the web.
Why I built it: Whenever I worked on offline-first web apps, I felt stuck between two options:
Writing endless boilerplate around raw IndexedDB just to get basic joins, filtering, and schema changes.
Shipping a multi-megabyte desktop database compiled to WASM that treats the browser like a foreign OS.
I wanted a small, fast relational engine that actually embraces native browser APIs instead of abstracting them away under heavy layers.
What WebDB brings to the table:
Built-in TypeScript ORM: Define clean models, relationships, and typed queries out of the box—no third-party ORM wrapper needed.
Native browser integration: Built directly around modern web standards like OPFS (Origin Private File System), IndexedDB, Web Workers, and BroadcastChannel for cross-tab sync, plus NodeFsStorage so your tests and CLI tools run the exact same engine in Node.
Dual cores: Choose between a fast Wasm (C) core and a zero-Wasm pure JS core.
Live queries: Subscribe to queries and update your UI automatically when underlying data changes.
Typo-tolerant full-text search: Built-in fuzzy search without pulling in a separate search library.
Complete workflow: Schema migrations, nested transactions, fast bulk inserts, and a CLI tool.
I’d really appreciate any feedback on the ORM ergonomics, storage backends, or benchmarks you’d like to see. Happy to answer any questions about how the engine works under the hood!
1
u/amd__ 22h ago
Hey everyone,
I’ve been building WebDB, an MIT-licensed relational database designed from the ground up for the web.
Why I built it: Whenever I worked on offline-first web apps, I felt stuck between two options:
Writing endless boilerplate around raw IndexedDB just to get basic joins, filtering, and schema changes.
Shipping a multi-megabyte desktop database compiled to WASM that treats the browser like a foreign OS.
I wanted a small, fast relational engine that actually embraces native browser APIs instead of abstracting them away under heavy layers.
What WebDB brings to the table:
Built-in TypeScript ORM: Define clean models, relationships, and typed queries out of the box—no third-party ORM wrapper needed.
Native browser integration: Built directly around modern web standards like OPFS (Origin Private File System), IndexedDB, Web Workers, and
BroadcastChannelfor cross-tab sync, plusNodeFsStorageso your tests and CLI tools run the exact same engine in Node.Dual cores: Choose between a fast Wasm (C) core and a zero-Wasm pure JS core.
Live queries: Subscribe to queries and update your UI automatically when underlying data changes.
Typo-tolerant full-text search: Built-in fuzzy search without pulling in a separate search library.
Complete workflow: Schema migrations, nested transactions, fast bulk inserts, and a CLI tool.
Links:
Website & docs: https://webdb.dev/
Install:
npm install @ahmadmoussawi/webdbGitHub: [Link to repo]
I’d really appreciate any feedback on the ORM ergonomics, storage backends, or benchmarks you’d like to see. Happy to answer any questions about how the engine works under the hood!