Environments
Environments
Section titled “Environments”Overview
Section titled “Overview”An environment is a platform-level workspace such as production, staging, or a demo area. It controls which backend configuration, storage, database, jobs, and service endpoints are used.
How it works
Section titled “How it works”Every data operation runs inside one active environment. The same user may have access to several environments, but Rokks never treats them as interchangeable. Data loaded in one environment does not automatically appear in another.
Integrators use environments to separate lifecycle stages and infrastructure targets. Users use the environment selector to avoid editing the wrong workspace.
Service and persistence scope
Section titled “Service and persistence scope”Shared application services serve every enabled environment. Storage is the explicit exception: each environment selects its PostgreSQL and document-store instance in Service Stack configuration. The environment record is the only owner of those bindings; there is no second service-assignment matrix or instance-level environment list.
For PostgreSQL, the database name is exactly the environment ID (dev, uat,
or prod) and each tenant owns a tn_<id> schema inside it. Runtime services
use separate least-privilege data and platform identities. The privileged
database identity exists only for provisioning and is never used for dashboard
queries, imports, or platform telemetry.
Display identity and storage routing
Section titled “Display identity and storage routing”An environment has two deliberately separate identifiers:
| Field | Purpose | Example |
|---|---|---|
| Display name | Human-facing label in selectors and screens | Development |
Document routing key (firestoreNamespace) |
Technical deployment configuration | TEST |
ROKKS does not elect a default environment and does not invent a default
document namespace. If routing configuration is absent, the environment remains
explicitly unconfigured instead of reading from a plausible fallback. Display
names never alter storage routing. Changing a technical routing key is therefore
an explicit data migration, not a rename shortcut.
Step-by-step
Section titled “Step-by-step”- Check the environment selector before starting work.
- Use production for live business workflows.
- Use staging or demo environments for testing sources, dashboards, and alert rules.
- Confirm that jobs and dashboards you expect are visible after switching.
- Ask an administrator if an environment is missing from your selector.
Common mistakes
Section titled “Common mistakes”Do not copy values from one environment into another without understanding the target tenant. Environment and tenant together define the scope.
Do not test destructive operations in production. Use a non-production environment when validating imports, purge flows, or schema changes.