Projects

Postgres PlatformPostgres for every app I build, on one server I run myself

Postgres Platform is the database behind the things I build. Every app gets its own Postgres database with its own connection string, and the databases sleep when nobody is using them.

It runs on one server I manage myself, with the data in Cloudflare R2.

I built it because I was paying for whole Postgres instances that barely got any traffic. I make a lot of sites, and each one needs its own database. But most of them don’t get traffic around the clock, and a lot are internal tools that only need a database while I’m using them. I can’t use everything at once, so most of those databases were sitting there, paid for and doing nothing.

Youthis page
Proxyfinds the database
Postgresasleep
Storagewhere data lives
A query, from your browser to a sleeping database.
Projects: analytics, blog, docs-search, status-page, and storefront, each running, paused, or asleep, with the server’s memory and databases below

Asleep Until You Need It

Most of my databases sit idle most of the day. A blog gets a few visitors an hour. A preview branch gets opened once and forgotten.

So a database here only runs while something is connected. After five quiet minutes it freezes, and the next connection wakes it in about 15 milliseconds, fast enough that the app never notices. Freezing only touches memory. The data itself lives in object storage, and nothing about it changes.

Monitoring: a median of 10 ms to resume from frozen and 946 ms to start from stopped, a chart of wake times, and each branch’s compute

How long each wake took, and which branches are running, paused, or asleep.

Branches for Everything

A branch is a copy of a database, made in a second, with its own connection string. It only stores what changes, so trying a migration or giving a pull request its own data costs almost nothing.

Any branch can also start from a moment in the past. Restoring last Tuesday’s data is making a branch from last Tuesday.

Branches: main, plus migration-add-coupons, preview-pr-142, and staging, each forked from main

The Whole Backend

A database on its own isn’t much of a backend. Each one also comes with an API for querying tables over HTTPS, sign-in (email, magic links, Google, and GitHub), file storage, and live updates when rows change.

Row-level security decides what each request can see, so it gets the most care in the dashboard. The policy tester runs a query as a real user, inside a transaction that always rolls back, and shows exactly which rows they would get.

The policy tester: 2,400 orders without row-level security, 5 as a signed-in shopper

Without row-level security, 2,400 orders. As one signed-in shopper, 5.

Built for Agents Too

Most of the people creating databases here aren’t people. My AI agents spin up projects, make branches, and run SQL through the same API the dashboard uses, with an MCP server on top.

That changes what the safety rails look like. A read-only query runs in a transaction that is always rolled back, whatever it says. Writing to main, which is production, needs an explicit confirmation, so an agent tries its change on a branch first.

How It’s Built

A Postgres process holds no data here. It reads pages from a storage server and writes changes to a log, and both keep everything in R2. That split is what lets a database freeze, stop, and wake without ever risking the data.

Neon’s storage engine
The open-source pageserver and safekeeper, which keep every page and every write
Cloudflare R2
Where the data actually lives, so a compute holds nothing it can lose
Control plane and proxy
Written for this project: routes each connection by hostname, signs it in, and wakes the database
Docker
One container per compute, frozen when idle
DigitalOcean
All of it on a single host

The projects, orders, and customers in these screenshots are sample data.