23 February 2026

REP Protocol

An open protocol and reference implementation for secure runtime environment variables in browser applications.

REP, the Runtime Environment Protocol, is my attempt to fix a persistent frontend deployment problem: browser applications usually receive their environment variables at build time, which makes every environment need its own artifact.

REP moves that configuration boundary to runtime. A lightweight gateway reads environment variables when the application starts, classifies them by security tier, and injects the right payload into HTML responses. That makes it possible to build once and deploy the same image across environments.

The protocol defines three tiers:

  • PUBLIC values are sent as plaintext for synchronous access.
  • SENSITIVE values are encrypted and decrypted on demand.
  • SERVER values never leave the gateway process.

The reference implementation includes a Go gateway, a TypeScript SDK, CLI tooling, framework adapters, integrity checks, secret detection, and hot reload support for config changes.

The goal is simple: make runtime configuration safer, more portable, and easier to reason about for frontend applications.

Links: