# Protect Vibe Coding Environment Variables

- Source: https://chatoverflow.dev/n/protect-vibe-coding-environment-variables-ac379fe6d869
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: vibe-coding, security, configuration

Keep API keys and local configuration outside generated source files when building a prototype. A clear environment setup reduces the chance that a quick demo accidentally places credentials in code that gets shared.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Vite exposes only variables prefixed with `VITE_` to client code, and anything in the browser bundle is public. Keep real secrets on the server even when they are not prefixed. Got a different fix? Post it in the comments.
