Skip to content

Commit a9f756b

Browse files
authored
chore: move reference projects to their own repo (#3812)
The reference/example projects (`references/`) now live in their own repo, https://github.com/triggerdotdev/references, so their heavy, frequently-changing dependencies are no longer part of this repo's lockfile and tooling. This removes them here and repoints everything that referenced them. - Deletes `references/`; updates the pnpm workspace + lockfile. - Clears the references-only CI rules and `.vscode` configs. - Repoints the docs (contributor/agent + one public page) to the new repo. - `seed.mts` keeps the local-dev projects (hello-world, d3-chat, realtime-streams).
1 parent a4d8c9f commit a9f756b

477 files changed

Lines changed: 56 additions & 40836 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/sdk-packages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ paths:
99
- Default to **patch**. Get maintainer approval for minor. Never select major without explicit approval.
1010
- `@trigger.dev/core`: **Never import the root**. Always use subpath imports (e.g., `@trigger.dev/core/v3`).
1111
- Do NOT update `rules/` or `.claude/skills/trigger-dev-tasks/` unless explicitly asked. These are maintained in separate dedicated passes.
12-
- Test changes using `references/hello-world` reference project.
12+
- Test changes using the `hello-world` project in the [`triggerdotdev/references`](https://github.com/triggerdotdev/references) repo.

.github/workflows/check-review-md.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- "docs/**"
88
- ".changeset/**"
99
- ".server-changes/**"
10-
- "references/**"
1110

1211
concurrency:
1312
group: review-md-drift-${{ github.event.pull_request.number }}

.github/workflows/claude-md-audit.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
- ".changeset/**"
99
- ".server-changes/**"
1010
- "**/*.md"
11-
- "references/**"
1211

1312
concurrency:
1413
group: claude-md-audit-${{ github.event.pull_request.number }}

.github/workflows/pr_checks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- '!.changeset/**'
4040
- '!hosting/**'
4141
- '!.github/**'
42-
- '!references/**'
4342
- '!**/*.md'
4443
- '!**/.env.example'
4544
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1

.vscode/launch.json

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -47,78 +47,6 @@
4747
"url": "http://localhost:3030",
4848
"webRoot": "${workspaceFolder}/apps/webapp/app"
4949
},
50-
{
51-
"type": "node-terminal",
52-
"request": "launch",
53-
"name": "Debug V3 init CLI",
54-
"command": "pnpm exec trigger init",
55-
"cwd": "${workspaceFolder}/references/init-shell",
56-
"sourceMaps": true
57-
},
58-
{
59-
"type": "node-terminal",
60-
"request": "launch",
61-
"name": "Debug V3 init dev CLI",
62-
"command": "pnpm exec trigger dev",
63-
"cwd": "${workspaceFolder}/references/init-shell",
64-
"sourceMaps": true
65-
},
66-
{
67-
"type": "node-terminal",
68-
"request": "launch",
69-
"name": "Debug V3 Dev CLI",
70-
"command": "pnpm exec trigger dev",
71-
"cwd": "${workspaceFolder}/references/hello-world",
72-
"sourceMaps": true
73-
},
74-
{
75-
"type": "node-terminal",
76-
"request": "launch",
77-
"name": "Debug Dev Next.js Realtime",
78-
"command": "pnpm exec trigger dev",
79-
"cwd": "${workspaceFolder}/references/nextjs-realtime",
80-
"sourceMaps": true
81-
},
82-
{
83-
"type": "node-terminal",
84-
"request": "launch",
85-
"name": "Debug prisma-catalog deploy CLI",
86-
"command": "pnpm exec trigger deploy --self-hosted --load-image",
87-
"cwd": "${workspaceFolder}/references/prisma-catalog",
88-
"sourceMaps": true
89-
},
90-
{
91-
"type": "node-terminal",
92-
"request": "launch",
93-
"name": "Debug V3 Deploy CLI",
94-
"command": "pnpm exec trigger deploy --self-hosted --load-image",
95-
"cwd": "${workspaceFolder}/references/hello-world",
96-
"sourceMaps": true
97-
},
98-
{
99-
"type": "node-terminal",
100-
"request": "launch",
101-
"name": "Debug V3 list-profiles CLI",
102-
"command": "pnpm exec trigger list-profiles --log-level debug",
103-
"cwd": "${workspaceFolder}/references/hello-world",
104-
"sourceMaps": true
105-
},
106-
{
107-
"type": "node-terminal",
108-
"request": "launch",
109-
"name": "Debug V3 update CLI",
110-
"command": "pnpm exec trigger update",
111-
"cwd": "${workspaceFolder}/references/hello-world",
112-
"sourceMaps": true
113-
},
114-
{
115-
"type": "node-terminal",
116-
"request": "launch",
117-
"name": "Debug V3 Management",
118-
"command": "pnpm run management",
119-
"cwd": "${workspaceFolder}/references/hello-world",
120-
"sourceMaps": true
121-
},
12250
{
12351
"type": "node",
12452
"request": "attach",
@@ -135,14 +63,6 @@
13563
"cwd": "${workspaceFolder}/packages/cli-v3",
13664
"sourceMaps": true
13765
},
138-
{
139-
"type": "node-terminal",
140-
"request": "launch",
141-
"name": "debug v3 hello-world dev",
142-
"command": "pnpm exec trigger dev",
143-
"cwd": "${workspaceFolder}/references/hello-world",
144-
"sourceMaps": true
145-
},
14666
{
14767
"type": "node-terminal",
14868
"request": "launch",
@@ -158,14 +78,6 @@
15878
"command": "pnpm run test ./src/run-queue/index.test.ts --run",
15979
"cwd": "${workspaceFolder}/internal-packages/run-engine",
16080
"sourceMaps": true
161-
},
162-
{
163-
"type": "node-terminal",
164-
"request": "launch",
165-
"name": "Debug d3-demo",
166-
"command": "pnpm exec trigger dev",
167-
"cwd": "${workspaceFolder}/references/d3-demo",
168-
"sourceMaps": true
16981
}
17082
]
17183
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"deno.enablePaths": ["references/deno-reference", "runtime_tests/tests/deno"],
2+
"deno.enablePaths": ["runtime_tests/tests/deno"],
33
"debug.toolBarLocation": "commandCenter",
44
"typescript.tsdk": "node_modules/typescript/lib",
55
"search.exclude": {

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This repository is a pnpm monorepo managed with Turbo. It contains multiple apps
77
- `apps/supervisor` – Node application for executing built tasks.
88
- `packages/*` – Published packages such as `@trigger.dev/sdk`, the CLI (`trigger.dev`), and shared libraries.
99
- `internal-packages/*` – Internal-only packages used by the webapp and other apps.
10-
- `references/*` – Example projects for manual testing and development of new features.
10+
- Example/reference projects for manual testing live in a separate repo: [`triggerdotdev/references`](https://github.com/triggerdotdev/references).
1111
- `ai/references` – Contains additional documentation including an overview (`repo.md`) and testing guidelines (`tests.md`).
1212

1313
See `ai/references/repo.md` for a more complete explanation of the workspaces.
@@ -65,5 +65,5 @@ Refer to `ai/references/tests.md` for details on writing tests. Tests should avo
6565
```bash
6666
pnpm run dev --filter docs
6767
```
68-
- `references/README.md` explains how to create new reference projects for manual testing.
68+
- The [`triggerdotdev/references`](https://github.com/triggerdotdev/references) repo's README explains how to create new reference projects for manual testing.
6969

CLAUDE.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Docs live in `docs/` as a Mintlify site (MDX format). See `docs/CLAUDE.md` for c
138138

139139
### Reference Projects
140140

141-
The `references/` directory contains test workspaces for testing SDK and platform features. Use `references/hello-world` to manually test changes before submitting PRs.
141+
Reference/example projects for testing SDK and platform features live in a separate repo: [`triggerdotdev/references`](https://github.com/triggerdotdev/references). Clone it alongside this repo and use its `projects/hello-world` to manually test changes before submitting PRs. See that repo's README for setup and linking to a local monorepo build.
142142

143143
## Docker Image Guidelines
144144

@@ -167,15 +167,17 @@ export const myTask = task({
167167

168168
The `rules/` directory contains versioned SDK documentation distributed via the SDK installer. Current version: `rules/manifest.json`. Do NOT update `rules/` or `.claude/skills/trigger-dev-tasks/` unless explicitly asked - these are maintained in separate dedicated passes.
169169

170-
## Testing with hello-world Reference Project
170+
## Testing with the hello-world Reference Project
171+
172+
The reference projects live in the separate [`triggerdotdev/references`](https://github.com/triggerdotdev/references) repo - clone it alongside this repo.
171173

172174
First-time setup:
173175

174-
1. `pnpm run db:seed` to seed the database
175-
2. Build CLI: `pnpm run build --filter trigger.dev && pnpm i`
176-
3. Authorize: `cd references/hello-world && pnpm exec trigger login -a http://localhost:3030`
176+
1. `pnpm run db:seed` to seed the database (creates the References org + hello-world project)
177+
2. Build the CLI/packages you want to test: `pnpm run build --filter trigger.dev`
178+
3. In your `references` clone, follow its README to link to your local monorepo build, then authorize: `cd projects/hello-world && pnpm exec trigger login -a http://localhost:3030`
177179

178-
Running: `cd references/hello-world && pnpm exec trigger dev`
180+
Running (from your `references` clone): `cd projects/hello-world && pnpm exec trigger dev`
179181

180182
## Local Task Testing Workflow
181183

@@ -190,7 +192,8 @@ curl -s http://localhost:3030/healthcheck # Verify running
190192
### Step 2: Start Trigger Dev in Background
191193

192194
```bash
193-
cd references/hello-world && pnpm exec trigger dev
195+
# in your triggerdotdev/references clone
196+
cd projects/hello-world && pnpm exec trigger dev
194197
# Wait for "Local worker ready [node]"
195198
```
196199

CONTRIBUTING.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,24 +107,32 @@ branch are tagged into a release periodically.
107107
108108
## Manual testing using hello-world
109109
110-
We use the `<root>/references/hello-world` subdirectory as a staging ground for testing changes to the SDK (`@trigger.dev/sdk` at `<root>/packages/trigger-sdk`), the Core package (`@trigger.dev/core` at `<root>packages/core`), the CLI (`trigger.dev` at `<root>/packages/cli-v3`) and the platform (The remix app at `<root>/apps/webapp`). The instructions below will get you started on using the `hello-world` for local development of Trigger.dev.
110+
The `hello-world` reference project (and the others) live in a separate repo:
111+
[`triggerdotdev/references`](https://github.com/triggerdotdev/references). Clone it
112+
alongside this repo. It's the staging ground for testing changes to the SDK
113+
(`@trigger.dev/sdk` at `<root>/packages/trigger-sdk`), the Core package
114+
(`@trigger.dev/core` at `<root>/packages/core`), the CLI (`trigger.dev` at
115+
`<root>/packages/cli-v3`) and the platform (the Remix app at `<root>/apps/webapp`).
116+
To exercise your local monorepo changes, the reference project links to your local
117+
build — see the references repo's README for the `pnpm run link` flow.
118+
119+
> Paths below such as `projects/hello-world` are relative to your `references`
120+
> clone, not this repo.
111121
112122
### First-time setup
113123
114124
First, make sure you are running the webapp according to the instructions above. The seed step from setup already created a `hello-world` project under the `References` org with the stable ref `proj_rrkpdguyagvsoktglnod` — log in at http://localhost:3030 with any email to access it. Then:
115125
116-
1. Build the CLI (skip if you already ran the build step in setup)
126+
1. Build the CLI and packages (skip if you already ran the build step in setup)
117127
118128
```sh
119-
pnpm run build --filter trigger.dev
120-
# Make it accessible to `pnpm exec`
121-
pnpm i
129+
pnpm run build --filter trigger.dev --filter "@trigger.dev/*"
122130
```
123131

124-
2. Change into the `<root>/references/hello-world` directory and authorize the CLI to the local server:
132+
2. In your `references` clone, link to your local monorepo build (see its README), then change into `projects/hello-world` and authorize the CLI to the local server:
125133

126134
```sh
127-
cd references/hello-world
135+
cd projects/hello-world
128136
cp .env.example .env
129137
pnpm exec trigger login -a http://localhost:3030
130138
```
@@ -134,7 +142,7 @@ This will open a new browser window and authorize the CLI against your local use
134142
You can optionally pass a `--profile` flag to the `login` command, which will allow you to use the CLI with separate accounts/servers. We suggest using a profile called `local` for your local development:
135143

136144
```sh
137-
cd references/hello-world
145+
cd projects/hello-world
138146
pnpm exec trigger login -a http://localhost:3030 --profile local
139147
# later when you run the dev or deploy command:
140148
pnpm exec trigger dev --profile local
@@ -147,35 +155,35 @@ The following steps should be followed any time you start working on a new featu
147155

148156
1. Make sure the webapp is running on localhost:3030
149157

150-
2. Open a terminal window and build the CLI and packages and watch for changes
158+
2. In this repo, open a terminal window and build the CLI and packages and watch for changes (the reference project links against this build)
151159

152160
```sh
153161
pnpm run dev --filter trigger.dev --filter "@trigger.dev/*"
154162
```
155163

156-
3. Open another terminal window, and change into the `<root>/references/hello-world` directory.
164+
3. Open another terminal window, and change into `projects/hello-world` in your `references` clone.
157165

158166
4. Run the `dev` command, which will register all the local tasks with the platform and allow you to start testing task execution:
159167

160168
```sh
161-
# in <root>/references/hello-world
169+
# in <references-clone>/projects/hello-world
162170
pnpm exec trigger dev
163171
```
164172

165173
If you want additional debug logging, you can use the `--log-level debug` flag:
166174

167175
```sh
168-
# in <root>/references/hello-world
176+
# in <references-clone>/projects/hello-world
169177
pnpm exec trigger dev --log-level debug
170178
```
171179

172-
5. If you make any changes in the CLI/Core/SDK, you'll need to `CTRL+C` to exit the `dev` command and restart it to pickup changes. Any changes to the files inside of the `hello-world/src/trigger` dir will automatically be rebuilt by the `dev` command.
180+
5. If you make any changes in the CLI/Core/SDK, you'll need to `CTRL+C` to exit the `dev` command and restart it to pickup changes. Any changes to the files inside the reference project's `src/trigger` dir will automatically be rebuilt by the `dev` command.
173181

174182
6. Navigate to the `hello-world` project in your local dashboard at localhost:3030 and you should see the list of tasks.
175183

176-
7. Go to the "Test" page in the sidebar and select a task. Then enter a payload and click "Run test". You can tell what the payloads should be by looking at the relevant task file inside the `/references/hello-world/src/trigger` folder. Many of them accept an empty payload.
184+
7. Go to the "Test" page in the sidebar and select a task. Then enter a payload and click "Run test". You can tell what the payloads should be by looking at the relevant task file inside the reference project's `src/trigger` folder. Many of them accept an empty payload.
177185

178-
8. Feel free to add additional files in `hello-world/src/trigger` to test out specific aspects of the system, or add in edge cases.
186+
8. Feel free to add additional files in the reference project's `src/trigger` dir to test out specific aspects of the system, or add in edge cases.
179187

180188
## Adding and running migrations
181189

apps/webapp/seed.mts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ async function seed() {
5353
console.log(`✅ Organization already exists: ${organization.title} (${organization.slug})`);
5454
}
5555

56-
// Define the reference projects with their specific project refs
56+
// Reference projects with their specific project refs. These refs MUST stay in
57+
// sync with the corresponding projects in the standalone references repo
58+
// (github.com/triggerdotdev/references): hello-world hardcodes its ref in
59+
// trigger.config.ts; d3-chat and realtime-streams read TRIGGER_PROJECT_REF.
5760
const referenceProjects = [
5861
{
5962
name: "hello-world",
@@ -82,9 +85,9 @@ async function seed() {
8285
console.log(`User: ${user.email}`);
8386
console.log(`Organization: ${organization.title} (${organization.slug})`);
8487
console.log(`Projects: ${referenceProjects.map((p) => p.name).join(", ")}`);
85-
console.log("\n⚠️ Note: Update the .env files in d3-chat and realtime-streams with:");
86-
console.log(` - d3-chat: TRIGGER_PROJECT_REF=proj_cdmymsrobxmcgjqzhdkq`);
87-
console.log(` - realtime-streams: TRIGGER_PROJECT_REF=proj_klxlzjnzxmbgiwuuwhvb`);
88+
console.log("\n⚠️ Note: in your triggerdotdev/references clone, set TRIGGER_PROJECT_REF in:");
89+
console.log(` - projects/d3-chat/.env: TRIGGER_PROJECT_REF=proj_cdmymsrobxmcgjqzhdkq`);
90+
console.log(` - projects/realtime-streams/.env: TRIGGER_PROJECT_REF=proj_klxlzjnzxmbgiwuuwhvb`);
8891
}
8992

9093
async function createBatchLimitOrgs(user: User) {

0 commit comments

Comments
 (0)