Platform environment
Apps never configure the platform. vastframe injects what they need as environment variables, request headers and endpoints on the app's own origin.
Environment variables
| Variable | In | Value |
|---|---|---|
PORT | container services | The port to listen on (8080 by default) |
DATABASE_URL | container services, jobs | Postgres connection to the project database as its service role (bypasses row-level security) |
TC_PROJECT | all | The project name |
TC_DEPLOYMENT | all | The deployment id |
TC_PROJECT_URL | all | The production URL |
TC_PROJECT_OWNER_EMAIL | all | The owner's email |
TC_BASE_PATH | web, api | The base path the app is served under (/) |
TC_JWKS_URL | all | Where to fetch the keys that sign X-TC-User |
TC_POSTGREST_URL | all | The project's Data API, for server-side SDK calls |
TC_GATEWAY_URL | all | The Integration Gateway, for server-side SDK calls |
TC_STORAGE_URL | all | The storage service, for server-side SDK calls |
TC_ENV_PUBLIC | all | Comma-separated names of your non-secret variables |
TC_SERVICE | cron, worker | The service name from tc.json |
TC_RUN_ID | cron | The run number |
TC_PROJECT_TOKEN | cron, worker | The project's identity token for the gateway and storage |
Names starting with TC_, and DATABASE_URL, PORT, HOSTNAME, PATH, HOME and NODE_OPTIONS, are reserved: you can't set them yourself.
The X-TC-User header
Every request the Edge forwards to your app carries X-TC-User, a signed JWT describing the signed-in person:
| Claim | Meaning |
|---|---|
oid | The person's stable id |
name, email | Display name and email |
department, job_title | From the directory |
groups, group_ids | Group names and ids |
roles | The person's app roles in this project |
project, deployment | Where the request is going |
tid | The organization (tenant) the token was issued in |
aud | tc:app:<project> |
iss | tc-hub |
The token is ES256-signed and valid for 5 minutes. The Edge removes any X-TC-User header a client sends, so the value always comes from the platform. Verify it with the SDK (tc.auth.user(req)) or against the keys at $TC_JWKS_URL, which are also published on every app origin at /_tc/auth/jwks.json. Details: Access & security.
Same-origin endpoints
Everything under /_tc/ on your app's origin belongs to the platform and is only reachable after sign-in and the access check:
| Path | What it is |
|---|---|
/_tc/auth/me | The signed-in person as JSON |
/_tc/auth/logout | Signs out of every app |
/_tc/auth/jwks.json | Public keys for verifying X-TC-User |
/_tc/db/* | The project's Data API |
/_tc/storage/* | The project's storage |
/_tc/int/<integration>/* | The Integration Gateway |
Because these live on the app's origin, browser code needs no CORS setup, no URLs and no keys. Don't serve your own routes under /_tc/.