Environment Configuration
Stadium 8 stores environment-specific settings — like your backend API address — in a local configuration file. This page explains the file, its variables, and what to watch out for.
The Configuration File
Section titled “The Configuration File”The app reads from web/.env.local. This file is created automatically when dependencies are installed. It is never committed to GitHub — the repository’s .gitignore already excludes it.
A template called web/.env.example comes with the repository. It lists every variable the application needs with placeholder values. You can open it at any time to see what variables are available.
Variables You May Need to Set
Section titled “Variables You May Need to Set”NEXT_PUBLIC_USE_MOCK_API — controls whether the app uses the mock backend or calls your real API. During development this is true. Set it to false when you are ready to connect to your real backend. Use the /api-go-live command to handle this switch — it updates the file for you.
NEXT_PUBLIC_API_BASE_URL — the URL of your backend API. The default points to http://localhost:8042. You do not need to change this while the mock is active.
A Warning About NEXT_PUBLIC_ Variables
Section titled “A Warning About NEXT_PUBLIC_ Variables”Any variable whose name starts with NEXT_PUBLIC_ is baked into the browser bundle at build time. That means it is visible to anyone who inspects the shipped application — in the JavaScript bundle, in network requests, or in browser developer tools.
Do not put sensitive values in NEXT_PUBLIC_* variables. API keys, tokens, passwords, or any value that should remain private must use server-side environment variables (without the NEXT_PUBLIC_ prefix).
Most Configuration Is Handled for You
Section titled “Most Configuration Is Handled for You”The majority of environment setup happens automatically:
web/.env.localis created when you first install dependencies- The Intake phase configures the authentication approach and sets API connection defaults
/api-go-liveswitches the app from mock to your real backend/api-mock-refreshupdates mocks when your API changes/api-statusshows the current connection state
You will typically only need to edit web/.env.local directly when setting up a cloned copy of the repository on a new machine, or when overriding a specific value that was not set during Intake.
Keeping Secrets Safe
Section titled “Keeping Secrets Safe”- Never share
web/.env.localin a chat, email, or document. Use your team’s password manager. - Never commit it to GitHub. Once something is committed to a repository, it stays in the history permanently even if deleted later.