Shipping Your First App
From localhost to a real URL anyone on earth can open.
Before this: Databases and CRUD
Objective
Deploy your Expense Tracker to public hosting, understand builds and environment configuration, and establish the ship-verify-rollback rhythm.
Vocabulary
The words to use when directing your agent.
- deployment
- Making your app available on a public server instead of only your machine.
- build
- The process turning source code into optimized files ready to serve.
- hosting platform
- A service (Vercel, Netlify, etc.) that runs your deployed app.
- environment variable
- Configuration supplied to the app from outside the code - URLs, flags, secrets.
- rollback
- Reverting a deployment to the previous working version.
Understand it
Configuration lives outside code
Settings that differ between your laptop and production (API base URLs, feature flags) belong in environment variables, never hardcoded. The twelve-factor habit: code is constant, config varies by environment.
Ship, verify, roll back
Deployment is not done at 'Deploy Succeeded'. Open the live URL, perform the restart test against production, check the critical flows. Broken? Roll back to the previous deployment - platforms keep history precisely for this. Shipping is a rhythm, not an event.
Core concepts
localhost is not the internet
Your machine differs from a server: OS, paths, environment variables, network. Deployment surprises come from exactly these differences. The cure is deploying EARLY and OFTEN - every week, not at the end.
Builds freeze reality
A deployment serves the built snapshot, not your live editor. Changed code without a rebuild changes nothing on the public URL. Know which revision your URL serves - hosting dashboards show it.
Examples
The classic deploy surprise
Works locally, crashes live: cause is usually an unset environment variable or a path case-sensitivity difference. Read the platform's runtime logs - they name the exact error.
Rollback in practice
Bad deploy at 4pm; users see errors. Rollback to 3pm's deployment takes one click and restores service while you debug calmly. This is why platforms retain deployment history.
Common mistakes
Common mistake
Deploying once at the end of a project.
Fix
Deploy in week one, then continuously. Small diffs between deployments make problems findable.
Common mistake
Announcing the launch before verifying the live URL yourself.
Fix
Personal ritual: run your own Definition of Done against PRODUCTION before sharing any link.
Working with your AI agent
Have your agent prepare a pre-deploy checklist specific to your stack (env vars needed, build command, health check), then walk it with you on every deploy. Agents know platform quirks; make them write the checklist down.
Build it
The module’s real project. Your agent builds; you direct and inspect.
Project: Expense Tracker, Shipped
Take Expense Tracker v1 to a permanent public URL, verify production with your own DoD, and practice the rollback path once on purpose.
Requirements
- Live public URL serving the tracker (free tier hosting is fine)
- Production restart test passes - data persists on the hosted instance
- One deliberate rollback performed and documented (deploy a broken marker, verify, roll back)
- README updated: live URL, platform, env vars needed (even if none), how to run locally and deployed
Context for your agent
Guide me deploying my Expense Tracker to a free hosting platform appropriate for its stack. Prepare the pre-deploy checklist first (required env vars, build command, expected failure modes). After deploy, walk me through verifying production with my DoD, then coach one deliberate rollback rehearsal: deploy a visible broken marker, confirm it live, roll back, confirm restoration. Finally update the README with the live URL and run/deploy instructions.
Verify it - twice
Check every item yourself first. Then hand your agent the prompt and compare verdicts.
Verification prompt - paste into your AI agent
Perform a production-readiness review of my shipped Expense Tracker. Visit the live URL yourself if you can. Verify PASS or FAIL with evidence: (1) all CRUD flows function on the public URL, (2) persistence works in production (restart test), (3) README lists live URL, platform, env vars and run instructions accurately, (4) no secrets in the deployed bundle or repo history, (5) the rollback rehearsal artifacts (marker deploy + revert) are documented. Then list the two most likely production failure modes for THIS app and how you detected or mitigated each.
Run this against “Shipping Your First App” after your own checklist pass. Where the agent and you disagree, investigate before moving on.
Review questions
Answer out loud. If you cannot, revisit before moving on.
Why deploy weekly instead of once at the end?
Your live site breaks after a deploy - what are your first three moves?
Name two settings that belong in environment variables, not code.
You can now
- Ship a real app to a public URL and verify it there
- Keep configuration out of code
- Execute the ship-verify-rollback rhythm under control
Up next
Servers and Backends