fa008b4728
## What We have unified the unit + integration test, lint, and typecheck configuration across `packages/twenty-apps/internal` and `packages/twenty-apps/public`. This PR updates the `create-twenty-app` scaffolded project template so a freshly generated app complies with that same setup. ### Scaffold template changes (`packages/create-twenty-app/src/constants/template/`) - **`package.json`**: add `typecheck` (`tsgo --noEmit -p tsconfig.spec.json`) and `test:unit` scripts; add `@typescript/native-preview` + `vite-tsconfig-paths` devDeps; bump `vitest` → `^4.0.0` and `packageManager` → `yarn@4.13.0`. - **`vitest.config.ts`**: resolve path aliases via the `vite-tsconfig-paths` plugin (matching the unified apps) instead of the ad-hoc `resolve.tsconfigPaths`. - **`vitest.unit.config.ts`** (new): unit test config targeting `src/**/*.test.ts`, identical to existing apps. - **`tsconfig.json`**: `moduleResolution: node → bundler`, `target: es2018 → es2020`. - **`src/__tests__/application-config.test.ts`** (new): a sample unit test so a fresh scaffold's `test:unit` passes out of the box. - **`.github/workflows/ci.yml`**: run Lint → Typecheck → Unit tests alongside the integration tests, mirroring the central `ci-twenty-apps.yaml` pipeline. - **`README.md`**: document the new `lint` / `typecheck` / `test:unit` commands. ### CLI package changes - **`tsconfig.json` / `tsconfig.lib.json`**: exclude the new `template/vitest.unit.config.ts` from the CLI's own typecheck/build (just like the existing `vitest.config.ts` exclusion) — its `vitest` / `vite-tsconfig-paths` imports aren't deps of the CLI package. ## Notes - The template's committed `yarn.lock` is an intentional empty seed; the scaffold runs `yarn install` at creation time, so the new deps regenerate cleanly — no lockfile change needed. - The sample unit test asserts `typeof APP_DESCRIPTION === 'string'` (not truthiness) because the description is optional at scaffold time and can be empty. https://claude.ai/code/session_01XiJpkiQG3TiDjKncx2XSQq --- _Generated by [Claude Code](https://claude.ai/code/session_01XiJpkiQG3TiDjKncx2XSQq)_ <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/22128?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
The official scaffolding CLI for building apps on top of Twenty CRM. Sets up a ready-to-run project with twenty-sdk.
Quick start
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
yarn twenty dev
The scaffolder will:
- Create a new project with TypeScript, linting, tests, and a preconfigured
twentyCLI - Start a local Twenty server via Docker (pulls the latest image automatically)
- Authenticate with the development API key
Options
| Flag | Description |
|---|---|
--name <name> |
Set the app name |
--display-name <displayName> |
Set the display name |
--description <description> |
Set the description |
--url <url> |
Twenty workspace URL (default: http://localhost:2020) |
--authentication-method <method> |
oauth or apiKey (default: apiKey for local, oauth for remote) |
Documentation
Full documentation is available at docs.twenty.com/developers/extend/apps:
- Quick Start — scaffold, run a local server, sync your code
- Concepts — how apps work: entity model, sandboxing, lifecycle
- Operations — CLI, testing, CI, deploy and publish
Troubleshooting
- Server not starting: check Docker is running (
docker info), then tryyarn twenty docker:logs. - Auth not working: run
yarn twenty remote:addto re-authenticate. - Types not generated: ensure
yarn twenty devis running — it auto-generates the typed client.