2026-03-172 phút đọcVI
Chuỗi: supabase-series
- 0.Chuỗi bài: Supabase từ setup đến deploy(bài này)
- 1.Tổng quan Supabase
- 2.Project setup, CLI và biến môi trường
- 3.Thiết kế schema Postgres và bảng
- 4.Migrations: viết và áp dụng
- 5.Auth: JWT, session và tích hợp backend
- 6.Prisma + Supabase: kết nối và đồng bộ schema
- 7.Row Level Security (RLS) và policy
- 8.API: PostgREST, custom API và khi nào dùng gì
- 9.Realtime và Edge Functions
- 10.Deploy, CI/CD và multi-project
Series: Supabase from setup to deploy
This 10-post series introduces Supabase (Backend-as-a-Service on Postgres): from overview, project setup, schema design, migrations, auth, ORM, RLS, API, Realtime/Edge to deploy and CI/CD. Content is generic, suited to engineers building backends or adopting BaaS; usable as training material or blog posts.
Audience
- Developers/engineers adding Supabase to their stack (Postgres, Auth, API, Realtime).
- Teams standardizing workflow: migrations, env, RLS, multiple environments (dev/staging/prod).
How to read
- Read in order 01 → 10 if you are new.
- You can jump by topic (e.g. Auth only, RLS only) — each post is relatively self-contained, with pointers to previous posts when needed.
- Each post is about 5–8 pages, with sample code and an “apply in your architecture” section.
Map of the 10 posts
| # | Post | Main content |
|---|---|---|
| 1 | Supabase overview | What Supabase is; Postgres, Auth, API; place in the stack; when to choose it |
| 2 | Project setup, CLI and env | Create project, CLI, folder structure; env vars; secure .env |
| 3 | Schema and table design | Table design principles, naming, UUID vs serial; example schema |
| 4 | Migrations: write and apply | SQL migrations, order, Studio vs CLI; basic rollback |
| 5 | Auth: JWT and backend integration | Supabase Auth, JWT; verify JWT on backend; session and refresh |
| 6 | Prisma + Supabase | Connect Prisma to Supabase; introspect vs migrate; avoid conflicts |
| 7 | Row Level Security (RLS) | What RLS is; writing policies; testing; multi-tenant / per-user |
| 8 | API: PostgREST vs custom API | PostgREST auto API; when to use custom API; REST contract |
| 9 | Realtime and Edge Functions | Realtime subscriptions; Edge Functions; when to use them |
| 10 | Deploy, CI/CD and multi-project | Deploy migrations; CI/CD; multiple projects; secure keys |
Notes
- Generic content: Not tied to a specific product or system; code examples and conventions are general.
- Blog-style: Moderate depth, easy to read.
- Architecture principles: Posts emphasize domain separation, secure-by-default (RLS, secrets), API contract, environment-based config, versioned schema.
Next: 01 — Supabase overview