twenty/packages/twenty-apps/examples/hello-world
Charles Bochet 15eb3e7edc
feat(sdk): use config file as single source of truth, remove env var fallbacks (#19409)
## Summary

- **Config as source of truth**: `~/.twenty/config.json` is now the
single source of truth for SDK authentication — env var fallbacks have
been removed from the config resolution chain.
- **Test instance support**: `twenty server start --test` spins up a
dedicated Docker instance on port 2021 with its own config
(`config.test.json`), so integration tests don't interfere with the dev
environment.
- **API key auth for marketplace**: Removed `UserAuthGuard` from
`MarketplaceResolver` so API key tokens (workspace-scoped) can call
`installMarketplaceApp`.
- **CI for example apps**: Added monorepo CI workflows for `hello-world`
and `postcard` example apps to catch regressions.
- **Simplified CI**: All `ci-create-app-e2e` and example app workflows
now use a shared `spawn-twenty-app-dev-test` action (Docker-based)
instead of building the server from source. Consolidated auth env vars
to `TWENTY_API_URL` + `TWENTY_API_KEY`.
- **Template publishing fix**: `create-twenty-app` template now
correctly preserves `.github/` and `.gitignore` through npm publish
(stored without leading dot, renamed after copy).

## Test plan

- [x] CI SDK (lint, typecheck, unit, integration, e2e) — all green
- [x] CI Example App Hello World — green
- [x] CI Example App Postcard — green
- [x] CI Create App E2E minimal — green
- [x] CI Front, CI Server, CI Shared — green
2026-04-08 06:49:10 +02:00
..
.github/workflows feat(sdk): use config file as single source of truth, remove env var fallbacks (#19409) 2026-04-08 06:49:10 +02:00
src feat(sdk): use config file as single source of truth, remove env var fallbacks (#19409) 2026-04-08 06:49:10 +02:00
.gitignore Improve apps (#19256) 2026-04-03 12:44:03 +00:00
.nvmrc Improve apps (#19256) 2026-04-03 12:44:03 +00:00
.oxlintrc.json Improve apps (#19256) 2026-04-03 12:44:03 +00:00
.yarnrc.yml Improve apps (#19256) 2026-04-03 12:44:03 +00:00
LLMS.md Improve apps (#19256) 2026-04-03 12:44:03 +00:00
package.json Improve apps (#19256) 2026-04-03 12:44:03 +00:00
README.md Improve apps (#19256) 2026-04-03 12:44:03 +00:00
tsconfig.json Improve apps (#19256) 2026-04-03 12:44:03 +00:00
tsconfig.spec.json Improve apps (#19256) 2026-04-03 12:44:03 +00:00
vitest.config.ts feat(sdk): use config file as single source of truth, remove env var fallbacks (#19409) 2026-04-08 06:49:10 +02:00
yarn.lock Improve apps (#19256) 2026-04-03 12:44:03 +00:00

This is a Twenty application project bootstrapped with create-twenty-app.

Getting Started

First, authenticate to your workspace:

yarn twenty remote add --api-url http://localhost:2020 --as local

Then, start development mode to sync your app and watch for changes:

yarn twenty dev

Open your Twenty instance and go to /settings/applications section to see the result.

Available Commands

Run yarn twenty help to list all available commands. Common commands:

# Remotes & Authentication
yarn twenty remote add --api-url http://localhost:2020 --as local     # Authenticate with Twenty
yarn twenty remote status         # Check auth status
yarn twenty remote switch         # Switch default remote
yarn twenty remote list           # List all configured remotes
yarn twenty remote remove <name>  # Remove a remote

# Application
yarn twenty dev        # Start dev mode (watch, build, sync, and auto-generate typed client)
yarn twenty add     # Add a new entity (object, field, function, front-component, role, view, navigation-menu-item)
yarn twenty logs  # Stream function logs
yarn twenty exec  # Execute a function with JSON payload
yarn twenty uninstall  # Uninstall app from workspace

Integration Tests

If your project includes the example integration test (src/__tests__/app-install.integration-test.ts), you can run it with:

# Make sure a Twenty server is running at http://localhost:3000
yarn test

The test builds and installs the app, then verifies it appears in the applications list. Test configuration (API URL and API key) is defined in vitest.config.ts.

LLMs instructions

Main docs and pitfalls are available in LLMS.md file.

Learn More

To learn more about Twenty applications, take a look at the following resources:

You can check out the Twenty GitHub repository - your feedback and contributions are welcome!