← Cool Sh*tMOTICULATION
Curious
0 XP

FIELD GUIDE / 06  ·  Ship real software

Build a real web product with Codex, Vercel & Supabase.

A practical map from a good idea to a deployed app—with the security and scaling decisions that make it hold up.

A brass bridge carries a glowing signal from a design sketch to a secure teal data vault.
YOUR RUN / SAVED IN THIS BROWSER0 of 3 chapters found · 0 checkpoints cleared
0%

A useful read should leave you with something you can try, not just something you can repeat.

01 / Draw the system

Give each layer one clear job.

Codex helps you build the application; Vercel serves it; Supabase stores and protects its data.

Start with a small vertical slice: one visitor can sign in, create one private record, and see it again. Ask Codex to inspect the repository first, explain the current architecture, and implement that slice with tests. Keep the repository as the source of truth: review the diff, run the checks, and commit the result instead of pasting production credentials into a prompt.

A normal request travels from the browser to your Vercel-hosted app, then to Supabase Auth and Postgres. Server components are a good home for public or initial page data; authenticated writes belong behind a server endpoint or a carefully scoped database policy. Treat the browser as an untrusted client even when the UI hides a button.

  • Codex: plan, edit, test, explain.
  • Vercel: deploy immutable previews and production builds.
  • Supabase: identity, relational data, storage, and access policies.

02 / Protect the data

Make the database enforce ownership.

A hidden edit button is not authorization. Row Level Security is the boundary that keeps one account out of another account’s rows.

Enable RLS on every table reachable through the Data API. For a table with a user_id column, a basic owner-only policy checks that auth.uid() is not null and equals user_id for both reads and writes. Add an insert check as well as a row visibility rule; test with two separate user accounts, including an anonymous session.

Keep service-role keys and other privileged secrets on the server, never in NEXT_PUBLIC variables or client bundles. Put separate credentials in Vercel Development, Preview, and Production scopes. A preview should use preview-safe data and access—not quietly reuse a production secret. Environment changes apply to a new deployment, so redeploy after changing them.

  • RLS enabled on every exposed table.
  • Policies cover SELECT, INSERT, UPDATE, and DELETE as needed.
  • Private secrets stay server-side; test cross-account access.

03 / Scale responsibly

Design for the next bottleneck, not infinity.

A small app can serve real users when it has bounded queries, clear limits, and a way to see when it struggles.

Paginate lists, select only the columns you need, index the fields you filter and sort on, and avoid fetching a user’s entire history for one screen. Use connection pooling where the client and deployment pattern need it. Add rate limits to expensive or public actions, and set sensible file-size and request limits before someone else sets them for you.

Before launch, exercise the riskiest journeys with realistic data: sign-up, upload, search, and a burst of concurrent requests. Watch latency, error rates, database connections, storage, and provider quotas. Use Vercel Preview deployments to review each change; promote only a tested build. Growth is an operational practice, not a line in a prompt.

  • Bound queries → index them → load-test realistic traffic.
  • Track latency, errors, connection use, and quota headroom.
  • Use preview environments; back up data and rehearse recovery.
THE SYSTEM MAP / INTERACTIVETRACE A REQUEST

Follow one safe request.

Move through the layers. Notice where the browser ends and trusted data access begins.

NOW IN / Next.js on Vercel

Render public pages quickly; keep authenticated actions behind a server boundary.

Production check: RLS enabled · private keys server-only · pagination and limits in place.

FINAL TEST / +25 XP

Where should the Supabase service-role key live?

KEEP EXPLORING / SOURCE NOTES

An original implementation guide based on current official product documentation. Limits and features vary by account and plan; verify them before launch.

A BETTER INTERNET STARTS WITH USEFUL THINGS

Good work should
go somewhere.

Keep the field guide close. If you want to turn a clear idea into a digital experience, take a look at what Moticulation makes.

Back to the archive Talk about a project