๐Ÿงช Environment Variable Test App

Client-side rendered at: 2026-01-21T11:27:12.037Z

Purpose: This app demonstrates the difference between build-time and runtime environment variables in Next.js.

Build-time vars (NEXT_PUBLIC_*): Baked into the JavaScript bundle. Require rebuild to change.

Runtime vars: Server-side only. Update instantly with pod restart.

๐Ÿ”จ Build-Time VariablesBUILD-TIMEPUBLIC

โš ๏ธ These variables are compiled into your JavaScript bundle and are visible to anyone who views the page source. Never use NEXT_PUBLIC_ prefix for secrets!
NEXT_PUBLIC_APP_NAMEEnvironment Test App - Production
NEXT_PUBLIC_API_URLhttps://api.galaxyhvh.com
NEXT_PUBLIC_ANALYTICS_IDUA-PROD-12345
NEXT_PUBLIC_FEATURE_FLAGtrue
NEXT_PUBLIC_BUILD_TIMESTAMP2026-01-21

โœ… These variables are accessible in the browser via process.env.NEXT_PUBLIC_*

๐Ÿ”„ To change these: Update env vars โ†’ Trigger redeploy โ†’ Wait 2-3 minutes for rebuild

โšก Runtime VariablesRUNTIMEPRIVATE

๐Ÿ”’ These variables are only available on the server. They are never sent to the browser.

Loading server environment...

๐Ÿ—„๏ธ Database Integration Test

PostgreSQL Connection Status

โŒ Database Not Connected

No database credentials configured

How to test:

1. Link a database to this app via Dashboard โ†’ Integrations

2. System injects DATABASE_URL and other variables

3. Click "Test Connection" to verify

4. Variables are runtime-only (secure, not in browser)

๐Ÿชฃ Object Storage Integration Test

S3-Compatible Storage Status

โŒ Object Storage Not Connected

No storage credentials configured

How to test:

1. Link an object storage bucket to this app via Dashboard โ†’ Integrations

2. System injects S3_* environment variables

3. Click "Test Connection" to verify bucket access

4. Variables are runtime-only (secure, not in browser)

โœ… Verification Checklist

Test Scenarios

โœ“ Scenario 1: Update NEXT_PUBLIC_* variable โ†’ Triggers rebuild โ†’ Takes 2-3 min

โœ“ Scenario 2: Update runtime variable (e.g., API_SECRET_KEY) โ†’ No rebuild โ†’ Takes 30 sec

โœ“ Scenario 3: Link database โ†’ Injects DATABASE_* vars โ†’ App restarts โ†’ Test connection works

โœ“ Scenario 4: Link bucket โ†’ Injects S3_* vars โ†’ App restarts โ†’ Test connection works

โœ“ Scenario 5: View page source โ†’ NEXT_PUBLIC_* visible โ†’ Runtime vars NOT visible (secure)