Skip to Content
Build an appBackend & data (e.g. Supabase)

Backend & data (e.g. Supabase)

What this layer solves

Most apps need durable data, who is logged in, and sometimes files. You can build that on a BaaS (backend-as-a-service), your own API + DB, or serverless functions talking to a database.

Options

OptionBest forTradeoffs
SupabasePostgres + auth + storage + realtime; generous free tierVendor-specific APIs; learn RLS for real security
FirebaseMobile-first, NoSQL, Google ecosystemDifferent data model than SQL
PlanetScale / Neon / RDSPostgres/MySQL you control + serverless driversYou wire auth and APIs yourself
Turso (libSQL)Edge-friendly SQLiteDifferent scaling story than big Postgres

NK Wiki default: Supabase — Postgres, row-level security, auth UI patterns, works well with Next.js.

Outline: Supabase mental model

  1. Project = database + API + auth host — create in Supabase dashboard .
  2. Tables — design with migrations; don’t only use the GUI long-term.
  3. Auth — email magic link, OAuth providers; understand JWT flows at a high level.
  4. Row Level Security (RLS)who can read/write which rows — essential before production.
  5. Client vs service role keys — never expose service role in the browser.

When to pick an alternative

  • Firebase if you’re all-in on Google and document-style data fits.
  • Neon + Drizzle/Prisma if you want maximal control and SQL-first ORM workflows without Supabase’s dashboard features.

Last reviewed: April 2026.

Last updated on