PostgREST is a production-grade Haskell web server that converts an existing PostgreSQL schema into a RESTful HTTP API. At startup it introspects PostgreSQL system catalogs to build a schema cache of tables, views, relationships, routines, and media handlers. Each request is parsed into an internal AST (ApiRequest), planned against the schema cache (Plan), compiled to parameterized SQL (QueryBuilder), and executed through the vendored Hasql PostgreSQL driver. The server supports full CRUD, RPC calls, resource embedding via foreign keys, filtering, ordering, pagination, JWT authentication, OpenAPI generation, and custom PostgreSQL-defined media types. Authorization is delegated to the database: PostgREST connects as an authenticator role that does SET ROLE to the JWT-specified role, so row-level security, grants, and triggers are enforced by PostgreSQL. The system runs as a single Haskell binary with lifecycle management, SIGUSR2/config reload through LISTEN/NOTIFY, a separate admin server exposing /live, /ready, /metrics, and schema cache dumps, and metrics via Prometheus. Build and packaging is Nix-based with static linking, Docker images, and cabal/stack support. CI runs integration suites against multiple PostgreSQL versions and includes load, memory, observability, and replica tests. Maintenance is active, with frequent releases and broad production use. The codebase demonstrates a clean separation between HTTP parsing, query planning, SQL generation, and database access. It is one of the few Haskell projects at this scale with deep PostgreSQL binary-protocol integration. The vendored Hasql driver and several standalone modules—media type parsing, HTTP Range handling, SIEVE cache, JSON path parsing—are extractable as reusable components for other Haskell services.
This is the Supabase JavaScript SDK monorepo, providing isomorphic client libraries for Supabase backend services. It is a well-structured TypeScript monorepo managed with pnpm and Nx, containing six core packages: auth-js (authentication), postgrest-js (database queries via PostgREST), realtime-js (WebSocket-based realtime subscriptions), storage-js (file storage and vector index API), functions-js (edge function invocation), and the umbrella supabase-js package that combines them into a single `createClient()` entry point. The SDK supports multiple runtimes (Node.js, Deno, browsers, Bun, React Native, Cloudflare Workers) and includes optional OpenTelemetry tracing support. The codebase demonstrates high craftsmanship with extensive TypeScript generics for type-safe query building, fluent builder patterns, robust error handling hierarchies, and comprehensive integration tests against local Supabase infrastructure. It is actively maintained with frequent releases, automated CI/CD, and a strong focus on backward compatibility.