Skip to main content
An Attio app is organized by folder convention under 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 under src/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
The 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.tsx or extension.ts.
  • Extensions are identified by the id property in the defineExtension call, not by the folder name. Ids must be unique across the app.
  • id and type must be written as string literals, and the defineExtension(...) call must be the file’s default export directly. Wrapping defineExtension in another function call, or assigning id and type to 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.tsx like any other module.

Settings

Workspace settings live in src/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 in src/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.ts is optional.
  • If the same extension id is 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.ts or app.ts settings.workspace) is a build error. Migrate settings in one step.
To convert an existing app automatically, use attio migrate folder-structure.