Workspace hierarchy
Factorial Code supports workspace inheritance. A child workspace inherits all modules, processes and team variables from its parent as read-only resources — they can be imported, scheduled, and triggered by webhooks without copying any code, and inherited variables are available to every execution.
base-app (parent) └── prod-{appId} (child — inherits base-app) └── deploy-{deployId} (grandchild — per customer; no code, just variables and executions)Each shared workspace comes in a JavaScript and a Python variant; your App inherits the one matching its language — see Sample apps & foundation.
Base workspace — base-app
Section titled “Base workspace — base-app”Everything in base-app is available to every App workspace via fcode.import(...). You
never copy this code — it travels automatically through inheritance. It includes the
FactorialClient and shared utilities such as
fc-utils, checkWebhookChallenge, and setupWebhook. Integration Apps additionally inherit
base-integration-app. See Sample apps & foundation for
what each workspace provides.
Shared variables
Section titled “Shared variables”Variables follow the same hierarchy: a workspace uses the variables defined in any of its parents
without redefining them. Defining a variable with the same key in the child overrides the
inherited one for that workspace — the child’s value is what its executions see, and the parent’s
entry disappears from the child’s list. So an App can keep its defaults in prod-{appId} and let
each deploy-{deployId} override only what differs per customer.
Inherited variables are read-only where they are inherited: edit or delete them in the workspace that owns them, or override them locally. See Using Team Variables for the details.
Workspace types
Section titled “Workspace types”dev-{appId}— your development workspace. Clone it locally, build and test here. Requesting a release publishes a workspace version here, snapshotting every process and module under the release tag.prod-{appId}— the promoted, production version of your App. Read-only; changes flow through PRs and CI. Promotion copies the released workspace version and points theproductionalias at it.deploy-{deployId}— a per-customer workspace. It carries no code, only the customer’s own variables (credentials, mappings) and executions, inheritingbase-app,base-integration-app, andprod-{appId}— including their variables, so it only defines the values that are specific to that customer.