ae202a1b59
Created by Github action Co-authored-by: github-actions <github-actions@twenty.com>
82 lines
4.6 KiB
Plaintext
82 lines
4.6 KiB
Plaintext
---
|
|
title: Aplikace Twenty
|
|
description: Vytvářejte a spravujte přizpůsobení Twenty jako kód.
|
|
---
|
|
|
|
<Warning>
|
|
Apps are currently in alpha. The feature works but is still evolving.
|
|
</Warning>
|
|
|
|
## What are apps?
|
|
|
|
Apps let you extend Twenty with custom objects, fields, logic functions, front components, AI skills, and more — all managed as code. Instead of configuring everything through the UI, you define your data model and logic in TypeScript and deploy it to one or more workspaces.
|
|
|
|
**Co můžete vytvořit:**
|
|
|
|
* **Custom objects and fields** — extend your data model with new entities or add fields to existing objects like Company or Person
|
|
* **Logic functions** — server-side functions triggered by database events, cron schedules, or HTTP routes
|
|
* **Front components** — React components that render inside Twenty's UI (record pages, command menu, side panels)
|
|
* **AI skills and agents** — extend Twenty's AI with custom capabilities
|
|
* **Views and navigation** — preconfigured saved views and sidebar links
|
|
|
|
## Quick start
|
|
|
|
```bash filename="Terminal"
|
|
npx create-twenty-app@latest my-twenty-app
|
|
cd my-twenty-app
|
|
yarn twenty dev
|
|
```
|
|
|
|
This scaffolds a new app, optionally starts a local Twenty server, and begins watching your files for changes. See the [Getting Started](/l/cs/developers/extend/apps/getting-started) guide for the full walkthrough.
|
|
|
|
## Detailed guides
|
|
|
|
| Guide | Popis |
|
|
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| [Getting Started](/l/cs/developers/extend/apps/getting-started) | Scaffold an app, set up a local server, project structure, CI |
|
|
| [Building Apps](/l/cs/developers/extend/apps/building) | Entity definitions (`defineObject`, `defineLogicFunction`, `defineFrontComponent`, etc.), API clients, npm packages, public assets, testing |
|
|
| [Publishing](/l/cs/developers/extend/apps/publishing) | Deploy to a server, publish to npm, marketplace |
|
|
|
|
## Key concepts
|
|
|
|
### Detekce entit
|
|
|
|
The SDK detects entities by scanning your TypeScript files for `export default define<Entity>({...})` calls. File naming and folder structure are flexible — detection is AST-based, not path-based.
|
|
|
|
### Available entity types
|
|
|
|
| Funkce | Účel |
|
|
| ---------------------------------- | -------------------------------------------- |
|
|
| `defineApplication()` | Application metadata (required, one per app) |
|
|
| `defineObject()` | Custom objects with fields |
|
|
| `defineField()` | Fields on existing objects |
|
|
| `defineLogicFunction()` | Server-side logic with triggers |
|
|
| `defineFrontComponent()` | React components in Twenty's UI |
|
|
| `defineRole()` | Permission roles |
|
|
| `defineView()` | Saved view configurations |
|
|
| `defineNavigationMenuItem()` | Sidebar navigation links |
|
|
| `defineSkill()` | AI agent skills |
|
|
| `defineAgent()` | AI agents with prompts |
|
|
| `definePageLayout()` | Custom record page layouts |
|
|
| `definePreInstallLogicFunction()` | Runs before app installation |
|
|
| `definePostInstallLogicFunction()` | Runs after app installation |
|
|
|
|
### Development workflow
|
|
|
|
1. **`yarn twenty dev`** — watches source files, rebuilds on change, syncs to the server, generates typed API clients
|
|
2. **`yarn twenty build`** — produces a distributable build
|
|
3. **`yarn twenty deploy`** — deploys to a remote Twenty server
|
|
4. **`yarn twenty add`** — scaffolds a new entity interactively
|
|
|
|
### Referenční dokumentace CLI
|
|
|
|
```bash filename="Terminal"
|
|
yarn twenty help # List all commands
|
|
yarn twenty server start # Start local dev server
|
|
yarn twenty remote add # Connect to a Twenty server
|
|
yarn twenty exec -n fn # Execute a logic function
|
|
yarn twenty logs -n fn # Stream function logs
|
|
```
|
|
|
|
See the [Getting Started](/l/cs/developers/extend/apps/getting-started) guide for the full CLI reference.
|