packages/twenty-docs/developers/extend/apps/building.mdx
Twenty apps are TypeScript packages that extend your workspace with custom objects, logic, UI components, and AI capabilities. They run on the Twenty platform with full sandboxing and permission controls.
An app is a collection of entities declared using defineEntity() functions from the twenty-sdk package. The SDK detects these declarations via AST analysis at build time and produces a manifest — a complete description of what your app adds to a workspace.
your-app/
├── src/
│ ├── application-config.ts ← defineApplication (required, one per app)
│ ├── roles/ ← defineRole
│ ├── objects/ ← defineObject
│ ├── fields/ ← defineField
│ ├── logic-functions/ ← defineLogicFunction
│ ├── front-components/ ← defineFrontComponent
│ ├── skills/ ← defineSkill
│ ├── agents/ ← defineAgent
│ ├── views/ ← defineView
│ ├── navigation-menu-items/ ← defineNavigationMenuItem
│ └── page-layouts/ ← definePageLayout
├── public/ ← Static assets (images, icons)
└── package.json
| Entity | Purpose | Docs |
|---|---|---|
| Application | App identity, permissions, variables | Data Model |
| Role | Permission sets for objects and fields | Data Model |
| Object | Custom data tables with fields | Data Model |
| Field | Extend existing objects, define relations | Data Model |
| Logic Function | Server-side TypeScript with triggers | Logic Functions |
| Front Component | Sandboxed React UI in Twenty's page | Front Components |
| Skill | Reusable AI agent instructions | Skills & Agents |
| Agent | AI assistants with custom prompts | Skills & Agents |
| View | Pre-configured record list views | Layout |
| Navigation Menu Item | Custom sidebar entries | Layout |
| Page Layout | Custom record page tabs and widgets | Layout |
TWENTY_APP_ACCESS_TOKEN) is derived from the role defined in defineApplication().┌─────────────────────────────────────────────────────────┐
│ Development │
│ npx create-twenty-app → yarn twenty dev (live sync) │
├─────────────────────────────────────────────────────────┤
│ Build & Deploy │
│ yarn twenty build → yarn twenty deploy │
├─────────────────────────────────────────────────────────┤
│ Install flow │
│ upload → [pre-install] → metadata migration → │
│ generate SDK → [post-install] │
├─────────────────────────────────────────────────────────┤
│ Publish │
│ npm publish → appears in Twenty marketplace │
└─────────────────────────────────────────────────────────┘
yarn twenty dev — watches your source files and live-syncs changes to a connected Twenty server. The typed API client is regenerated automatically when the schema changes.yarn twenty build — compiles TypeScript, bundles logic functions and front components with esbuild, and produces a manifest.