Supabase
Supabase is a hosted PostgreSQL platform with built-in authentication, file storage, and an auto-generated API. Learn what it gives you, how it compares to running Postgres yourself with TypeORM, and when to use each.
Setup and Connection
Create a Supabase project, create a table with SQL, install supabase-js, and connect an Express application to it. Also covers connecting TypeORM to a Supabase database.
Database Operations
Perform CRUD operations with supabase-js, including filters, sorting, pagination with total counts, error handling, and running transactions through Postgres functions.
Basic Example
Build a complete Books CRUD API with Express and Supabase, covering project setup, the Supabase client, routes with proper status codes, and testing.
Auth and Row Level Security
Use Supabase Auth from Express for sign up and login, protect routes with a JWT middleware, and let Row Level Security policies limit each user to their own rows.
File Storage
Upload files from Express to Supabase Storage using Multer, validate file type and size, and serve them through public URLs or short-lived signed URLs.