2eae25dc34
Added a bit of enhanced context for better agentic coding, based on this [Discord conversation](https://discord.com/channels/1130383047699738754/1130383048173682821/1501538550301331477). --------- Co-authored-by: Félix Malfait <felix@twenty.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
4.2 KiB
4.2 KiB
Base documentation
- Getting started:
- https://docs.twenty.com/developers/extend/apps/getting-started/quick-start.md
- https://docs.twenty.com/developers/extend/apps/getting-started/concepts.md
- https://docs.twenty.com/developers/extend/apps/getting-started/project-structure.md
- https://docs.twenty.com/developers/extend/apps/getting-started/local-server.md
- https://docs.twenty.com/developers/extend/apps/getting-started/scaffolding.md
- https://docs.twenty.com/developers/extend/apps/getting-started/troubleshooting.md
- Config:
- https://docs.twenty.com/developers/extend/apps/config/overview.md
- https://docs.twenty.com/developers/extend/apps/config/application.md
- https://docs.twenty.com/developers/extend/apps/config/roles.md
- https://docs.twenty.com/developers/extend/apps/config/install-hooks.md
- https://docs.twenty.com/developers/extend/apps/config/public-assets.md
- Data:
- Logic:
- Layout:
- https://docs.twenty.com/developers/extend/apps/layout/overview.md
- https://docs.twenty.com/developers/extend/apps/layout/views.md
- https://docs.twenty.com/developers/extend/apps/layout/navigation-menu-items.md
- https://docs.twenty.com/developers/extend/apps/layout/page-layouts.md
- https://docs.twenty.com/developers/extend/apps/layout/front-components.md
- https://docs.twenty.com/developers/extend/apps/layout/command-menu-items.md
- Operations:
- Rich app example: https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/examples/postcard
UUID requirement
- All generated UUIDs must be valid UUID v4.
Common Pitfalls
- Creating an object without an index view associated. Unless this is a technical object, user will need to visualize it.
- Creating a view without a navigationMenuItem associated. This will make the view available on the left sidebar.
- Creating a front-end component that has a scroll instead of being responsive to its fixed widget height and width, unless it is specifically meant to be used in a canvas tab.
Best practice
It's highly recommended to create new app entities using yarn twenty add. These are the options:
| Entity type | Command | Generated file |
|---|---|---|
| Object | yarn twenty add object |
src/objects/<name>.ts |
| Field | yarn twenty add field |
src/fields/<name>.ts |
| Logic function | yarn twenty add logicFunction |
src/logic-functions/<name>.ts |
| Front component | yarn twenty add frontComponent |
src/front-components/<name>.tsx |
| Role | yarn twenty add role |
src/roles/<name>.ts |
| Skill | yarn twenty add skill |
src/skills/<name>.ts |
| Agent | yarn twenty add agent |
src/agents/<name>.ts |
| View | yarn twenty add view |
src/views/<name>.ts |
| Navigation menu item | yarn twenty add navigationMenuItem |
src/navigation-menu-items/<name>.ts |
| Page layout | yarn twenty add pageLayout |
src/page-layouts/<name>.ts |
This helps automatically generate required IDs etc.