Mismatched Configs: Dev Works, Production Breaks — How to Fix It
You click through your app locally and everything works; you share the live link and a few things fall apart. Sign‑in fails for new users, emails do not send, or a page looks different than it did yesterday. This gap between development and production is often a simple one: mismatched configurations. In vibe‑coding and AI‑first development, where fast iteration is the norm, it’s easy for settings to drift and cause surprising behavior.
What “config” means
Configuration is the set of switches that tell your app how to behave in different places. On your laptop, it may use a test key, a local URL, and a sample database. Online, it needs the real key, the public URL, and the live database. If those switches are not in sync, you see odd results: features that work for you but not for users, pages that load in one place and not the other, or sign‑ins that loop endlessly.
AI app generation can produce a working draft without wiring every setting, which is why vibe‑coded and no‑code apps sometimes drift as they grow. The fix is to make those switches visible and consistent.
Common symptoms users feel
- A sign‑in that works locally but fails on the live site
- Buttons that do nothing on production while they behave on your machine
- Emails that never arrive after a “success” message
- A link that takes you to the wrong page in one environment
These are outcome problems, not technical trivia. They make people churn because the app feels unpredictable.
A short alignment checklist
Use the same simple list whenever something works in one place and breaks in another.
- Keys and secrets: add the real values for auth, email, and payments to production
- URLs and hosts: avoid hard‑coding “localhost”; use environment‑based URLs
- Data sources: point production at the real database or live API, not a test one
- Feature flags: keep a single source of truth for on/off switches
Once you change a setting, click through the two or three user paths that matter most: sign‑up to home, sign‑in to home, and a small edit that saves. If those are stable online, you can share the link with confidence.
Keep drift from returning
Mismatched configs are not a one‑time problem; they creep back in whenever you add a tool or a feature. A few habits keep drift from returning.
- Keep a tiny “.env example” list so you know which settings exist
- Set the same build command everywhere so outcomes match
- Use preview links on hosts like Vercel or Netlify to test changes live
- Restate constraints in your prompts so AI‑generated changes respect them
Cursor, Claude Code, Lovable, Bolt.new, Replit, and Vercel v0 make it fast to build a convincing demo. Aligning configs makes that demo reliable in production, which is the only result customers notice.
If your live link keeps “almost working” and you need outside help to steady things, Spin by fryga can step in to align settings and get core flows back to a stable, predictable state.
Founder FAQs
Do we need separate dev/staging/production? Yes, even if light‑weight. Separate spaces keep experiments from affecting real users and make it easier to compare settings when something breaks.
What should we document? The minimum: required keys, expected URLs, and any feature flags. A half‑page doc beats guessing under pressure.
Can AI keep configs aligned? It can help generate environment files and check for missing values if you ask it to compare your one‑page plan against the repo, but you still own the final check.