In plain words
A setting your app reads from outside the code, so secrets and per-machine values don't live in your files.
Where you see it
The "Environment variables" screen in Lovable or Vercel, or a .env file with lines like SUPABASE_URL=... Your code only says the name; the host fills in the value when the app starts.
What goes wrong
- Pasting the API key straight into the code, then pushing it to GitHub
Bots scan public repos for keys within minutes. Once pushed, treat the key as leaked and replace it.
const stripe = new Stripe("sk_live_51H...") - Using a secret key in browser code
Anything starting with NEXT_PUBLIC_ or VITE_ is shipped to every visitor's browser, where anyone can read it.
VITE_STRIPE_SECRET_KEY=sk_live_... - Forgetting to add the variable on the host
It works on your laptop, where the .env file lives, then breaks after deploy because the host never got the value.
What to tell your agent
Quick check
Sign in to earn +10 XP for itYour app works on your laptop but payments break after deploy. Most likely?