CH 05.06 ── LIVE

DESIGN WAY

// the case study


DESIGN WAY key art

Arabic-first paid course platform engineered to run at $0/month. Forever. No card on file.

// the numbers

infrastructure bill
$0/MO
backend servers
0
default-deny on every table
RLS

// the brief

Design Way — RTL Arabic learning platform selling design courses in EGP, live at designwaycourses.com and built to survive indefinitely on free tiers. There is no server: all privileged logic lives inside Postgres as SECURITY DEFINER functions behind default-deny row-level security. The service-role key is never used. Anywhere.

// the wins

  • Live at designwaycourses.com — deployed on Cloudflare Pages, CI on GitHub Actions
  • $0/month infrastructure by engineering, not hope — keep-alive pings and weekly backups run on GitHub Actions
  • Default-deny RLS on every table; the public anon key is the only key that ships
  • Full RTL discipline: logical CSS properties only, ar-EG locale, integer-cents EGP money
  • Realtime payment review + WhatsApp deep links instead of a support inbox

01 // the constraint

A seasonal, low-volume audience paying in EGP can't carry monthly cloud bills. So the bill is zero — permanently. Free-tier Postgres, free hosting, free CI. The architecture bends around the constraint instead of pretending it isn't there.

02 // the no-server trick

No Edge Functions, no backend process. Every privileged operation — submitting a payment, reviewing it, granting course access — is a SECURITY DEFINER Postgres function, gated by row-level security. The client holds nothing but the anon key, and RLS is the wall.

03 // the details

Free Supabase projects pause after seven days of silence — a scheduled workflow does one real write every six. Money is integer cents formatted with Western digits to match InstaPay screenshots. RTL uses logical properties everywhere; only directional icons flip.

// the panels