Skip to main content
hexclave.config.ts is the config file for your Hexclave project. It contains all important settings for your project. The file exports a static config object:
hexclave.config.ts
Always import config helpers from the package’s lightweight /config entrypoint (e.g. @hexclave/js/config, @hexclave/next/config) rather than the package root. The /config entrypoint contains no framework runtime code, so tooling such as the local dashboard can load your config file in a plain Node context. Importing defineHexclaveConfig (or the HexclaveConfig type) from the package root instead would pull in the entire SDK and fail to load.
To get type-checking and editor autocomplete for your config object, wrap it with defineHexclaveConfig:
hexclave.config.ts
If you are running Hexclave with a local dashboard, you already have a hexclave.config.ts file, and any changes you make on the dashboard will automatically be synced to the config file. If you are running Hexclave on a cloud project instead, you may need to use the CLI’s pull and push commands to sync your config file with the cloud. In production, you would usually do this in your GitHub Actions or CI/CD pipeline.

How To Read This Page

Most nested maps use IDs that you choose, such as payments.products.pro or rbac.permissions.admin. Unless a field says otherwise, custom IDs can contain letters, numbers, underscores, and hyphens, must not start with a hyphen, and can be up to 63 characters long.

Top-Level Sections

Apps

apps.installed is a map from app ID to app settings.
hexclave.config.ts
For more information on the major apps you can enable here, see the app docs for Authentication, Teams, RBAC, API Keys, Emails, Payments, Data Vault, and Webhooks.

Auth

These fields control who can create accounts and which sign-in methods are available. For more information on sign-up, sign-in, and user sessions, see the Authentication app docs and User Fundamentals.

OAuth

OAuth providers live under auth.oauth.providers. Valid OAuth provider types are google, github, microsoft, spotify, facebook, discord, gitlab, bitbucket, linkedin, apple, x, and twitch. For provider-specific setup instructions, see All Auth Providers. For account linking behavior, see Connected Accounts. accountMergeStrategy options:
hexclave.config.ts
OAuth client IDs, client secrets, custom callback URLs, Apple bundle IDs, Facebook config IDs, and Microsoft tenant IDs are environment-specific and are not configured in hexclave.config.ts.

Sign-Up Rules

Sign-up rules are evaluated during sign-up. Higher priority rules run first. The first matching rule decides the outcome.
hexclave.config.ts
See Sign-up Rules for the condition variables and examples.

RBAC

RBAC config defines permissions and default grants. Permission IDs support lowercase letters, numbers, underscores, and colons. System permission IDs may start with $.
hexclave.config.ts
See RBAC Permissions for how to check and grant permissions in code.

API Keys

For more information on creating, listing, and validating API keys, see the API Keys app docs and the ApiKey SDK type.

Teams And Users

For more information on team behavior, see Teams and Team Selection. For user profile, metadata, and onboarding behavior, see User Fundamentals and User Onboarding.

Emails

The config file can define email themes and templates. Email delivery settings, such as SMTP credentials and sender address, are environment-specific and are not configured here. See Emails for sending emails from your application.

Payments

Payments config is where you define what customers can buy and what entitlements those purchases grant. Supported currency fields are USD, EUR, GBP, JPY, INR, AUD, and CAD.
All currency/price amounts are decimal strings like "9.99" or "1000"not cent integers or minor-unit numbers. For example, nine dollars and ninety-nine cents is "9.99", not 999.
For more information on products, product lines, prices, items, checkout, and entitlement checks, see the Payments app docs. For the SDK shapes returned by entitlement APIs, see the Customer SDK type and Item SDK type. In the tables below, DayInterval means [number, "day" | "week" | "month" | "year"].

Global Payment Settings

payments.testMode is environment-specific and is not configured in hexclave.config.ts.

Product Lines

Product lines group mutually exclusive products, such as Free, Pro, and Enterprise plans. For more information on how product lines, add-ons, and switching plans work together, see Defining products.

Products

Prices

Each price must include at least one supported currency. Currency amounts are decimal strings in "<integer>" or "<integer>.<decimals>" format (e.g. "9.99", "0.01", "1000"). Do not use cent integers — to represent $9.99, write "9.99", not 999.

Included Items And Standalone Items

Items are quantifiable entitlements, such as credits, seats, messages, or API calls. For more information on item balances and consuming entitlements in your app, see Checking item balances.
hexclave.config.ts
See Payments for checkout and entitlement usage.

DB Sync

dbSync.externalDatabases defines external databases that Hexclave can sync to. For more information on connecting Hexclave with your own backend and database workflows, see Setup and the REST API overview.
A database connection string is sensitive. Only put it in hexclave.config.ts if that file is kept private and reviewed like other secrets.

Data Vault

For more information on storing sensitive user data, see the Data Vault app docs.

Domains

domains is reserved in the config file and currently has no file-level attributes. Trusted domains, localhost allowance, and handler paths are environment-specific settings. For more information on production readiness and domain-related launch checks, see the Launch Checklist.