nextworks 0.2.0-alpha.2 → 0.2.0-alpha.21

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.
Files changed (145) hide show
  1. package/README.md +280 -228
  2. package/dist/cli_manifests/blocks_manifest.json +193 -194
  3. package/dist/commands/blocks.d.ts +3 -0
  4. package/dist/commands/blocks.d.ts.map +1 -1
  5. package/dist/commands/blocks.js +128 -19
  6. package/dist/commands/blocks.js.map +1 -1
  7. package/dist/commands/doctor.d.ts +136 -0
  8. package/dist/commands/doctor.d.ts.map +1 -0
  9. package/dist/commands/doctor.js +696 -0
  10. package/dist/commands/doctor.js.map +1 -0
  11. package/dist/commands/remove-blocks.d.ts +4 -1
  12. package/dist/commands/remove-blocks.d.ts.map +1 -1
  13. package/dist/commands/remove-blocks.js +24 -6
  14. package/dist/commands/remove-blocks.js.map +1 -1
  15. package/dist/index.js +125 -4
  16. package/dist/index.js.map +1 -1
  17. package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +104 -194
  18. package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +115 -75
  19. package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +269 -251
  20. package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
  21. package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -36
  22. package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +71 -99
  23. package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +40 -74
  24. package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +123 -227
  25. package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -89
  26. package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +83 -90
  27. package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +121 -168
  28. package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +288 -297
  29. package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -157
  30. package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -114
  31. package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -59
  32. package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -55
  33. package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -28
  34. package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -65
  35. package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -38
  36. package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +130 -85
  37. package/dist/kits/blocks/app/templates/gallery/page.tsx +357 -303
  38. package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -74
  39. package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -55
  40. package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -178
  41. package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -93
  42. package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
  43. package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -93
  44. package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -84
  45. package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
  46. package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -89
  47. package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -162
  48. package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -106
  49. package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -110
  50. package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -68
  51. package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -104
  52. package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +90 -89
  53. package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -76
  54. package/dist/kits/blocks/app/templates/productlaunch/page.tsx +43 -43
  55. package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -80
  56. package/dist/kits/blocks/app/templates/saasdashboard/README.md +44 -38
  57. package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -176
  58. package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -293
  59. package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -55
  60. package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +90 -91
  61. package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
  62. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -105
  63. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -127
  64. package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -159
  65. package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
  66. package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -97
  67. package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -72
  68. package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -53
  69. package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -39
  70. package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -183
  71. package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -27
  72. package/dist/kits/blocks/components/sections/About.tsx +291 -291
  73. package/dist/kits/blocks/components/sections/CTA.tsx +257 -258
  74. package/dist/kits/blocks/components/sections/CommandShowcase.tsx +517 -0
  75. package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
  76. package/dist/kits/blocks/components/sections/FAQ.tsx +214 -225
  77. package/dist/kits/blocks/components/sections/FeaturedProjectShowcase.tsx +687 -0
  78. package/dist/kits/blocks/components/sections/Features.tsx +268 -270
  79. package/dist/kits/blocks/components/sections/Footer.tsx +302 -302
  80. package/dist/kits/blocks/components/sections/HeroMotion.tsx +308 -308
  81. package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -358
  82. package/dist/kits/blocks/components/sections/HeroProductDemo.tsx +246 -0
  83. package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
  84. package/dist/kits/blocks/components/sections/HeroWithVideo.tsx +495 -0
  85. package/dist/kits/blocks/components/sections/Navbar.tsx +352 -353
  86. package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -550
  87. package/dist/kits/blocks/components/sections/Pricing.tsx +264 -264
  88. package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -325
  89. package/dist/kits/blocks/components/sections/ProjectDeepDive.tsx +805 -0
  90. package/dist/kits/blocks/components/sections/SelectedWorkRail.tsx +485 -0
  91. package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -210
  92. package/dist/kits/blocks/components/sections/Team.tsx +309 -309
  93. package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -158
  94. package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -162
  95. package/dist/kits/blocks/components/sections/product-demo/ApprovalInboxPanel.tsx +128 -0
  96. package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +519 -0
  97. package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +140 -0
  98. package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +130 -0
  99. package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +430 -0
  100. package/dist/kits/blocks/components/sections/product-demo/TaskListPanel.tsx +302 -0
  101. package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +744 -0
  102. package/dist/kits/blocks/components/sections/product-demo/types.ts +262 -0
  103. package/dist/kits/blocks/components/theme-provider.tsx +1 -34
  104. package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -134
  105. package/dist/kits/blocks/components/ui/brand-node.tsx +121 -121
  106. package/dist/kits/blocks/components/ui/button.tsx +122 -122
  107. package/dist/kits/blocks/components/ui/card.tsx +95 -95
  108. package/dist/kits/blocks/components/ui/checkbox.tsx +30 -30
  109. package/dist/kits/blocks/components/ui/cta-button.tsx +125 -125
  110. package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -201
  111. package/dist/kits/blocks/components/ui/feature-card.tsx +91 -91
  112. package/dist/kits/blocks/components/ui/input.tsx +27 -27
  113. package/dist/kits/blocks/components/ui/label.tsx +29 -29
  114. package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -120
  115. package/dist/kits/blocks/components/ui/select.tsx +25 -25
  116. package/dist/kits/blocks/components/ui/skeleton.tsx +13 -13
  117. package/dist/kits/blocks/components/ui/table.tsx +98 -98
  118. package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -108
  119. package/dist/kits/blocks/components/ui/textarea.tsx +26 -26
  120. package/dist/kits/blocks/components/ui/theme-selector.tsx +243 -247
  121. package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -74
  122. package/dist/kits/blocks/components/ui/toaster.tsx +7 -7
  123. package/dist/kits/blocks/lib/themes.ts +400 -400
  124. package/dist/kits/blocks/lib/utils.ts +6 -9
  125. package/dist/kits/blocks/package-deps.json +40 -28
  126. package/dist/kits/blocks/tsconfig.json +11 -0
  127. package/dist/kits/blocks/tsconfig.tsbuildinfo +1 -0
  128. package/dist/utils/file-operations.d.ts +3 -1
  129. package/dist/utils/file-operations.d.ts.map +1 -1
  130. package/dist/utils/file-operations.js +84 -12
  131. package/dist/utils/file-operations.js.map +1 -1
  132. package/dist/utils/installation-tracker.d.ts +2 -2
  133. package/dist/utils/installation-tracker.d.ts.map +1 -1
  134. package/dist/utils/installation-tracker.js +11 -11
  135. package/dist/utils/installation-tracker.js.map +1 -1
  136. package/dist/utils/package-manager.d.ts +6 -0
  137. package/dist/utils/package-manager.d.ts.map +1 -0
  138. package/dist/utils/package-manager.js +58 -0
  139. package/dist/utils/package-manager.js.map +1 -0
  140. package/dist/utils/yarn-pnp.d.ts +6 -0
  141. package/dist/utils/yarn-pnp.d.ts.map +1 -0
  142. package/dist/utils/yarn-pnp.js +39 -0
  143. package/dist/utils/yarn-pnp.js.map +1 -0
  144. package/package.json +5 -2
  145. package/dist/kits/blocks/notes/THEME_GUIDE.md +0 -29
package/README.md CHANGED
@@ -1,228 +1,280 @@
1
- # nextworks
2
-
3
- Nextworks is a CLI that installs **modular Next.js building blocks** into your app:
4
-
5
- - **Blocks** UI sections, templates, and core UI primitives.
6
-
7
- > **Status:** early‑access alpha. Expect rough edges and breaking changes between alpha releases.
8
- >
9
- > **Package manager:** npm only (for now).
10
- >
11
- > In this alpha, the most reliable setup is:
12
- >
13
- > 1. Create a new Next.js project (App Router **or** Pages Router):
14
- >
15
- > ```bash
16
- > npx create-next-app@latest
17
- > ```
18
- >
19
- > 2. From your app root, install **Blocks**:
20
- >
21
- > ```bash
22
- > npx nextworks@latest add blocks --sections --templates
23
- > ```
24
- >
25
- > Non-interactive / CI-friendly:
26
- >
27
- > ```bash
28
- > npx nextworks@latest add blocks --sections --templates --yes
29
- > ```
30
- >
31
- > 3. Optionally, adjust flags to install only what you want (UI-only, sections, templates).
32
-
33
- ---
34
-
35
- ## Safety (read this first)
36
-
37
- `nextworks` installs kits by copying files into your Next.js project. If a destination path already exists, kit installs may **overwrite** your files.
38
-
39
- Before running installs, strongly consider:
40
-
41
- - **Commit first**, then install:
42
- - `git add -A && git commit -m "baseline"`
43
- - Review changes after install:
44
- - `git diff --name-status`
45
- - To undo everything quickly:
46
- - `git reset --hard`
47
- - (optional) remove untracked files created by installs: `git clean -fd`
48
-
49
- Kits may also:
50
-
51
- - **merge dependencies** into `package.json`
52
- - **edit your router entrypoint** (Blocks):
53
- - App Router: `app/layout.tsx`
54
- - Pages Router: `pages/_app.tsx` (and may create/update `pages/_document.tsx`)
55
- - create/update `.nextworks/config.json`
56
-
57
- For a transparent breakdown of what each kit writes/edits, see:
58
-
59
- - https://github.com/jblh/nextworks-cli/blob/main/docs/FILE_CHANGES.md
60
-
61
- ---
62
-
63
- ## Feedback
64
-
65
- Nextworks is early‑access alpha and I’m actively looking for feedback from early testers.
66
-
67
- ### Where to post feedback
68
-
69
- - **Start here (installation + where to post feedback):** https://github.com/jblh/nextworks-cli/discussions/1
70
- - **Alpha feedback thread (what broke / what’s missing):** https://github.com/jblh/nextworks-cli/discussions/2
71
-
72
- ### Bug reports
73
-
74
- For reproducible bugs / errors (especially install/runtime issues), please open a GitHub Issue using the templates in `.github/ISSUE_TEMPLATE/`.
75
-
76
- ### Private contact (optional)
77
-
78
- If you need to share something privately (e.g. security-related), email: nextjsworks@gmail.com
79
-
80
- ---
81
-
82
- ## Install and run the CLI
83
-
84
- From your Next.js app root, use `npx`:
85
-
86
- ```bash
87
- npx nextworks@latest --help
88
- ```
89
-
90
- Example commands:
91
-
92
- ```bash
93
- npx nextworks@latest add blocks --sections --templates
94
- npx nextworks@latest add blocks --sections --templates --yes # non-interactive / CI
95
- ```
96
-
97
- ---
98
-
99
- ## Getting started in an existing Next.js app
100
-
101
- Prerequisites:
102
-
103
- - A Next.js project (App Router **or** Pages Router).
104
- - TypeScript required.
105
- - Tailwind CSS required (the Blocks kit and templates rely on Tailwind classes).
106
-
107
- From your app root:
108
-
109
- ### 1) Install Blocks (UI kit)
110
-
111
- Non-interactive / CI-friendly (auto-accept defaults where possible):
112
-
113
- ```bash
114
- npx nextworks@latest add blocks --sections --templates --yes
115
- ```
116
-
117
- > **Turbopack / Next 16 note (fonts + AppProviders)**
118
- >
119
- > Shared packages intentionally avoid importing `next/font/*`.
120
- > Fonts are configured directly in your app’s router entrypoint (the CLI patches this for you):
121
- >
122
- > - App Router: `app/layout.tsx`
123
- > - Pages Router: `pages/_app.tsx`
124
- > This avoids Turbopack dev issues related to internal Next font modules.
125
- >
126
- > If you ever see a font-related Turbopack error after upgrades or manual edits, re-run:
127
- >
128
- > ```bash
129
- > npx nextworks@latest add blocks --sections --templates
130
- > ```
131
- >
132
- > to re-apply the patch, and ensure your router entrypoint contains a valid
133
- > `import { ... } from "next/font/google";` plus the corresponding `const geistSans = ...` etc.
134
- >
135
- > - App Router: `app/layout.tsx`
136
- > - Pages Router: `pages/_app.tsx`
137
-
138
- ```bash
139
- npx nextworks@latest add blocks --sections --templates
140
- ```
141
-
142
- This copies:
143
-
144
- - `components/ui/*` (core UI primitives)
145
- - `components/sections/*` (reusable sections)
146
- - Templates (router-native):
147
- - App Router projects: `app/templates/*`
148
- - Pages Router projects: `pages/templates/<template>/index.tsx`
149
- - Theme helpers and `app/globals.css` (if not already present)
150
-
151
- After this step you should be able to start your dev server and visit:
152
-
153
- - `/` (if wired as the home page), or
154
- - `/templates/productlaunch`, `/templates/saasdashboard`, `/templates/digitalagency`
155
-
156
- ---
157
-
158
- ## Advanced Blocks installs
159
-
160
- For a full UI kit including core primitives, sections, and templates, use:
161
-
162
- ```bash
163
- npx nextworks@latest add blocks --sections --templates
164
- ```
165
-
166
- Non-interactive / CI-friendly:
167
-
168
- ```bash
169
- npx nextworks@latest add blocks --sections --templates --yes
170
- ```
171
-
172
- If you want finer control:
173
-
174
- - `npx nextworks@latest add blocks --ui-only` – install core UI primitives only (no sections/templates).
175
- - `npx nextworks@latest add blocks --sections` – install core + sections only.
176
- - `npx nextworks@latest add blocks --templates` – install core + templates only.
177
- - `npx nextworks@latest add blocks --sections --templates` install core + sections + templates.
178
-
179
- ---
180
-
181
- ## Copy‑paste quickstart for your app README
182
-
183
- You can add a short “Nextworks setup” section to your app README:
184
-
185
- ```md
186
- ### Nextworks setup (Blocks)
187
-
188
- 1. Install and run the CLI from your Next.js app root:
189
-
190
- npx nextworks@latest add blocks --sections --templates
191
-
192
- # CI / non-interactive:
193
-
194
- npx nextworks@latest add blocks --sections --templates --yes
195
-
196
- 2. Start dev server:
197
-
198
- npm run dev
199
-
200
- 3. Try these routes:
201
- - `/templates/productlaunch`
202
- - `/templates/saasdashboard`
203
- - `/templates/digitalagency`
204
- - `/templates/gallery`
205
-
206
- Template files live at:
207
- - App Router: `app/templates/...`
208
- - Pages Router: `pages/templates/<template>/index.tsx`
209
- ```
210
-
211
- ---
212
-
213
- ## License
214
-
215
- The code in this CLI and the generated files is licensed under the MIT License (see `LICENSE`).
216
-
217
- The placeholder images in the templates are sourced from Pexels and are
218
- subject to the [Pexels License](https://www.pexels.com/license/).
219
- They are included for demonstration purposes only and are **not** covered by
220
- the MIT License.
221
-
222
- ---
223
-
224
- ## Troubleshooting
225
-
226
- - **Type errors from imported components**
227
-
228
- Confirm your project is using TypeScript and that your TypeScript config picks up the new `components/` and `lib/` paths.
1
+ # nextworks
2
+
3
+ ## 90-second install demo (silent)
4
+
5
+ Fresh `create-next-app` + `npx nextworks add blocks --templates`, plus a quick browser tour of the gallery + templates:
6
+
7
+ [![Nextworks install demo](https://img.youtube.com/vi/7YKmGFmFY5c/hqdefault.jpg)](https://www.youtube.com/watch?v=7YKmGFmFY5c)
8
+
9
+ Nextworks is a CLI that installs **modular Next.js building blocks** into your app:
10
+
11
+ - **Blocks** UI sections, templates, and core UI primitives.
12
+
13
+ > **Status:** early‑access alpha. Expect rough edges and breaking changes between alpha releases.
14
+ >
15
+ > **Support matrix:**
16
+ >
17
+ > **CI-tested:**
18
+ >
19
+ > - OS: Windows, macOS, Linux
20
+ > - Node: 20.x and 22.x
21
+ > - Next.js (sandbox pin): 16.0.7 and 16.1.4 (via create-next-app in CI)
22
+ > - Router: App Router and Pages Router
23
+ > - Package managers: npm, pnpm, yarn
24
+ >
25
+ > Note: CI uses pinned Next.js versions for stability and security (see CVE-2025-66478 / RSC protocol advisory).
26
+ >
27
+ > In this alpha, the most reliable setup is:
28
+ >
29
+ > 1. Create a new Next.js project (App Router **or** Pages Router):
30
+ >
31
+ > ```bash
32
+ > npx create-next-app@latest
33
+ > ```
34
+ >
35
+ > 2. From your app root, install **Blocks**:
36
+ >
37
+ > ```bash
38
+ > npx nextworks@latest add blocks --templates
39
+ > ```
40
+ >
41
+ > pnpm / yarn equivalents:
42
+ >
43
+ > ```bash
44
+ > pnpm dlx nextworks@latest add blocks --templates
45
+ > yarn dlx nextworks@latest add blocks --templates
46
+ > ```
47
+ >
48
+ > Non-interactive / CI-friendly:
49
+ >
50
+ > ```bash
51
+ > npx nextworks@latest add blocks --templates --yes
52
+ > ```
53
+ >
54
+ > Force a specific package manager (overrides lockfile detection):
55
+ >
56
+ > ```bash
57
+ > npx nextworks@latest add blocks --templates --pm pnpm
58
+ > npx nextworks@latest add blocks --templates --pm yarn
59
+ > npx nextworks@latest add blocks --templates --pm npm
60
+ > ```
61
+ >
62
+ > 3. Optionally, adjust flags to install only what you want (UI-only, sections, templates).
63
+
64
+ ---
65
+
66
+ ## Known issues (alpha)
67
+
68
+ - **Existing files may be overwritten** if they collide with kit paths. Commit first.
69
+ - **Router entrypoint patching can conflict** with heavily customized `app/layout.tsx` or `pages/_app.tsx`.
70
+ - **Fonts/providers wiring:** Blocks configures fonts in your router entrypoint (not inside shared packages) for Turbopack compatibility. If you manually edit fonts/providers and see errors, re-run the Blocks install to re-apply the patch.
71
+
72
+ ---
73
+
74
+ ## Safety (read this first)
75
+
76
+ `nextworks` installs kits by copying files into your Next.js project. If a destination path already exists, kit installs may **overwrite** your files.
77
+
78
+ Before running installs, strongly consider:
79
+
80
+ - **Commit first**, then install:
81
+ - `git add -A && git commit -m "baseline"`
82
+ - Review changes after install:
83
+ - `git diff --name-status`
84
+ - To undo everything quickly:
85
+ - `git reset --hard`
86
+ - (optional) remove untracked files created by installs: `git clean -fd`
87
+
88
+ Kits may also:
89
+
90
+ - **merge dependencies** into `package.json`
91
+ - **edit your router entrypoint** (Blocks):
92
+ - App Router: `app/layout.tsx`
93
+ - Pages Router: `pages/_app.tsx` (and may create/update `pages/_document.tsx`)
94
+ - create/update `.nextworks/config.json`
95
+
96
+ For a transparent breakdown of what each kit writes/edits, see:
97
+
98
+ - https://github.com/jblh/nextworks-cli/blob/main/docs/FILE_CHANGES.md
99
+
100
+ ---
101
+
102
+ ## Feedback
103
+
104
+ Nextworks is early‑access alpha and I’m actively looking for feedback from early testers.
105
+
106
+ ### Where to post feedback
107
+
108
+ - **Start here (installation + where to post feedback):** https://github.com/jblh/nextworks-cli/discussions/1
109
+ - **Alpha feedback thread (what broke / what’s missing):** https://github.com/jblh/nextworks-cli/discussions/2
110
+
111
+ If you’re reporting an install/runtime issue, please include OS, Node version, Next.js version, package manager, the exact command you ran, and the error output.
112
+
113
+ ### Bug reports
114
+
115
+ For reproducible bugs / errors (especially install/runtime issues), please open a GitHub Issue using the templates in `.github/ISSUE_TEMPLATE/`.
116
+
117
+ ---
118
+
119
+ ## Install and run the CLI
120
+
121
+ From your Next.js app root, run the CLI with your preferred package manager:
122
+
123
+ ```bash
124
+ npx nextworks@latest --help
125
+ pnpm dlx nextworks@latest --help
126
+ yarn dlx nextworks@latest --help
127
+ ```
128
+
129
+ Example commands:
130
+
131
+ ```bash
132
+ npx nextworks@latest add blocks --templates
133
+ pnpm dlx nextworks@latest add blocks --templates
134
+ yarn dlx nextworks@latest add blocks --templates
135
+
136
+ npx nextworks@latest add blocks --templates --yes # non-interactive / CI
137
+
138
+ # Force a specific package manager (overrides lockfile detection)
139
+ npx nextworks@latest add blocks --templates --pm pnpm
140
+ ```
141
+
142
+ ---
143
+
144
+ ## Getting started in an existing Next.js app
145
+
146
+ Prerequisites:
147
+
148
+ - A Next.js project (App Router **or** Pages Router).
149
+ - TypeScript required.
150
+ - Tailwind CSS required (the Blocks kit and templates rely on Tailwind classes).
151
+
152
+ From your app root:
153
+
154
+ ### 1) Install Blocks (UI kit)
155
+
156
+ Non-interactive / CI-friendly (auto-accept defaults where possible):
157
+
158
+ ```bash
159
+ npx nextworks@latest add blocks --templates --yes
160
+ ```
161
+
162
+ > **Turbopack / Next 16 note (fonts + AppProviders)**
163
+ >
164
+ > Shared packages intentionally avoid importing `next/font/*`.
165
+ > Fonts are configured directly in your app’s router entrypoint (the CLI patches this for you):
166
+ >
167
+ > - App Router: `app/layout.tsx`
168
+ > - Pages Router: `pages/_app.tsx`
169
+ > This avoids Turbopack dev issues related to internal Next font modules.
170
+ >
171
+ > If you ever see a font-related Turbopack error after upgrades or manual edits, re-run:
172
+ >
173
+ > ```bash
174
+ > npx nextworks@latest add blocks --templates
175
+ > ```
176
+ >
177
+ > to re-apply the patch, and ensure your router entrypoint contains a valid
178
+ > `import { ... } from "next/font/google";` plus the corresponding `const geistSans = ...` etc.
179
+ >
180
+ > - App Router: `app/layout.tsx`
181
+ > - Pages Router: `pages/_app.tsx`
182
+
183
+ ```bash
184
+ npx nextworks@latest add blocks --templates
185
+ ```
186
+
187
+ > Note: Older docs (and the demo video) may show `--sections --templates`. It still works, but `--sections` is no longer needed.
188
+
189
+ This copies:
190
+
191
+ - `components/ui/*` (core UI primitives)
192
+ - `components/sections/*` (reusable sections)
193
+ - Templates (router-native):
194
+ - App Router projects: `app/templates/<template>/**`
195
+ - Pages Router projects:
196
+ - route entry file: `pages/templates/<template>/index.tsx`
197
+ - supporting template files: `components/templates/<template>/**`
198
+ - Theme helpers and `app/globals.css` (if not already present)
199
+
200
+ After this step you should be able to start your dev server and visit:
201
+
202
+ - `/` (if wired as the home page), or
203
+ - `/templates/productlaunch`, `/templates/saasdashboard`, `/templates/digitalagency`, `/templates/gallery`
204
+
205
+
206
+ ---
207
+
208
+ ## Advanced Blocks installs
209
+
210
+ For a full UI kit including core primitives, sections, and templates, use:
211
+
212
+ ```bash
213
+ npx nextworks@latest add blocks --templates
214
+ ```
215
+
216
+ Non-interactive / CI-friendly:
217
+
218
+ ```bash
219
+ npx nextworks@latest add blocks --templates --yes
220
+ ```
221
+
222
+ If you want finer control:
223
+
224
+ - `npx nextworks@latest add blocks --ui-only` – install core UI primitives only (no sections/templates).
225
+ - `npx nextworks@latest add blocks --sections` – install core + sections only.
226
+ - `npx nextworks@latest add blocks --templates` – install core + sections + templates.
227
+
228
+ ---
229
+
230
+ ## Copy‑paste quickstart for your app README
231
+
232
+ You can add a short “Nextworks setup” section to your app README:
233
+
234
+ ```md
235
+ ### Nextworks setup (Blocks)
236
+
237
+ 1. Install and run the CLI from your Next.js app root:
238
+
239
+ npx nextworks@latest add blocks --templates
240
+
241
+ # CI / non-interactive:
242
+
243
+ npx nextworks@latest add blocks --templates --yes
244
+
245
+ 2. Start dev server:
246
+
247
+ npm run dev
248
+
249
+ 3. Try these routes:
250
+ - `/templates/productlaunch`
251
+ - `/templates/saasdashboard`
252
+ - `/templates/digitalagency`
253
+ - `/templates/gallery`
254
+
255
+
256
+ Template files live at:
257
+ - App Router: `app/templates/<template>/**`
258
+ - Pages Router:
259
+ - route entry file: `pages/templates/<template>/index.tsx`
260
+ - supporting template files: `components/templates/<template>/**`
261
+ ```
262
+
263
+ ---
264
+
265
+ ## License
266
+
267
+ The code in this CLI and the generated files is licensed under the MIT License (see `LICENSE`).
268
+
269
+ The placeholder images in the templates are sourced from Pexels and are
270
+ subject to the [Pexels License](https://www.pexels.com/license/).
271
+ They are included for demonstration purposes only and are **not** covered by
272
+ the MIT License.
273
+
274
+ ---
275
+
276
+ ## Troubleshooting
277
+
278
+ - **Type errors from imported components**
279
+
280
+ Confirm your project is using TypeScript and that your TypeScript config picks up the new `components/` and `lib/` paths.