My entire stack is in my Postgres DB and a few power tools for my backend
summary
A backend architecture that keeps the entire stack inside PostgreSQL: schemas define models and views, PostgREST exposes the views as a REST API, and an OpenResty/Nginx OIDC proxy injects user context via headers for RLS. The system uses PostgREST + RLS with header-based policies for per-user reads, triggers and PL/Python functions for inserts, Stripe calls and synchronous PDF generation, and n8n listening to DB events for asynchronous work; deployments are reported at scale (largest ~330M users) with smooth reloads via NOTIFY, while migrations/versioning remain the main pain point.
AI-written summary · about
chapters (17)
- 0:00Postgres stack intro
- 2:34Backend architecture problems
- 6:23Mainframes and DBMS revisited
- 8:08All-in-Postgres architecture
- 10:14PostgREST deployment
- 11:38Keycloak auth with OIDC
- 15:50Swagger UI with auth
- 16:32APIs via views and schema
- 18:18Row-level security with RLS
- 20:48Complex view inserts
- 24:21PL/Python for business logic
- 27:31PDF generation and Stripe
- 29:38Dev environment with PGAdmin
- 31:43Zero-downtime deployment
- 32:25Async processing with N8N
- 35:53Postgres + N8N stack
- 36:37Q&A
related talks
08mUsing PostgreSQL in real life
38mWhat we built with Open Source
46mBig databases, many servers, data center or cloud - it's all here!
51mIdentity at Scale; How Okta uses Postgres
30mPostgreSQL & NodeJs as Core Feature of Backend for Frontend
24mThe Upsidedown Stack: React on the Server and Postgres in the Browser
30mBuilding modern Python web apps with PostgreSQL
51mPostgres on OpenStack
