In-browser Postgres sandbox with AI assistance, using PGlite WASM to run fully functional Postgres databases in the browser. It stores data in IndexedDB and supports CI-like setup for local development, including monorepo structure and a browser proxy component.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
In-browser Postgres sandbox with AI assistance. Each database runs a new instance of PGlite (WASM Postgres) in the browser, with data stored in IndexedDB for persistence. The project provides a monorepo with a web app, a browser proxy, and a deploy worker to publish in-browser databases.
How it works
Queries run entirely in the browser; there is no remote Postgres container or WebSocket proxy. PGlite exposes a functional Postgres database per database, and data persistence is through IndexedDB. The repository includes multiple apps: a Next.js web app, a browser-proxy that proxies Postgres TCP connections via pg-gateway and Web Sockets, and a deploy-worker to deploy in-browser databases to external platforms.
Getting started
From the monorepo root:
-
Install dependencies
npm i -
Start local Supabase stack:
npx supabase start -
Store local Supabase URL/anon key in
./apps/web/.env.local:npx supabase status -o env \ --override-name api.url=NEXT_PUBLIC_SUPABASE_URL \ --override-name auth.anon_key=NEXT_PUBLIC_SUPABASE_ANON_KEY |\ grep NEXT_PUBLIC >> ./apps/web/.env.local -
Create an OpenAI API key and save to
./apps/web/.env.local:echo 'OPENAI_API_KEY="<openai-api-key>"' >> ./apps/web/.env.local -
Store local KV (Redis) vars. Use these exact values:
echo 'KV_REST_API_URL="http://localhost:8080"' >> ./apps/web/.env.local echo 'KV_REST_API_TOKEN="local_token"' >> ./apps/web/.env.local -
Start local Redis containers (used for rate limiting). Serves an API on port 8080:
docker compose -f ./apps/web/docker-compose.yml up -d -
Fill in remaining app variables as shown in respective .env.example files.
Development
From the monorepo root:
npm run dev
Important: This command uses turbo and builds interdependent packages automatically; bypassing turbo requires manual builds for each ./packages/* before running ./app/*.
Why rename postgres.new?
This project is not an official Postgres project and is renamed to database.build; it remains Postgres-focused with a different URL.
Video
License
Apache 2.0






