PostgreSQL is your web server.

You are viewing a real pg-web application.
This documentation site (site/ in the repo) is served by Postgres + the pg_web_ext background worker, exactly the same stack you get from pg-web init. No Node, no separate app server.

pg-web embeds an async HTTP listener inside a PostgreSQL background worker. You write .sql handlers and .html (Tera) templates. The CLI syncs them into the database. SQL is the business logic. HTMX is the UI layer when you want it.

Get started in < 5 minutes

# 1. Install the CLI (once published) or build from source
cargo install pg-web

# 2. Get the runtime image (Postgres 17 + pg_web_ext + pg-web CLI inside)
bash scripts/build-image.sh   # from a checkout, one-time

# 3. Scaffold a real app (the full HTMX todo that exercises everything)
pg-web init my-todos --template todo
cd my-todos

# 4. Boot + schema + code
pg-web up
pg-web migrate apply
pg-web push

# 5. Open it
open http://localhost:8080

Edit files under pages/ or public/, run pg-web dev (or push), and refresh. No Rust compilation on your iteration path.

What's here

GitHub repoThe todo companion app (the other primary dogfood target) • Full docs live in docs/ in the source tree.

Why

Zero network hops between your web tier and your data. One Docker image. One mental model. The database is the application.

This page was rendered by a live SQL handler (pgweb.pages__index) returning JSON that Tera used to populate the section grid above. Pure dogfooding.