apps/<dir>/zite.config.json, and the workspace root has a
zite.config.json that holds the workspace’s integrations. You edit both directly, with the write_file and
edit_file build tools. This page documents every field: its type, valid values, and
constraints.
Fields you don’t edit
A few fields are written by the platform or changed in the editor. Keep them as they are whenever you rewrite the file.accessMode
"internal" | "external", optional. Controls who can reach the app.
New apps are seeded with an explicit
"internal". If the key is absent entirely, the app falls back to
"external", so read the app’s own zite.config.json rather than assuming.
Set this field directly. Writing it publishes nothing: the live app’s access changes only when the app is
published, and the publish dialog warns which apps a publish would make public or internal. Change the
value, but never remove the key: an app that loses it falls back to the default instead of keeping the
mode that was chosen. See Access and sign-in for what each mode
means for your code.
authentication
Controls the sign-in methods, who may sign up, and the sender of sign-in emails.Whether a public app has sign-in is decided by its code, not by this field. An app has sign-in when its
pages send people to sign in (a
loginHref guard in beforeLoad) and its server functions are
signedInFn. A landing page built from scratch simply never does. To remove built-in sign-in, remove
those guards and sign-in links and make the functions behind public pages publicFn, and keep any custom
authentication the app implements against its own data or integrations. This field configures how sign-in
works for an app that uses it, so leave it alone when removing sign-in.
Constraints:
- When
signupis"domain-restricted",domainsmust be a non-empty array. - When
authenticationexists, at least one ofemailSignIn,googleSignInorssomust betrue.
SSO (
authenticationMethods.sso) needs the Enterprise plan: without it, leave sso as false. The
sign-in email fields (emailSender, emailBrandKitId) and authPage need the Business plan: without it,
leave them unset.emailSender routes sign-in emails through an email integration whose provider is "gmail",
"outlookEmail" or "smtp". That’s the email type with one of those providers, not a gmail or
outlook type integration. If there’s none, connect one with setup_integration. A workspace integration
also needs this app’s integrationSettings.<name> entry, and {} is enough. "zite_email" is the default
sender, so leave emailSender unset to use it. A sender the app can’t use is ignored, and sign-in emails go
out from the default Zite address.
authPage customizes the sign-in and sign-up screen’s logo (the linked brand kit’s) and copy. Its
colours, fonts and radius come from the :root variables in src/index.css, which also style the rest of
the app. The screen uses the :root values even when the app is in dark mode, so a sign-in-only colour
change isn’t possible.
Auth hooks
When an app’s users live in an external system (an Airtable table, a CRM, an internal API), define auth lifecycle hooks inzite.auth.ts at the app root, next to zite.config.json. This is app code, not
config:
Roster is the app’s generated Airtable client for the roster table, and stillActive is
your own lookup in the external system.
Every hook is optional and fully typed through the import, so no annotations are needed. The user the
hooks receive is { id, email, name }.
When a hook fails
beforeSignUpandbeforeSignInfail closed: one that throws or times out turns the person away.- A
verifySessionthat fails keeps the session. - Errors in
afterSignUpandafterSignInare ignored.
verifySession
- Only
activeis read.context.usercarries the platform’s fields alone, so a server function that needs more about the person looks it up in the external source. - Results are cached for about 5 minutes.
- A revocation signs the person out for real, in each browser at its next check. Return
{ active: false }only when you’re sure the person is gone, not when a lookup merely came back empty. - Match identifiers case-insensitively, not with
===. Useilikeon an Airtable table. A Zite Database table has noilike, and a filter using it matches no records: filter withcontains, and keep the record whose value, lowercased, equals the lowercased email.
Gotchas
- Neither sign-in gate runs for a user created seconds ago. A sign-up in flight hasn’t reached your
external system yet (
afterSignUpruns after it), so gating it would deny the very sign-up you just allowed. - Write hook functions out literally, as
async beforeSignUp(input) { ... }. Which hooks exist is detected from the file at build time. - Pair external-roster hooks with
signup: "disabled", so the roster and invitations are the only ways in.
integrations and integrationSettings
Two files, two jobs. The workspace rootzite.config.json holds the connections, under integrations,
and every app in the workspace can use them. An app’s own apps/<dir>/zite.config.json holds only what
differs for that app, under integrationSettings, keyed by the workspace integration’s name.
zite.config.json (workspace root)
apps/<dir>/zite.config.json
- An app uses a workspace integration without declaring anything.
integrationSettingsis only for the fields listed below, and an entry there never carriestypeorconnectionId. - Four types give an app nothing until it has a settings entry:
airtable,googlesheets,emailandgoogleAnalytics. A workspace Airtable is only an account until an app names itsbase, which is what generates the app’s Airtable client inzitejs/integrations. An app’s email client comes from itsemailsettings (an empty{}is enough), and its Google Analytics tracking from itsmeasurementId. Google Sheets names aspreadsheettoo, though it generates no client: use the@googleapis/sheetspackage. - An
integrationsentry in an app’s config shadows the workspace’s entry of the same name. Older apps may have entries there from before. They keep working and don’t need moving.
Per-app settings
In an app’sintegrationSettings.<name>:
Fields that stay with the connection
On the workspace’sintegrations entry:
Add, use, and remove integrations
- Add one with the
setup_integrationbuild tool. Connecting needs a person to approve the OAuth sign-in. The workspace entry is saved when they connect, and you write only the app’sintegrationSettingsfor it. - Use one in server code with
await integrations.get('<name>')fromzitejs/integrations, where the name is the entry’s key in this file. A name never changes when a second account of the type is connected, while theprocess.env.ZITE_*names do. See Secrets and integrations. - Remove one by deleting its entry from this config. That’s the whole change:
zite.lockis generated, regenerates itself, and can’t be edited.
envVars
A read-only mirror of the Secrets tab’s metadata: keys only, never values. Keys areZITE_UPPER_SNAKE_CASE.
envVars, or restoring wiped keys with
write_file or edit_file, doesn’t create a real secret and is overwritten on the next sync. See
Secrets.
seoSettings
The app’s browser tab title, favicon, and link preview (the card shown when someone shares the app’s URL in Slack, iMessage, or social media):
These are the app-wide defaults. A route’s
head() can set its own title, description and share tags for
its page. The favicon comes only from here.