Analysis updated 2026-06-24
Embed a real Postgres database directly inside a web app with no server.
Build a local-first or offline-capable app that syncs later.
Run pgvector similarity searches client-side for an in-browser AI feature.
Use Postgres in a Node, Bun, or Deno script without installing a database.
| electric-sql/pglite | feathersjs/feathers | different-ai/openwork | |
|---|---|---|---|
| Stars | 15,208 | 15,253 | 15,157 |
| Language | TypeScript | TypeScript | TypeScript |
| Last pushed | — | — | 2026-05-22 |
| Maintenance | — | — | Maintained |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 3/5 | 3/5 | 3/5 |
| Audience | developer | developer | vibe coder |
Figures from each repo's GitHub metadata at analysis time.
npm install and import, only one connection at a time because the underlying Postgres runs in single-user mode.
PGlite is a version of PostgreSQL, one of the world's most popular relational databases (a structured way to store and query data), compiled to run entirely inside a web browser or JavaScript runtime, with no server required. It uses WebAssembly (WASM), a technology that lets languages like C be compiled and run directly in browsers or JavaScript environments. The package weighs only 3 MB compressed and can be installed via npm like any other JavaScript library. Once imported, you can run SQL queries directly in your app, no installation, no server to manage. You can run it as a temporary in-memory database (data disappears when you close the tab) or with persistence: in the browser it saves data to indexedDB (a built-in browser storage system), and in Node.js, Bun, or Deno it saves to the local filesystem. It also supports Postgres extensions including pgvector (used for AI similarity searches). PostgreSQL normally works by forking a new operating system process for each connection, but WebAssembly does not support forking processes. PGlite works around this by using PostgreSQL's single-user mode, a minimal operating mode normally used for bootstrapping, and adding a custom input/output pathway for JavaScript interaction. As a result, PGlite only supports one connection at a time. It is dual-licensed under Apache 2.0 and the PostgreSQL License and is built by ElectricSQL.
PGlite is a 3 MB WebAssembly build of Postgres that runs in the browser, Node, Bun, or Deno with no server, supporting in-memory or persisted storage and extensions like pgvector.
Mainly TypeScript. The stack also includes TypeScript, WebAssembly, Postgres.
Dual-licensed under Apache 2.0 and the PostgreSQL License: use, modify, and ship it including commercially as long as you keep the notices.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.