Skip to content

REP-RFC-0001

Title: Runtime Environment Protocol (REP)
Version: 0.1.0
Status: Active
Authors: Olamide Adebayo (Ruach Tech)
Created: 2026-02-18
License: CC BY 4.0

This document specifies the Runtime Environment Protocol (REP), a standardised method for injecting environment variables into browser-hosted applications at container startup rather than at build time. REP introduces a three-tier security classification system, cryptographic integrity verification, and an optional hot-reload mechanism.

REP operates at the infrastructure layer. It requires no build-tool plugins, no framework-specific adapters, and no changes to the application’s build process.

The full specification covers 14 sections. Key topics are documented separately in the docs site:

IDRequirement
R1Build-tool agnostic. Must work with any frontend framework or bundler without build-time plugins.
R2Security-classified. Must distinguish between public, sensitive, and server-only variables.
R3Integrity-verified. The injected configuration must be verifiable by the client SDK.
R4Synchronously accessible. Public variables must be available immediately on page load.
R5Zero application dependencies. The client SDK must have zero runtime dependencies.
R6Minimal footprint. Gateway under 5MB, SDK under 2KB gzipped.
R7Container-native. Must integrate with Docker and Kubernetes via standard env vars.
R8Incrementally adoptable. Must not require all-or-nothing migration.
R9Observable. Must emit structured logs and metrics for injection events.
R10Hot-reloadable (optional). Must support live config updates without page reload.
Featureenvsubstruntime-env-cra@import-meta-envreact-envREP
Framework agnosticYesNoPartialNoYes
No build tool pluginYesNoNoNoYes
Security classificationYes
Encrypted sensitive varsYes
Integrity verificationYes
Secret leak detectionYes
Hot reloadYes
No Node.js in prodPartialNoNoNoYes
Formal specificationYes
FROM scratch compatibleYes

Q: Why not use a service mesh / API gateway? Service meshes operate at L4/L7 for service-to-service communication. They don’t inject configuration into HTML. REP is complementary.

Q: Why not use SSR frameworks that support runtime env vars? SSR solves this for supported frameworks, but not all apps need SSR, it couples you to a specific framework, and many organisations have existing SPAs. REP works with any SPA.

Q: Isn’t the SENSITIVE tier just security through obscurity? Partially — see the Security Model for an honest assessment. SENSITIVE raises the bar against casual exposure while making intentional access auditable. For true secrets, use the SERVER tier.


The full source of REP-RFC-0001 is available at spec/REP-RFC-0001.md.