Healthy path · Step 5 (later — not night one)
When real people use it
What this step is
Steps 1–4 = learn, pick a tool, ship a sandbox win.
Step 5 = the gate before strangers, private data, or money rely on what you built.
Reading this early is fine. Treating a night-one demo as “production” is not. Pretty is not the same as safe.
The 80% wall
AI is strong on the first stretch: something that looks finished. The hard stretch is auth, private data, payments, edge cases, and keeping it running. That gap is the 80% wall — judgment and checks, not one more mega-prompt.
Signs you’ve hit the wall optional
- Login “works” until two users can see each other’s data
- Keys end up in chat, screenshots, or client-side config
- Payments stuck in test mode forever
- Layout looks fine; network errors hang or leak details
- Dependencies appeared “because the agent added them”
What usually breaks first
| What goes wrong | Why AI often does this | First move |
|---|---|---|
| User A can open user B’s records (access control / IDOR) | Models invent “simple” queries and forget ownership checks | Every read and write must prove the signed-in user owns that row |
| Secrets leak (API keys, tokens) | Keys pasted into chat or shipped in front-end code | Revoke/replace the key; keep secrets server-side only; never commit them |
| Unsafe HTML or SQL (XSS / injection) | String-built queries and raw HTML from AI “just works” demos | Use the platform’s safe query APIs; don’t trust unescaped user HTML |
| Dependency sprawl | The agent adds packages “to help” | Require a reason for each package; lock versions; delete unused ones |
| No recovery path | Everything lives only inside a builder sandbox | Export source; know how to rebuild and redeploy without that one laptop |
Common checks before real users
Informal learning checklist — not a security audit, certification, or guarantee. Use it to ask better questions; get professional help for real personal data, payments, or regulated work. Printable companion: First production checklist.
Five high-impact topics to understand
- Secrets — no keys in browser, git, or chat screenshots; revoke if exposed
- Auth — sensitive pages/APIs require a real session, not “hidden URL”
- Access control — user A cannot open user B’s data by changing an ID
- Logout — actually ends the session (not only hide the UI)
- Errors — visitors don’t see stack traces or other people’s data
More gate items when you go further
- Database rules — default deny; test as two users (e.g. Supabase RLS)
- Injection / XSS — no string-concat SQL; careful with AI-generated HTML
- Uploads — type/size limits; no executables as public files
- Dependencies — pin versions; remove unused agent packages
- Admin — not “a secret URL nobody will guess”
- Logging — no passwords, tokens, or full card numbers
- Backups / monitor — you know what happens if it dies on a Friday night
Quick checks before you advertise
- One happy path for the money or data change that actually matters
- One negative check: user A cannot read user B’s record
- Empty forms + narrow (phone) window by hand
- A staging URL with real-ish settings — not only “works on my laptop”
Leaving the builder sandbox
- Source in Git with a README and example env (no real secrets in the file)
- You (or CI) can rebuild without one magic machine
- Dev / staging / prod settings are separate
- Monitoring and backups before hard marketing push
- AI workflow: small, reviewed changes — not “rewrite the whole app”
When to stop accepting AI rewrites
Pause big AI diffs when you cannot explain them, when security-sensitive files change “by accident,” or when tests get deleted to force a green build. Undo, restate the rules, re-apply in thin slices. Longer note: When to stop accepting AI diffs.
Healthy path · later gate
You know where the gate is
Night one was Steps 1–4. This page is the later gate — educational notes only, not a certificate that an app is safe for customers.
If you already finished the lab path, you’re done with the beginner map. Come back here when a demo is about to hold real people or real money — and get professional help for serious risk. Disclaimer · Terms
Deeper when you’re actually shipping
Not night-one homework. Educational only — see the notice at the top of this page.