Docs / Repository contracts

Each repository describes itself.

There is no giant project-level envforge.yml. Each repo owns the commands, ports, resources, inputs, outputs, environment mappings, setup steps, and tests needed to run that service in a workspace.

servicename: Web App

portshttp: 3000

resourcescache: optional

inputsapi_url: required

environmentVITE_API_URL: from: input.api_url

Dependency injection

Dependency injection rules.

Keep service wiring out of repo config. The repo names what it needs, the project binding chooses the source, and the runtime injects the resolved value.

Declare inputsinput.api_url

Repos declare the inputs their service needs in envforge.yml, using product contracts like API_URL or DATABASE_URL instead of source details.

Avoid service couplingno depends_on

No depends_on, backend.host, or cross-service references in repo configs. Service order and provider choice stay outside the repo.

Bind values laterproject bindings

Project bindings provide the actual values for each workspace, then EnvForge injects them into the declared environment when the runtime wakes.

Model

Inputs keep repos independent.

No depends_on in repo configs. The web repo says it needs an API URL; EnvForge project bindings decide where that URL comes from.

Repo config

Web App declares input.api_url and maps it into VITE_API_URL.

Project binding

Web App.input.api_url resolves through the same-origin /api route to Backend.

Runtime render

EnvForge injects resolved resource values, workspace metadata, and inputs into service env files.

version: 1
service:
  name: Web App
  type: vite
ports:
  http: 3000
resources:
  cache:
    required: false
inputs:
  api_url:
    required: true
environment:
  VITE_API_URL:
    from: input.api_url
setup:
  install:
    - npm install
tests:
  unit:
    - npm test