Guides, setup, comparison, and practical continuation for owned repos.
Docs · Environment variables
Most real apps need a few secrets to run — a database URL, a Stripe key, an OpenAI token. Virex generates the wiring; you provide the keys. This page explains what Virex asks for, what we never see, and how the flow works on each plan.
The most important thing first.
If you build a repo with your Stripe key, then come back tomorrow and ask Virex to add a feature, the live preview keeps working because we decrypt your stored Stripe key at sandbox boot. Sub-processors and humans (including us) cannot read it — only the running sandbox can. The downloaded zip stays clean.
Depends on what your app does. The engine detects required env vars from the features your prompt asks for.
If your app needs to store anything, Virex generates a Supabase schema and asks for NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY (and SUPABASE_SERVICE_ROLE_KEY when server-side writes are needed).
If your app accepts payment, you'll see STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET (plus NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY for the client side).
If your app uses LLM features at runtime — a chat box that talks to GPT, an article summariser — Virex asks for the relevant API key (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc) and wires it server-side so the key never reaches the browser.
If your app sends transactional email (welcome, password reset, receipts), Virex asks for the Postmark/Resend/SendGrid key + the from-address.
If your app has OAuth login, Virex asks for the OAuth client id + secret per provider you choose. These are set on the Supabase project, not in your env file directly.
Virex always ships an .env.example with the full list and an .env.local with placeholder values. The build runs locally without any real keys — you'll see placeholders in the preview. Add keys when you're ready to connect each piece for real.
Same privacy guarantee on every plan — the difference is how the engine asks for them.
At build time the chat asks 'Do you have your own keys for X, Y, Z?' with a 60-second timer. Click yes, paste them, the values are encrypted at rest and used by the live preview + subsequent edits so your work flows naturally. Click no (or let the timer expire) and the build ships with placeholders that you fill in after downloading. Skipping never blocks the build.
If you've used Virex before with the same vendors, Premium pre-fills the env var NAME you used previously (the value stays empty — we don't fill values across projects). Saves you remembering whether you called it STRIPE_KEY or STRIPE_SECRET_KEY. You paste a value or skip.
When Pro users hit 'Deploy to Vercel via GitHub', the keys you saved are decrypted server-side once and pushed directly into the GitHub repo's Secrets (encrypted by GitHub from then on). The deploy step picks them up automatically. We don't keep a copy beyond what's already encrypted in your project's env store.
(1) projects/<id>/env.json in our Supabase Storage, encrypted with BYOK_MASTER_KEY — used by the sandbox at preview boot. (2) GitHub Secrets of any repo you push to via the one-click ship — encrypted by GitHub. (3) Your local .env.local that YOU create from .env.example after download. Plaintext only lives where you put it — never in our infrastructure.
If you skipped the env-var step or want to add a key after downloading, here are the standard paths.
Open `.env.local` in your editor and replace the placeholder with your real value. Restart `npm run dev`. The new key picks up on the next render.
Repo → Settings → Secrets and variables → Actions → New repository secret. Name and value. Used by GitHub Actions deploys + by the integration we set up if you used the GitHub one-click ship.
Project → Settings → Environment Variables → Add. Pick which environments (Production / Preview / Development) — usually all three for app-critical keys, Production only for live-only ones like Stripe. Redeploy after adding.
Short answers to what people usually ask.
Yes — the .env.example file in your downloaded repo lists every required env var with a short description. .env.local has the actual structure with placeholders so you can compare.
Skip them. Builds run with placeholders. The features that need real keys will display a friendly 'connect your Stripe account' state instead of failing. You fill the keys in when you're ready.
No. The build prompt (your project description) is logged for engine telemetry and abuse review. Keys are entered in a SEPARATE flow that never touches the prompt log. Even if someone could see your prompt, they wouldn't see your keys — they're in a different code path entirely.
That's on you to remediate (rotate the key with the vendor and force-push the cleaned commit), but we have your back on the path that leads there: pasted keys go into .env.local (which our generated .gitignore excludes from commits) or directly into GitHub Secrets (which are encrypted and not visible to anyone who clones the repo). The only way a key leaks is if you actively add .env.local to git and push it. We can't undo that, but the default setup prevents it.
Plans (which vendors each tier expects) · Deploy (the GitHub + Vercel push flow) · Supabase (the backend layer that uses these keys) · Privacy & terms (the formal version of the no-storage guarantee).