|
1 | 1 | --- |
2 | 2 | id: starters |
3 | | -title: Starters |
| 3 | +title: Starters (Legacy) |
4 | 4 | --- |
5 | 5 |
|
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