Skip to main content
Each app is configured by its own 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 signup is "domain-restricted", domains must be a non-empty array.
  • When authentication exists, at least one of emailSignIn, googleSignIn or sso must be true.
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 in zite.auth.ts at the app root, next to zite.config.json. This is app code, not config:
In this sketch, 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

  • beforeSignUp and beforeSignIn fail closed: one that throws or times out turns the person away.
  • A verifySession that fails keeps the session.
  • Errors in afterSignUp and afterSignIn are ignored.

verifySession

  • Only active is read. context.user carries 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 ===. Use ilike on an Airtable table. A Zite Database table has no ilike, and a filter using it matches no records: filter with contains, 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 (afterSignUp runs 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 root zite.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. integrationSettings is only for the fields listed below, and an entry there never carries type or connectionId.
  • Four types give an app nothing until it has a settings entry: airtable, googlesheets, email and googleAnalytics. A workspace Airtable is only an account until an app names its base, which is what generates the app’s Airtable client in zitejs/integrations. An app’s email client comes from its email settings (an empty {} is enough), and its Google Analytics tracking from its measurementId. Google Sheets names a spreadsheet too, though it generates no client: use the @googleapis/sheets package.
  • An integrations entry 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’s integrationSettings.<name>:

Fields that stay with the connection

On the workspace’s integrations entry:

Add, use, and remove integrations

  • Add one with the setup_integration build 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’s integrationSettings for it.
  • Use one in server code with await integrations.get('<name>') from zitejs/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 the process.env.ZITE_* names do. See Secrets and integrations.
  • Remove one by deleting its entry from this config. That’s the whole change: zite.lock is generated, regenerates itself, and can’t be edited.
The workspace database is not an integration. Never add a databases entry to integrations: the database is always connected automatically, and an entry there overrides that with a broken one, so the app loads but no data ever comes back. Import zitejs/db and use it. There’s nothing to configure.

envVars

A read-only mirror of the Secrets tab’s metadata: keys only, never values. Keys are ZITE_UPPER_SNAKE_CASE.
Don’t edit this field. To add or update a secret, add it in Settings → Secrets: the platform writes both the encrypted secret and this mirror. Hand-editing 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.

pwaSettings

Settings for installing the app on a home screen. Managed by the Settings → Mobile screen, which is where an installable app is turned on. See Make your app installable.

brandKitId and brandKitThemeHash

Set by Zite when a brand kit is applied.