2TECH.WORK
2TECH.WORK / DOCS

Configuration belongs outside your code

Make required settings visible to maintainers while keeping private values out of repositories and public assets.

Read more
Architecture and connections described on this page.
01

Classify each setting

Public configuration can include a display name or public endpoint. Sensitive settings include credentials and signing material. Treat them differently when choosing storage and permissions. Browser code is visible to visitors: a variable embedded in a frontend build is public regardless of its name.

02

Document names, not secrets

Maintain example configuration with explanations and harmless placeholders. Validate required values at startup and report a missing variable name without printing its contents. Keep development, preview and production settings distinct. Review configuration changes with the same care as code.

03

Rotate access deliberately

When replacing a credential, update dependent services and verify the result before revoking the old value where the provider supports that sequence. Revoke exposed credentials promptly. Do not copy whole environment files into tickets or logs; share names and redacted errors instead.

Configuration example
APP_ENV=production
PUBLIC_SITE_URL=https://example.com
API_BASE_URL=https://api.example.com