@forumone/create-throughline 1.0.2-next-0ecb757 → 1.0.2-next-7b3e9c1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @forumone/create-throughline
2
2
 
3
- ## 1.0.2-next-0ecb757
3
+ ## 1.0.2-next-7b3e9c1
4
4
 
5
5
  ### Patch Changes
6
6
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @forumone/create-throughline
2
2
 
3
- Scaffolder for new Throughline projects (Payload CMS + MCP servers + Inngest workflows).
3
+ Scaffolder for new Throughline projects: Payload CMS, the Throughline suite registered by one `throughline()` call and served over MCP at `/api/mcp`, and an Inngest endpoint for its jobs.
4
4
 
5
5
  ## Usage
6
6
 
@@ -14,28 +14,32 @@ Or with npm:
14
14
  npm create @forumone/throughline@latest my-client-site
15
15
  ```
16
16
 
17
- The scaffolder asks a small set of questions, then generates a ready-to-run
18
- pnpm monorepo with Payload, all Throughline plugins, and an Inngest endpoint
19
- already wired. After scaffolding you'll need to fill in environment variables,
20
- implement client-specific resolvers (users, groups, approvers), and replace
21
- the example content model with your own.
17
+ The scaffolder asks a small set of questions, then generates a pnpm monorepo
18
+ with Payload, `@forumone/throughline` and an Inngest endpoint already wired,
19
+ plus CI and an agent `CLAUDE.md`. After scaffolding you'll need to fill in
20
+ environment variables, create and apply the first migration, implement
21
+ client-specific resolvers (users, groups, approvers), and replace the example
22
+ content model with your own.
22
23
 
23
24
  ## What you get
24
25
 
25
26
  ```
26
27
  my-client-site/
27
28
  ├── apps/
28
- │ └── web/ # Next.js + Payload with all plugins wired
29
- ├── packages/
30
- │ ├── design-system/ # Reference DS (or placeholder for your own)
31
- │ ├── content/ # Client-specific collections & blocks
32
- │ └── brand/ # Brand tokens + email theme
29
+ │ └── web/ # Next.js + Payload, throughline() in payload.config.ts
30
+ ├── design-system/ # the reference design system, or a placeholder for your own
31
+ ├── scripts/ # workspace gates: single instances, tested packages, audit
32
+ ├── .claude/ # agent settings and a Stop-hook gate
33
+ ├── .github/ # CI: fast and verify tiers
33
34
  ├── .env.example
35
+ ├── CLAUDE.md
34
36
  ├── pnpm-workspace.yaml
35
37
  ├── turbo.json
36
38
  └── README.md
37
39
  ```
38
40
 
41
+ The full list is in the [reference](https://github.com/forumone/throughline/blob/main/docs/reference/create-throughline.md).
42
+
39
43
  ## After scaffolding
40
44
 
41
45
  Read the generated `README.md` for full setup instructions. Expect 1–2 hours
@@ -35,9 +35,9 @@ APPROVAL_TOKEN_SECRET=
35
35
 
36
36
  # --- MCP ---
37
37
  # No keys here. Every Throughline tool is served on one /api/mcp by
38
- # @payloadcms/plugin-mcp; create a key in the admin under MCP -> Payload MCP
39
- # API Keys and give it to your MCP client, not to this file. Scheduled
40
- # publishes run in process and need no key either.
38
+ # @payloadcms/plugin-mcp; create a key in the admin under MCP -> API Keys and
39
+ # give it to your MCP client, not to this file. Scheduled publishes run in
40
+ # process and need no key either.
41
41
 
42
42
  # --- Optional: error reporting ---
43
43
  # Where unhandled request errors, workflows that ran out of retries and failing
@@ -48,6 +48,7 @@ APPROVAL_TOKEN_SECRET=
48
48
  ERROR_WEBHOOK_URL=
49
49
 
50
50
  # --- Optional: storage ---
51
- # Vercel Blob token if deploying to Vercel; remove this and the storage
52
- # adapter from payload.config.ts if you're using a different provider.
51
+ # payload.config.ts registers no storage adapter, so nothing reads this yet.
52
+ # Set it when you add one: the Vercel Blob token, if you add
53
+ # @payloadcms/storage-vercel-blob to deploy on Vercel.
53
54
  BLOB_READ_WRITE_TOKEN=
@@ -21,10 +21,14 @@ pnpm install --frozen-lockfile \
21
21
  && pnpm typecheck && pnpm lint \
22
22
  && pnpm check:instances && pnpm check:tested && pnpm check:migrations \
23
23
  && pnpm validate \
24
+ && pnpm --filter ./design-system run --if-present build \
24
25
  && bash .github/scripts/check-generated.sh \
25
26
  && pnpm test
26
27
  ```
27
28
 
29
+ `fast` then runs `pnpm check:audit`, which reports advisories without failing
30
+ the job.
31
+
28
32
  `--frozen-lockfile` leads because a lockfile missing an entry passes every
29
33
  other gate locally and fails in CI. `check-generated.sh` needs the environment
30
34
  `payload.config.ts` validates; the placeholders at the top of
@@ -75,8 +79,8 @@ and demands `--confirm` before overwriting.
75
79
 
76
80
  ## The design system reaches the CMS through its manifest
77
81
 
78
- `payload.config.ts` hands the design system's manifest to `componentsPlugin`,
79
- and that manifest is how the CMS knows which components exist and how they may
82
+ `payload.config.ts` hands the design system's manifest to the `components` key
83
+ of its `throughline()` call, and that manifest is how the CMS knows which components exist and how they may
80
84
  be composed. It is built from a `<Name>.contract.ts` beside every component.
81
85
  {{#if useReferenceDs}}
82
86
  - **A new component needs a contract.** `build:manifest` refuses a component
@@ -86,8 +90,9 @@ be composed. It is built from a `<Name>.contract.ts` beside every component.
86
90
  that is not there.
87
91
  {{else}}
88
92
  The design system here is a placeholder. When you build it, give every
89
- component a contract, publish a manifest, and point `componentsPlugin` at it —
90
- see `@forumone/throughline-design-system` in the Throughline repository.
93
+ component a contract, publish a manifest, and point `components.manifest` in
94
+ `throughline()` at it — see `@forumone/throughline-design-system` in the
95
+ Throughline repository.
91
96
  {{/if}}
92
97
  ## Tests
93
98
 
@@ -101,7 +106,7 @@ refused. A new collection fails it until you add it to a bucket. Decide which,
101
106
  and don't open a collection to anonymous reads to make the test pass. More good
102
107
  first tests need no database: field validations, and hooks as functions.
103
108
 
104
- `pnpm test:smoke` runs the Playwright smoke pack in `e2e/` against
109
+ `pnpm --dir apps/web test:smoke` runs the Playwright smoke pack in `e2e/` against
105
110
  `next start`, so build first, or against a deployed site when `E2E_BASE_URL`
106
111
  is set. Every check is a GET. CI runs it in `verify`, after the production
107
112
  build. Add routes to `e2e/site.ts` as the site gains them.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Generated by [`@forumone/create-throughline`](https://github.com/forumone/throughline/tree/main/packages/create-throughline).
4
4
 
5
- This is a Throughline project: a Payload CMS application wired with the Throughline plugin suite (audit, components, publishing, approvals, audit-query, integrations, email) plus an Inngest endpoint that runs the workflow functions.
5
+ This is a Throughline project: a Payload CMS application with the Throughline suite registered by one `throughline()` call in `apps/web/src/payload.config.ts` (audit, components, publishing, approvals, audit queries, integrations, email and a healthcheck), its MCP tools served at `/api/mcp`, plus an Inngest endpoint that runs the suite's jobs.
6
6
 
7
7
  ## Prerequisites
8
8
 
@@ -21,7 +21,8 @@ pnpm install
21
21
  # 2. Copy the env template
22
22
  cp .env.example apps/web/.env.local # apps/web: `next dev` reads env files from there
23
23
 
24
- # 3. Generate secrets (run each three times for the three secret slots)
24
+ # 3. Generate the two secrets, PAYLOAD_SECRET and APPROVAL_TOKEN_SECRET (run it
25
+ # once for each)
25
26
  openssl rand -base64 48
26
27
 
27
28
  # 4. Edit apps/web/.env.local and fill in:
@@ -56,7 +57,7 @@ pnpm dev
56
57
 
57
58
  ## After admin signup
58
59
 
59
- 1. In the Payload admin, open **MCP → Payload MCP API Keys** and create one key. Pick a **User** — required; the key inherits that user's access control — tick **Enable API Key**, save, and copy the key. It is shown once, and it does not go in `.env.local`.
60
+ 1. In the Payload admin, open **MCP → API Keys** and create one key. Only an admin can. The key is bound to you, its creator: it inherits your access control, and every tool logs you as the actor. Give it a **Label**, tick **Enable API Key**, save, and copy the key. It does not go in `.env.local`.
60
61
 
61
62
  2. **Plug it into Claude (or your MCP client).** One endpoint carries every server's tools:
62
63
 
@@ -22,7 +22,7 @@ pnpm --filter "./design-system" validate # lint contracts + cross-check
22
22
  pnpm --filter "./design-system" test # component tests (vitest + testing-library)
23
23
  ```
24
24
 
25
- The web app imports `./manifest` (the built `dist/manifest.json`) and feeds it to the Components MCP server. The root `pnpm dev` builds the design system first so the manifest exists.
25
+ The web app imports `./manifest` (the built `dist/manifest.json`) and passes it to `components.manifest` in the `throughline()` call in `apps/web/src/payload.config.ts`, which serves it over MCP. The root `pnpm dev` builds the design system first so the manifest exists.
26
26
 
27
27
  ## Branding
28
28
 
@@ -17,4 +17,4 @@ pnpm --filter "./design-system" build-storybook # static Storybook
17
17
  pnpm --filter "./design-system" typecheck
18
18
  ```
19
19
 
20
- Point the Components MCP server at your manifest in `apps/web/src/payload.config.ts` (`componentsPlugin({ manifest })`) once you generate one. For a worked starting point, re-scaffold with the reference design system.
20
+ Point `components.manifest` in the `throughline()` call in `apps/web/src/payload.config.ts` at your manifest once you generate one; until then it names a placeholder URL. For a worked starting point, re-scaffold with the reference design system.
@@ -1,4 +1,4 @@
1
1
  {
2
- "@forumone/throughline-design-system": "1.0.2-next-0ecb757",
3
- "@forumone/throughline": "1.0.2-next-0ecb757"
2
+ "@forumone/throughline-design-system": "1.0.2-next-7b3e9c1",
3
+ "@forumone/throughline": "1.0.2-next-7b3e9c1"
4
4
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@forumone/create-throughline",
3
- "version": "1.0.2-next-0ecb757",
4
- "description": "Scaffolder for new Throughline projects (Payload CMS + MCP servers + Inngest workflows).",
3
+ "version": "1.0.2-next-7b3e9c1",
4
+ "description": "Scaffolder for new Throughline projects: Payload CMS with the Throughline suite, served over MCP, and its jobs on Inngest.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "create-throughline": "./dist/bin.js"