Files
twenty/packages/twenty-apps/examples/postcard
WeikoandGitHub 3bda05ea57 [Breaking change] Prepare non-system permission flags (#20847)
# Summary

Replaces the enum-keyed `permissionFlags: PermissionFlag[]` on roles
with `permissionFlagUniversalIdentifiers: string[]`

This unlocks mixing system flags (`SystemPermissionFlag.*`) with
app-defined flags in a role config.

This is a breaking change. Existing app source must switch to the new
field.

# Breaking changes

- `RoleManifest.permissionFlags` removed. Use
`RoleManifest.permissionFlagUniversalIdentifiers: string[]`.
- `RoleConfig.permissionFlags` removed (was `PermissionFlagType[]`). Use
`RoleConfig.permissionFlagUniversalIdentifiers: string[]`.
- `PermissionFlagManifest` type removed from
`twenty-shared/application`.
- `PermissionFlag` re-export removed from `twenty-sdk/define`.
`SystemPermissionFlag` is re-exported in its place.
- Retargeting a permission flag between roles is now classified as
delete + create instead of update

 ### Not in this PR
- definePermissionFlag SDK function and top-level
Manifest.permissionFlags catalog (apps defining their own custom flags).
Until those land, permissionFlagUniversalIdentifiers only accepts
SystemPermissionFlag.* UUIDs; arbitrary UUIDs fail validation.
2026-05-22 21:22:28 +00:00
..
2026-04-03 12:44:03 +00:00
2026-04-03 12:44:03 +00:00
2026-04-03 12:44:03 +00:00
2026-04-03 12:44:03 +00:00
2026-04-03 12:44:03 +00:00
2026-04-03 12:44:03 +00:00
2026-04-03 12:44:03 +00:00
2026-04-03 12:44:03 +00:00
2026-04-03 12:44:03 +00:00

Postcard App — Twenty App Example

A rich example app showcasing all Twenty app entity types. Use this as a reference when building your own apps.

What's included

This app demonstrates every entity type available in the Twenty SDK:

Entity Files What it shows
Application src/application.config.ts App metadata, application variables, server variables
Objects src/objects/ Custom objects with inline fields, junction tables
Fields src/fields/ Standalone fields, relations (ONE_TO_MANY, MANY_TO_ONE), extending standard objects
Logic Functions src/logic-functions/ HTTP routes, database event triggers, cron schedules, tool functions, install hooks
Front Components src/components/ React components rendered inside Twenty's UI
Roles src/roles/ Permission roles with object and field-level access control
Views src/views/ Saved table views with column configuration
Navigation src/navigation-menu-items/ Sidebar links targeting views
Skills src/skills/ AI skill providing context to agents
Agents src/agents/ AI agent with a system prompt
Page Layouts src/page-layouts/ Custom record page with a front component widget

Getting started

# From this directory
yarn install
yarn twenty dev

Learn more