Skip to content

Commit 43cb687

Browse files
committed
feat: modernize templates and strengthen e2e release gates
Migrate CRA examples into first-class React templates, expand blocking e2e coverage, and fix store add-on compatibility plus responsive layout issues in generated starters.
1 parent 536ed4d commit 43cb687

File tree

307 files changed

+7167
-12185
lines changed

Some content is hidden

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

307 files changed

+7167
-12185
lines changed

.agents/index.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ node ../cli/packages/cli/dist/index.js create my-app
4545
| Term | Definition | CLI Flag |
4646
| --------- | ---------------------------------------- | ------------- |
4747
| Add-on | Plugin that extends apps (auth, DB, etc) | `--add-ons` |
48-
| Starter | Reusable preset of add-ons (config only) | `--starter` |
48+
| Template | Reusable project template | `--template` |
4949
| Framework | React or Solid | `--framework` |
5050

5151
## CLI Commands
@@ -55,7 +55,7 @@ node ../cli/packages/cli/dist/index.js create my-app
5555
| `tanstack create [name]` | Create TanStack Start app |
5656
| `tanstack add [add-ons]` | Add to existing project |
5757
| `tanstack add-on init/compile` | Create custom add-on |
58-
| `tanstack starter init/compile` | Create custom starter |
58+
| `tanstack template init/compile` | Create custom template |
5959
| `tanstack mcp [--sse]` | Start MCP server |
6060
| `tanstack pin-versions` | Pin TanStack packages |
6161

@@ -67,7 +67,7 @@ node ../cli/packages/cli/dist/index.js create my-app
6767
| `--framework <name>` | React or Solid |
6868
| `--toolchain <id>` | Toolchain (use `--list-add-ons` to see options) |
6969
| `--deployment <id>` | Deployment target (use `--list-add-ons` to see options) |
70-
| `--starter <url>` | Use starter preset |
70+
| `--template <url-or-id>` | Use template URL/path or built-in ID |
7171
| `--no-git` | Skip git init |
7272
| `--no-install` | Skip npm install |
7373
| `-y` | Accept defaults |
@@ -119,3 +119,10 @@ node packages/cli/dist/index.js create test --add-ons http://localhost:9080/info
119119
| `packages/create/src/frameworks/` | Framework implementations |
120120
| `packages/create/src/app-*.ts` | App creation logic |
121121
| `.tanstack.json` | Generated project config |
122+
123+
124+
## Playbook Skills
125+
126+
This project uses TanStack Playbooks. Run `npx playbook list` to discover
127+
available AI coding skills. Before working with a library that has skills,
128+
read the relevant SKILL.md file at the path shown in the list output.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: E2E Opportunistic Matrix
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * *'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
matrix-e2e:
20+
name: Matrix (${{ matrix.scenario }})
21+
runs-on: ubuntu-latest
22+
continue-on-error: true
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
scenario:
27+
- react-base-pnpm
28+
- react-base-npm
29+
- solid-base-npm
30+
- react-template-resume
31+
- react-template-ecommerce
32+
- react-addons-core-pnpm
33+
- solid-addons-core-pnpm
34+
- react-toolchain-deploy
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v6.0.1
38+
with:
39+
fetch-depth: 0
40+
- name: Setup Tools
41+
uses: tanstack/config/.github/setup@main
42+
- name: Build
43+
run: pnpm build
44+
- name: Install Playwright Chrome
45+
run: pnpm --filter @tanstack/cli exec playwright install --with-deps chrome
46+
- name: Run Matrix Scenario
47+
env:
48+
E2E_MATRIX_SCENARIO: ${{ matrix.scenario }}
49+
run: pnpm --filter @tanstack/cli test:e2e:matrix
50+
- name: Upload Playwright Report
51+
if: always()
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: playwright-report-${{ matrix.scenario }}
55+
path: packages/cli/playwright-report
56+
if-no-files-found: ignore

.github/workflows/pr.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ permissions:
1414
contents: read
1515

1616
jobs:
17-
test:
18-
name: Test
17+
test-unit:
18+
name: Test (Unit)
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
@@ -26,8 +26,8 @@ jobs:
2626
uses: tanstack/config/.github/setup@main
2727
- name: Build
2828
run: pnpm build
29-
- name: Test
30-
run: pnpm test
29+
- name: Test Unit
30+
run: pnpm test:unit
3131
provenance:
3232
name: Provenance
3333
runs-on: ubuntu-latest
@@ -40,3 +40,19 @@ jobs:
4040
uses: danielroe/provenance-action@v0.1.1
4141
with:
4242
fail-on-downgrade: true
43+
test-e2e:
44+
name: Test (E2E Blocking)
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v6.0.1
49+
with:
50+
fetch-depth: 0
51+
- name: Setup Tools
52+
uses: tanstack/config/.github/setup@main
53+
- name: Build
54+
run: pnpm build
55+
- name: Install Playwright Chrome
56+
run: pnpm --filter @tanstack/cli exec playwright install --with-deps chrome
57+
- name: Test E2E Blocking
58+
run: pnpm test:e2e

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ jobs:
3030
uses: tanstack/config/.github/setup@main
3131
- name: Build
3232
run: pnpm build
33-
- name: Test
34-
run: pnpm test
33+
- name: Test Unit
34+
run: pnpm test:unit
35+
- name: Install Playwright Chrome
36+
run: pnpm --filter @tanstack/cli exec playwright install --with-deps chrome
37+
- name: E2E Blocking
38+
run: pnpm --filter @tanstack/cli test:e2e
3539
- name: Run Changesets (version or publish)
3640
uses: changesets/action@v1.5.3
3741
with:

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ my-app
1616

1717
.content-collections
1818

19-
coverage
19+
coverage
20+
playwright-report
21+
test-results

CONTRIBUTING.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,27 @@ npx serve .add-on -l 9080
4040
node ../cli/packages/cli/dist/index.js create my-app --add-ons http://localhost:9080/info.json
4141
```
4242

43-
### Testing Starters Locally
43+
### Testing Templates Locally
4444

4545
```bash
46-
# In your starter directory
47-
npx serve .starter -l 9080
46+
# In your template directory
47+
npx serve .template -l 9080
4848

49-
# Create app with local starter
50-
node ../cli/packages/cli/dist/index.js create my-app --starter http://localhost:9080/starter.json
49+
# Create app with local template
50+
node ../cli/packages/cli/dist/index.js create my-app --template http://localhost:9080/template.json
5151
```
5252

53-
## Dev Watch Mode
53+
## Dev Mode
5454

55-
Watch framework files and auto-rebuild:
55+
Create a sandbox app, watch built-in framework templates/add-ons, and run the sandbox dev server:
5656

5757
```bash
58-
rm -rf test-app && node packages/cli/dist/index.js create \
59-
--dev-watch ./packages/create/src/frameworks/react \
60-
test-app --add-ons shadcn
58+
rm -rf test-app && node packages/cli/dist/index.js dev \
59+
test-app --framework React --add-ons shadcn
6160
```
6261

62+
The legacy `create --dev-watch <path>` flow still works for direct watch path control.
63+
6364
## Developing Create UI
6465

6566
The UI requires running three things:

docs/cli-reference.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ tanstack create [project-name] [options]
1414
| Option | Description |
1515
|--------|-------------|
1616
| `--add-ons <ids>` | Comma-separated add-on IDs |
17-
| `--starter <url>` | Starter URL or local path |
17+
| `--template <url-or-id>` | Template URL/path or built-in template ID |
1818
| `--package-manager <pm>` | `npm`, `pnpm`, `yarn`, `bun`, `deno` |
1919
| `--framework <name>` | `React`, `Solid` |
20-
| `--router-only` | Create file-based Router-only app without TanStack Start (add-ons/deployment/starter disabled) |
20+
| `--router-only` | Create file-based Router-only app without TanStack Start (add-ons/deployment/template disabled) |
2121
| `--toolchain <id>` | Toolchain add-on (use `--list-add-ons` to see options) |
2222
| `--deployment <id>` | Deployment add-on (use `--list-add-ons` to see options) |
2323
| `--examples` / `--no-examples` | Include or exclude demo/example pages |
@@ -38,7 +38,8 @@ tanstack create [project-name] [options]
3838
tanstack create my-app -y
3939
tanstack create my-app --add-ons clerk,drizzle,tanstack-query
4040
tanstack create my-app --router-only --toolchain eslint --no-examples
41-
tanstack create my-app --starter https://example.com/starter.json
41+
tanstack create my-app --template https://example.com/template.json
42+
tanstack create my-app --template ecommerce
4243
```
4344

4445
---
@@ -91,27 +92,25 @@ See [Creating Add-ons](./creating-add-ons.md) for full guide.
9192

9293
---
9394

94-
## tanstack starter
95+
## tanstack template
9596

96-
Create reusable project presets.
97+
Create reusable project templates.
9798

9899
### init
99100

100101
```bash
101-
tanstack starter init
102+
tanstack template init
102103
```
103104

104-
Creates `starter-info.json` and `starter.json`.
105+
Creates `template-info.json` and `template.json`.
105106

106107
### compile
107108

108109
```bash
109-
tanstack starter compile
110+
tanstack template compile
110111
```
111112

112-
See [Starters](./starters.md) for full guide.
113-
114-
---
113+
See [Templates](./templates.md) for full guide.
115114

116115
## tanstack mcp
117116

@@ -158,4 +157,4 @@ Projects include `.tanstack.json`:
158157
}
159158
```
160159

161-
Used by `add-on init` and `starter init` to detect changes.
160+
Used by `add-on init` and `template init` to detect changes.

docs/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ npx @tanstack/cli create my-app
1212
## Features
1313

1414
- **Add-ons** - Auth, database, deployment, monitoring ([full list](./add-ons.md))
15-
- **Starters** - Reusable project presets ([docs](./starters.md))
15+
- **Templates** - Reusable project templates ([docs](./templates.md))
1616
- **MCP Server** - AI agent support ([docs](./mcp/overview.md))
1717

1818
## Next Steps

docs/starters.md

Lines changed: 2 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,6 @@
11
---
22
id: starters
3-
title: Starters
3+
title: Starters (Legacy)
44
---
55

6-
Starters are reusable presets of project setup choices. They capture configuration, not source files.
7-
8-
## Use a Starter
9-
10-
```bash
11-
tanstack create my-app --starter https://example.com/starter.json
12-
tanstack create my-app --starter ./local-starter.json
13-
```
14-
15-
You can also set a starter in the UI flow:
16-
17-
```bash
18-
tanstack create my-app --ui
19-
```
20-
21-
Then use **Set Starter** and paste the URL to your hosted `starter.json`.
22-
23-
## Create a Starter
24-
25-
```bash
26-
# 1. Create project with desired setup
27-
tanstack create my-preset --add-ons clerk,drizzle,sentry
28-
29-
# 2. Initialize starter
30-
cd my-preset
31-
tanstack starter init
32-
33-
# 3. Edit starter-info.json (name/description/banner), then compile
34-
tanstack starter compile
35-
36-
# 4. Use or distribute starter.json
37-
tanstack create new-app --starter ./starter.json
38-
```
39-
40-
## Maintain a Starter
41-
42-
When you update your source preset project:
43-
44-
```bash
45-
cd my-preset
46-
tanstack starter compile
47-
```
48-
49-
Commit and publish the updated `starter.json` to the same URL (or a versioned URL) used by your team.
50-
51-
Recommended workflow:
52-
53-
1. Keep your source preset project in git.
54-
2. Run `tanstack starter compile` whenever add-ons/options change.
55-
3. Publish `starter.json` where it can be fetched over HTTPS.
56-
4. Use that URL with `--starter` (CLI) or **Set Starter** (UI).
57-
58-
## Starter Schema
59-
60-
`starter-info.json`:
61-
62-
```json
63-
{
64-
"id": "my-saas",
65-
"name": "SaaS Starter",
66-
"description": "Auth, database, monitoring",
67-
"framework": "react",
68-
"mode": "file-router",
69-
"typescript": true,
70-
"tailwind": true,
71-
"addOns": ["clerk", "drizzle", "sentry"],
72-
"addOnOptions": {
73-
"drizzle": { "database": "postgres" }
74-
}
75-
}
76-
```
77-
78-
| Field | Required | Description |
79-
|-------|----------|-------------|
80-
| `id` | Yes | Unique identifier |
81-
| `name` | Yes | Display name |
82-
| `description` | Yes | Brief description |
83-
| `framework` | Yes | `react` or `solid` |
84-
| `mode` | Yes | `file-router` |
85-
| `typescript` | Yes | Enable TypeScript |
86-
| `tailwind` | Yes | Include Tailwind |
87-
| `addOns` | Yes | Add-on IDs |
88-
| `addOnOptions` | No | Per-add-on config |
89-
| `banner` | No | Image URL shown in UI |
90-
91-
### Banner Image
92-
93-
`banner` should be a publicly accessible image URL (PNG/JPG/WebP) used by the create UI. A screenshot of the starter works well.
94-
95-
Example:
96-
97-
```json
98-
{
99-
"banner": "https://example.com/my-starter-banner.png"
100-
}
101-
```
102-
103-
## Starter vs Add-on
104-
105-
| | Starter | Add-on |
106-
|-|---------|--------|
107-
| Contains code | No | Yes |
108-
| Adds files | No | Yes |
109-
| Configuration preset | Yes | No |
6+
This page has moved to [Templates](./templates.md).

0 commit comments

Comments
 (0)