packages/twenty-docs/developers/extend/apps/config/application.mdx
Every app must have exactly one defineApplication call. It declares:
import { defineApplication } from 'twenty-sdk/define';
export default defineApplication({
universalIdentifier: '39783023-bcac-41e3-b0d2-ff1944d8465d',
displayName: 'My Twenty App',
description: 'My first Twenty app',
applicationVariables: {
DEFAULT_RECIPIENT_NAME: {
universalIdentifier: '19e94e59-d4fe-4251-8981-b96d0a9f74de',
description: 'Default recipient name for postcards',
value: 'Jane Doe',
isSecret: false,
},
},
});
Notes:
universalIdentifier fields are deterministic IDs you own. Generate them once and keep them stable across syncs.applicationVariables become environment variables for your functions and front components (e.g., DEFAULT_RECIPIENT_NAME is available as process.env.DEFAULT_RECIPIENT_NAME).defineApplicationRole() — you do not need to reference it from defineApplication().defineApplication().defaultRoleUniversalIdentifier explicitly is still supported for backward compatibility, but is deprecated in favor of defineApplicationRole().The role declared with defineApplicationRole() controls what the app's logic functions and front components can access:
TWENTY_APP_ACCESS_TOKEN is derived from this role.When you scaffold a new app, the CLI creates a starter role file at src/roles/default-role.ts. See Roles & Permissions for the full reference.
If you plan to publish your app, these optional fields control how it appears in the marketplace:
| Field | Description |
|---|---|
author | Author or company name |
category | App category for marketplace filtering |
logoUrl | Path to your app logo (e.g., public/logo.png) |
screenshots | Array of screenshot paths (e.g., public/screenshot-1.png) |
aboutDescription | Longer markdown description for the "About" tab. If omitted, the marketplace uses the package's README.md from npm |
websiteUrl | Link to your website |
termsUrl | Link to terms of service |
emailSupport | Support email address |
issueReportUrl | Link to issue tracker |