app.ts file provides a centralized way to register all of your app’s entry points - the various features and UI components that integrate with Attio’s interface.
This file should be located directly the root of your src directory (src/app.ts or src/app.tsx). It should be generated when you initialize your app. If it was not, check the migration guide.
Basic structure
Everyapp.ts file follows this structure:
Entry point types
Theapp.ts file organizes entry points into logical categories:
Record entry points
These appear on record pages (companies, people, deals, etc.):record.actions: Array<App.Record.Action>
record.bulkActions: Array<App.Record.BulkAction>
record.widgets: Array<App.Record.Widget>
Call recording entry points
These appear in call recording contexts:callRecording.insight.textActions: Array<App.CallRecording.Insight.TextSelectionAction>
callRecording.summary.textActions: Array<App.CallRecording.Summary.TextSelectionAction>
callRecording.transcript.textActions: Array<App.CallRecording.Transcript.TextSelectionAction>
Best practices
1. Use descriptive names
Use clear, descriptive names for your entry points:2. Organize your file structure
Match your file structure to theapp object organization:
3. Keep app.ts simple
Theapp.ts file should primarily contain imports and the configuration object. Keep business logic in the individual entry point files.