memory/* was fully ignored; now only memory/kb/ is tracked so notes, coaching sessions, insights, and project docs are versioned while embeddings and sqlite databases stay untracked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.1 KiB
PostgREST Deletes 80% of Your Backend Code
Sursa: https://youtu.be/DVYVvewa2kc?si=7Q9-QfPE6iJuBb0K Canal: Better Stack Durata: 6:05 Data: 2026-04-08 Tags: @work @project
TL;DR
PostgREST transformă schema PostgreSQL direct într-un REST API complet funcțional — fără routes, controllers, ORM sau validări scrise manual. Securitatea stă în baza de date (Row-Level Security), nu împrăștiat prin middleware. Ideal pentru prototipuri, MVPs sau orice proiect centrat pe PostgreSQL. E motorul din spatele Supabase.
Puncte cheie
- Zero backend code — pornești cu 3 containere (Postgres, PostgREST, Swagger UI) și ai un API CRUD complet în sub un minut
- Securitate în DB (RLS) — Row-Level Security în SQL, nu în middleware sau route handlers — mai puțin cod duplicat, mai ușor de menținut
- API docs automate — Swagger UI generat automat din schema, fără să scrii nimic
- Folosit la scară de Supabase — 26.000+ stele pe GitHub, trafic real de producție
- Trade-offs de știut:
- RLS agresiv = load crescut pe DB → design atent
- Logică complexă → forțează SQL functions/views (unora le place, altora nu)
- Pentru cazuri edge complexe → adaugă un strat BFF subțire deasupra
Quote-uri
"Every time you build an API, you write the same back-end code over and over. Routes, controllers, validation, auth. All this just to talk to your database."
"Your schema defines the API. Your security is RLS. Your relationships already exist in the database. So instead of building a translation layer around your data, we just expose the data correctly."
"PostgREST lets you ship faster, secure better, and maintain less. Your database becomes the source of actual data, and your API falls out of that instead of becoming its own separate system."
Relevanță pentru Marius
Relevant pentru roa2web (Vue.js + FastAPI): PostgREST ar putea înlocui sau reduce semnificativ stratul FastAPI pentru endpoint-uri standard CRUD. Dacă Oracle nu e în ecuație, merită explorat ca alternativă rapidă pentru API-uri noi pe PostgreSQL.