src/app/. Extensions, workspace settings, events, webhooks, and workflow blocks each live in their corresponding folders, and the CLI discovers and registers everything automatically based on the file structure.
Extensions
An extension is a single addition your app makes to the Attio UI. Every extension lives in its own folder undersrc/app/extensions/, which must contain a file named exactly extension.tsx (or extension.ts) that directly default-exports a defineExtension call:
src/app/extensions/show-weather-forecast/extension.tsx
type field identifies the kind of extension and narrows the remaining configuration to the matching shape:
Discovery rules
- Extension folders can be nested at any depth under
src/app/extensions/, but each folder contains at most one definition file,extension.tsxorextension.ts. - Extensions are identified by the
idproperty in thedefineExtensioncall, not by the folder name. Ids must be unique across the app. idandtypemust be written as string literals, and thedefineExtension(...)call must be the file’s default export directly. WrappingdefineExtensionin another function call, or assigningidandtypeto variables, is not permitted.- Ids are lowercase kebab-case: they start with a letter, contain only lowercase letters, digits, and single hyphens, and are at most 64 characters.
- Sibling files in an extension folder are ignored by discovery; import them from
extension.tsxlike any other module.
Settings
Workspace settings live insrc/app/settings/: a schema file default-exporting Settings.defineWorkspaceSchema and a page file default-exporting Settings.defineWorkspacePage. By convention these are schema.ts and page.tsx. See the Settings overview.
Events and webhooks
Event handlers live insrc/app/events/ with an .event.ts suffix, and webhook handlers live in src/app/webhooks/ with a .webhook.ts suffix.
Server functions and workflow blocks
Server functions keep their.server.ts suffix and can live anywhere in src/. Workflow blocks live in their own folders under src/app/blocks/. See the workflow block file structure.
Using a legacy app.ts
Apps created before the folder-based layout register their entry points in a central app.ts file. app.ts files are still supported but marked as deprecated: existing apps keep working, while new apps use the folder-based convention. You can use both the folder-based convention and the app.ts manifest at the same time while you migrate:
- Once
src/app/exists,app.tsis optional. - If the same extension
idis registered in both places, the folder-based definition wins. - Settings are the exception: defining settings both in
src/app/settings/and via the legacy API (app.settings.tsorapp.tssettings.workspace) is a build error. Migrate settings in one step.
attio migrate folder-structure.