mirror of
https://github.com/twentyhq/twenty.git
synced 2026-06-12 09:57:03 -04:00
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>
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
---
|
|
title: Project Structure
|
|
description: What's inside a scaffolded Twenty app — files, folders, and what each one does.
|
|
icon: "folder-tree"
|
|
---
|
|
|
|
A new app generated by `npx create-twenty-app` looks like this:
|
|
|
|
```text filename="my-twenty-app/"
|
|
my-twenty-app/
|
|
package.json
|
|
src/
|
|
application-config.ts # Required — your app's entry point
|
|
default-role.ts # Permissions for logic functions
|
|
constants/
|
|
universal-identifiers.ts # Auto-generated UUIDs and metadata
|
|
__tests__/
|
|
setup-test.ts
|
|
app-install.integration-test.ts
|
|
.github/workflows/ci.yml # GitHub Actions
|
|
public/ # Static assets
|
|
vitest.config.ts # Test runner config
|
|
tsconfig.json, tsconfig.spec.json
|
|
.nvmrc, .yarnrc.yml, .oxlintrc.json
|
|
README.md, LLMS.md
|
|
```
|
|
|
|
## Key files
|
|
|
|
| File / Folder | Purpose |
|
|
|---|---|
|
|
| `src/application-config.ts` | **Required.** The main configuration file for your app. |
|
|
| `src/default-role.ts` | Default role controlling what your logic functions can access. |
|
|
| `src/constants/universal-identifiers.ts` | Auto-generated UUIDs and metadata (display name, description). |
|
|
| `src/__tests__/` | Integration tests (setup + example test). |
|
|
| `public/` | Static assets (images, fonts) served with your app. |
|
|
|
|
<Note>
|
|
**File organization is up to you.** The folders above are conventions — the SDK detects entities via AST analysis on `export default defineEntity(...)` calls regardless of where the file lives.
|
|
</Note>
|