nextworks 0.1.0-alpha.9 → 0.2.0-alpha.10

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 (244) hide show
  1. package/README.md +174 -146
  2. package/dist/cli_manifests/blocks_manifest.json +17 -28
  3. package/dist/commands/blocks.d.ts +5 -0
  4. package/dist/commands/blocks.d.ts.map +1 -1
  5. package/dist/commands/blocks.js +309 -32
  6. package/dist/commands/blocks.js.map +1 -1
  7. package/dist/commands/doctor.d.ts +48 -0
  8. package/dist/commands/doctor.d.ts.map +1 -0
  9. package/dist/commands/doctor.js +197 -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 +104 -25
  16. package/dist/index.js.map +1 -1
  17. package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +93 -186
  18. package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +83 -44
  19. package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +269 -223
  20. package/dist/kits/blocks/LICENSE +1 -1
  21. package/dist/kits/blocks/app/globals.css +1 -1
  22. package/dist/kits/blocks/app/templates/digitalagency/README.md +8 -2
  23. package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +71 -99
  24. package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +40 -74
  25. package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +123 -227
  26. package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -89
  27. package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +83 -90
  28. package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +121 -168
  29. package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +288 -297
  30. package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -157
  31. package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +1 -2
  32. package/dist/kits/blocks/app/templates/gallery/page.tsx +300 -303
  33. package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +1 -0
  34. package/dist/kits/blocks/app/templates/productlaunch/README.md +9 -2
  35. package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +0 -94
  36. package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +2 -45
  37. package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +4 -11
  38. package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +1 -2
  39. package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +1 -1
  40. package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +6 -7
  41. package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +8 -54
  42. package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +1 -1
  43. package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +1 -1
  44. package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +1 -1
  45. package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +1 -1
  46. package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +2 -1
  47. package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +1 -1
  48. package/dist/kits/blocks/app/templates/productlaunch/page.tsx +0 -2
  49. package/dist/kits/blocks/app/templates/saasdashboard/README.md +9 -3
  50. package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +0 -47
  51. package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +2 -2
  52. package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +0 -1
  53. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +0 -1
  54. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +0 -1
  55. package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +4 -46
  56. package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +3 -4
  57. package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +1 -1
  58. package/dist/kits/blocks/app/tw-animate.css +257 -0
  59. package/dist/kits/blocks/components/app-providers.app.tsx +17 -0
  60. package/dist/kits/blocks/components/app-providers.pages.tsx +12 -0
  61. package/dist/kits/blocks/components/app-providers.tsx +1 -1
  62. package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -195
  63. package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -0
  64. package/dist/kits/blocks/components/sections/CTA.tsx +0 -1
  65. package/dist/kits/blocks/components/sections/FAQ.tsx +0 -12
  66. package/dist/kits/blocks/components/sections/Features.tsx +7 -8
  67. package/dist/kits/blocks/components/sections/HeroMotion.tsx +6 -5
  68. package/dist/kits/blocks/components/sections/HeroOverlay.tsx +2 -2
  69. package/dist/kits/blocks/components/sections/HeroSplit.tsx +1 -1
  70. package/dist/kits/blocks/components/sections/Navbar.tsx +1 -4
  71. package/dist/kits/blocks/components/sections/Newsletter.tsx +2 -2
  72. package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +0 -1
  73. package/dist/kits/blocks/components/sections/ServicesGrid.tsx +1 -1
  74. package/dist/kits/blocks/components/theme-provider.tsx +0 -33
  75. package/dist/kits/blocks/components/ui/switch.tsx +78 -78
  76. package/dist/kits/blocks/components/ui/theme-selector.tsx +2 -6
  77. package/dist/kits/blocks/lib/themes.ts +1 -0
  78. package/dist/kits/blocks/lib/utils.ts +0 -3
  79. package/dist/kits/blocks/package-deps.json +40 -22
  80. package/dist/utils/file-operations.d.ts +7 -1
  81. package/dist/utils/file-operations.d.ts.map +1 -1
  82. package/dist/utils/file-operations.js +496 -14
  83. package/dist/utils/file-operations.js.map +1 -1
  84. package/dist/utils/installation-tracker.d.ts +2 -2
  85. package/dist/utils/installation-tracker.d.ts.map +1 -1
  86. package/dist/utils/installation-tracker.js +11 -11
  87. package/dist/utils/installation-tracker.js.map +1 -1
  88. package/dist/utils/next-pages-document.d.ts +3 -0
  89. package/dist/utils/next-pages-document.d.ts.map +1 -0
  90. package/dist/utils/next-pages-document.js +48 -0
  91. package/dist/utils/next-pages-document.js.map +1 -0
  92. package/dist/utils/package-manager.d.ts +6 -0
  93. package/dist/utils/package-manager.d.ts.map +1 -0
  94. package/dist/utils/package-manager.js +58 -0
  95. package/dist/utils/package-manager.js.map +1 -0
  96. package/dist/utils/yarn-pnp.d.ts +6 -0
  97. package/dist/utils/yarn-pnp.d.ts.map +1 -0
  98. package/dist/utils/yarn-pnp.js +39 -0
  99. package/dist/utils/yarn-pnp.js.map +1 -0
  100. package/package.json +54 -54
  101. package/dist/cli_manifests/auth_manifest.json +0 -92
  102. package/dist/cli_manifests/data_manifest.json +0 -53
  103. package/dist/cli_manifests/forms_manifest.json +0 -64
  104. package/dist/commands/admin-posts.d.ts +0 -2
  105. package/dist/commands/admin-posts.d.ts.map +0 -1
  106. package/dist/commands/admin-posts.js +0 -15
  107. package/dist/commands/admin-posts.js.map +0 -1
  108. package/dist/commands/admin-users.d.ts +0 -2
  109. package/dist/commands/admin-users.d.ts.map +0 -1
  110. package/dist/commands/admin-users.js +0 -15
  111. package/dist/commands/admin-users.js.map +0 -1
  112. package/dist/commands/auth-core.d.ts +0 -2
  113. package/dist/commands/auth-core.d.ts.map +0 -1
  114. package/dist/commands/auth-core.js +0 -83
  115. package/dist/commands/auth-core.js.map +0 -1
  116. package/dist/commands/auth-forms.d.ts +0 -2
  117. package/dist/commands/auth-forms.d.ts.map +0 -1
  118. package/dist/commands/auth-forms.js +0 -15
  119. package/dist/commands/auth-forms.js.map +0 -1
  120. package/dist/commands/data.d.ts +0 -3
  121. package/dist/commands/data.d.ts.map +0 -1
  122. package/dist/commands/data.js +0 -88
  123. package/dist/commands/data.js.map +0 -1
  124. package/dist/commands/forms.d.ts +0 -6
  125. package/dist/commands/forms.d.ts.map +0 -1
  126. package/dist/commands/forms.js +0 -107
  127. package/dist/commands/forms.js.map +0 -1
  128. package/dist/commands/remove-auth-core.d.ts +0 -2
  129. package/dist/commands/remove-auth-core.d.ts.map +0 -1
  130. package/dist/commands/remove-auth-core.js +0 -69
  131. package/dist/commands/remove-auth-core.js.map +0 -1
  132. package/dist/kits/auth-core/.nextworks/docs/AUTH_CORE_README.md +0 -117
  133. package/dist/kits/auth-core/.nextworks/docs/AUTH_QUICKSTART.md +0 -244
  134. package/dist/kits/auth-core/LICENSE +0 -21
  135. package/dist/kits/auth-core/app/(protected)/admin/posts/page.tsx +0 -29
  136. package/dist/kits/auth-core/app/(protected)/admin/users/page.tsx +0 -29
  137. package/dist/kits/auth-core/app/(protected)/dashboard/page.tsx +0 -8
  138. package/dist/kits/auth-core/app/(protected)/layout.tsx +0 -18
  139. package/dist/kits/auth-core/app/(protected)/settings/profile/page.tsx +0 -15
  140. package/dist/kits/auth-core/app/(protected)/settings/profile/profile-form.tsx +0 -114
  141. package/dist/kits/auth-core/app/api/auth/[...nextauth]/route.ts +0 -1
  142. package/dist/kits/auth-core/app/api/auth/forgot-password/route.ts +0 -114
  143. package/dist/kits/auth-core/app/api/auth/providers/route.ts +0 -6
  144. package/dist/kits/auth-core/app/api/auth/reset-password/route.ts +0 -63
  145. package/dist/kits/auth-core/app/api/auth/send-verify-email/route.ts +0 -6
  146. package/dist/kits/auth-core/app/api/signup/route.ts +0 -41
  147. package/dist/kits/auth-core/app/api/users/[id]/route.ts +0 -127
  148. package/dist/kits/auth-core/app/auth/forgot-password/page.tsx +0 -21
  149. package/dist/kits/auth-core/app/auth/login/page.tsx +0 -5
  150. package/dist/kits/auth-core/app/auth/reset-password/page.tsx +0 -187
  151. package/dist/kits/auth-core/app/auth/signup/page.tsx +0 -5
  152. package/dist/kits/auth-core/app/auth/verify-email/page.tsx +0 -11
  153. package/dist/kits/auth-core/components/admin/admin-header.tsx +0 -57
  154. package/dist/kits/auth-core/components/auth/dashboard.tsx +0 -237
  155. package/dist/kits/auth-core/components/auth/forgot-password-form.tsx +0 -90
  156. package/dist/kits/auth-core/components/auth/login-form.tsx +0 -467
  157. package/dist/kits/auth-core/components/auth/logout-button.tsx +0 -50
  158. package/dist/kits/auth-core/components/auth/minimal-logout-button.tsx +0 -40
  159. package/dist/kits/auth-core/components/auth/signup-form.tsx +0 -468
  160. package/dist/kits/auth-core/components/require-auth.tsx +0 -59
  161. package/dist/kits/auth-core/components/session-provider.tsx +0 -11
  162. package/dist/kits/auth-core/components/ui/README.txt +0 -1
  163. package/dist/kits/auth-core/components/ui/button.tsx +0 -122
  164. package/dist/kits/auth-core/components/ui/input.tsx +0 -27
  165. package/dist/kits/auth-core/components/ui/label.tsx +0 -29
  166. package/dist/kits/auth-core/lib/api/errors.ts +0 -14
  167. package/dist/kits/auth-core/lib/auth-helpers.ts +0 -29
  168. package/dist/kits/auth-core/lib/auth.ts +0 -142
  169. package/dist/kits/auth-core/lib/email/dev-transport.ts +0 -42
  170. package/dist/kits/auth-core/lib/email/index.ts +0 -28
  171. package/dist/kits/auth-core/lib/email/provider-smtp.ts +0 -36
  172. package/dist/kits/auth-core/lib/forms/map-errors.ts +0 -11
  173. package/dist/kits/auth-core/lib/hash.ts +0 -6
  174. package/dist/kits/auth-core/lib/prisma.ts +0 -15
  175. package/dist/kits/auth-core/lib/server/result.ts +0 -45
  176. package/dist/kits/auth-core/lib/utils.ts +0 -6
  177. package/dist/kits/auth-core/lib/validation/forms.ts +0 -88
  178. package/dist/kits/auth-core/package-deps.json +0 -19
  179. package/dist/kits/auth-core/prisma/auth-models.prisma +0 -81
  180. package/dist/kits/auth-core/prisma/schema.prisma +0 -81
  181. package/dist/kits/auth-core/scripts/populate-tokenhash.mjs +0 -26
  182. package/dist/kits/auth-core/scripts/promote-admin.mjs +0 -33
  183. package/dist/kits/auth-core/scripts/seed-demo.mjs +0 -40
  184. package/dist/kits/auth-core/types/next-auth.d.ts +0 -25
  185. package/dist/kits/blocks/notes/THEME_GUIDE.md +0 -29
  186. package/dist/kits/data/.gitkeep +0 -0
  187. package/dist/kits/data/.nextworks/docs/DATA_QUICKSTART.md +0 -112
  188. package/dist/kits/data/.nextworks/docs/DATA_README.md +0 -117
  189. package/dist/kits/data/LICENSE +0 -21
  190. package/dist/kits/data/app/(protected)/admin/posts/page.tsx +0 -5
  191. package/dist/kits/data/app/(protected)/admin/users/page.tsx +0 -5
  192. package/dist/kits/data/app/api/posts/[id]/route.ts +0 -83
  193. package/dist/kits/data/app/api/posts/route.ts +0 -138
  194. package/dist/kits/data/app/api/seed-demo/route.ts +0 -45
  195. package/dist/kits/data/app/api/users/[id]/route.ts +0 -127
  196. package/dist/kits/data/app/api/users/check-email/route.ts +0 -18
  197. package/dist/kits/data/app/api/users/check-unique/route.ts +0 -27
  198. package/dist/kits/data/app/api/users/route.ts +0 -79
  199. package/dist/kits/data/app/examples/demo/README.md +0 -4
  200. package/dist/kits/data/app/examples/demo/create-post-form.tsx +0 -106
  201. package/dist/kits/data/app/examples/demo/page.tsx +0 -118
  202. package/dist/kits/data/app/examples/demo/seed-demo-button.tsx +0 -37
  203. package/dist/kits/data/components/admin/posts-manager.tsx +0 -719
  204. package/dist/kits/data/components/admin/users-manager.tsx +0 -432
  205. package/dist/kits/data/lib/prisma.ts +0 -15
  206. package/dist/kits/data/lib/server/result.ts +0 -90
  207. package/dist/kits/data/package-deps.json +0 -11
  208. package/dist/kits/data/scripts/seed-demo.mjs +0 -41
  209. package/dist/kits/forms/.gitkeep +0 -0
  210. package/dist/kits/forms/.nextworks/docs/FORMS_QUICKSTART.md +0 -85
  211. package/dist/kits/forms/.nextworks/docs/FORMS_README.md +0 -61
  212. package/dist/kits/forms/LICENSE +0 -21
  213. package/dist/kits/forms/app/.gitkeep +0 -0
  214. package/dist/kits/forms/app/api/wizard/route.ts +0 -71
  215. package/dist/kits/forms/app/examples/forms/basic/page.tsx +0 -124
  216. package/dist/kits/forms/app/examples/forms/server-action/form-client.tsx +0 -28
  217. package/dist/kits/forms/app/examples/forms/server-action/page.tsx +0 -71
  218. package/dist/kits/forms/app/examples/forms/wizard/page.tsx +0 -15
  219. package/dist/kits/forms/app/examples/forms/wizard/wizard-client.tsx +0 -2
  220. package/dist/kits/forms/components/.gitkeep +0 -0
  221. package/dist/kits/forms/components/examples/wizard-client.tsx +0 -231
  222. package/dist/kits/forms/components/hooks/useCheckUnique.ts +0 -79
  223. package/dist/kits/forms/components/ui/button.tsx +0 -122
  224. package/dist/kits/forms/components/ui/checkbox.tsx +0 -30
  225. package/dist/kits/forms/components/ui/form/context.ts +0 -33
  226. package/dist/kits/forms/components/ui/form/form-control.tsx +0 -28
  227. package/dist/kits/forms/components/ui/form/form-description.tsx +0 -22
  228. package/dist/kits/forms/components/ui/form/form-field.tsx +0 -36
  229. package/dist/kits/forms/components/ui/form/form-item.tsx +0 -21
  230. package/dist/kits/forms/components/ui/form/form-label.tsx +0 -24
  231. package/dist/kits/forms/components/ui/form/form-message.tsx +0 -29
  232. package/dist/kits/forms/components/ui/form/form.tsx +0 -26
  233. package/dist/kits/forms/components/ui/input.tsx +0 -27
  234. package/dist/kits/forms/components/ui/label.tsx +0 -29
  235. package/dist/kits/forms/components/ui/select.tsx +0 -25
  236. package/dist/kits/forms/components/ui/switch.tsx +0 -78
  237. package/dist/kits/forms/components/ui/textarea.tsx +0 -26
  238. package/dist/kits/forms/lib/.gitkeep +0 -0
  239. package/dist/kits/forms/lib/forms/map-errors.ts +0 -29
  240. package/dist/kits/forms/lib/prisma.ts +0 -16
  241. package/dist/kits/forms/lib/utils.ts +0 -9
  242. package/dist/kits/forms/lib/validation/forms.ts +0 -88
  243. package/dist/kits/forms/lib/validation/wizard.ts +0 -32
  244. package/dist/kits/forms/package-deps.json +0 -17
package/README.md CHANGED
@@ -1,156 +1,210 @@
1
1
  # nextworks
2
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
+
3
9
  Nextworks is a CLI that installs **modular Next.js building blocks** into your app:
4
10
 
5
11
  - **Blocks** – UI sections, templates, and core UI primitives.
6
- - **Auth Core** – Email/password auth (NextAuth + Prisma), basic dashboard, and helpers.
7
- - **Forms** – Opinionated form primitives built on React Hook Form + Zod.
8
- - **Data** – Example CRUD for Users + Posts with admin UI, wired to Auth + Prisma.
9
12
 
10
13
  > **Status:** early‑access alpha. Expect rough edges and breaking changes between alpha releases.
11
14
  >
12
- > In this alpha, the most reliable setup is to install **Blocks** first using:
15
+ > **Support matrix:**
13
16
  >
14
- > ```bash
15
- > npx nextworks add blocks --sections --templates
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
+ > ```
17
40
  >
18
- > and then add **Auth Core**, **Forms**, and **Data** on top. Partial setups (e.g. Auth/Data without Blocks) may require manual tweaks and are not yet fully supported.
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).
19
63
 
20
64
  ---
21
65
 
22
- ## Feedback / Contact
66
+ ## Known issues (alpha)
23
67
 
24
- Nextworks is early‑access alpha and I’m actively looking for feedback from early testers. If you run into issues, have questions, or want to suggest improvements or pro‑level features, I’m happy to help and would really appreciate hearing from you:
25
-
26
- - Email: nextjsworks@gmail.com
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.
27
71
 
28
72
  ---
29
73
 
30
- ## Install and run the CLI
74
+ ## Safety (read this first)
31
75
 
32
- From your Next.js app root, use `npx`:
76
+ `nextworks` installs kits by copying files into your Next.js project. If a destination path already exists, kit installs may **overwrite** your files.
33
77
 
34
- ```bash
35
- npx nextworks --help
36
- ```
78
+ Before running installs, strongly consider:
37
79
 
38
- Example commands:
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`
39
87
 
40
- ```bash
41
- npx nextworks add blocks --sections --templates
42
- npx nextworks add auth-core
43
- npx nextworks add forms
44
- npx nextworks add data
45
- ```
88
+ Kits may also:
46
89
 
47
- ---
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`
48
95
 
49
- ## Getting started in an existing Next.js app
96
+ For a transparent breakdown of what each kit writes/edits, see:
50
97
 
51
- Prerequisites:
98
+ - https://github.com/jblh/nextworks-cli/blob/main/docs/FILE_CHANGES.md
52
99
 
53
- - A Next.js App Router project (e.g. from `create-next-app`).
54
- - TypeScript + Tailwind recommended.
55
- - A **PostgreSQL database** if you plan to use **Auth Core** and **Data**.
56
- - The kits are designed and tested with Postgres using a database hosted on [Neon](https://neon.tech/).
100
+ ---
57
101
 
58
- From your app root:
102
+ ## Feedback
59
103
 
60
- ### 1) Install Blocks (UI kit)
104
+ Nextworks is early‑access alpha and I’m actively looking for feedback from early testers.
61
105
 
62
- ```bash
63
- npx nextworks add blocks --sections --templates
64
- ```
106
+ ### Where to post feedback
65
107
 
66
- This copies:
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
67
110
 
68
- - `components/ui/*` (core UI primitives)
69
- - `components/sections/*` (reusable sections)
70
- - Page templates under `app/templates/*`
71
- - Theme helpers and `app/globals.css` (if not already present)
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.
72
112
 
73
- After this step you should be able to start your dev server and visit:
113
+ ### Bug reports
74
114
 
75
- - `/` (if wired as the home page), or
76
- - `/templates/productlaunch`, `/templates/saasdashboard`, `/templates/digitalagency`
115
+ For reproducible bugs / errors (especially install/runtime issues), please open a GitHub Issue using the templates in `.github/ISSUE_TEMPLATE/`.
77
116
 
78
- ### 2) Add Auth Core
117
+ ### Private contact (optional)
79
118
 
80
- ```bash
81
- npx nextworks add auth-core
82
- ```
119
+ If you need to share something privately (e.g. security-related), email: nextjsworks@gmail.com
83
120
 
84
- Then:
85
-
86
- 1. Copy and edit your environment variables:
87
-
88
- ```bash
89
- cp .env.example .env
90
- ```
91
-
92
- Set at minimum:
121
+ ---
93
122
 
94
- ```bash
95
- DATABASE_URL=postgres://...
96
- NEXTAUTH_URL=http://localhost:3000
97
- NEXTAUTH_SECRET=your-strong-secret
98
- ```
123
+ ## Install and run the CLI
99
124
 
100
- 2. Install Prisma (if you haven’t already):
125
+ From your Next.js app root, run the CLI with your preferred package manager:
101
126
 
102
- ```bash
103
- npm install @prisma/client prisma
104
- ```
127
+ ```bash
128
+ npx nextworks@latest --help
129
+ pnpm dlx nextworks@latest --help
130
+ yarn dlx nextworks@latest --help
131
+ ```
105
132
 
106
- 3. Run Prisma:
133
+ Example commands:
107
134
 
108
- ```bash
109
- npx prisma generate
110
- npx prisma migrate dev -n init
111
- ```
135
+ ```bash
136
+ npx nextworks@latest add blocks --templates
137
+ pnpm dlx nextworks@latest add blocks --templates
138
+ yarn dlx nextworks@latest add blocks --templates
112
139
 
113
- Start your dev server:
140
+ npx nextworks@latest add blocks --templates --yes # non-interactive / CI
114
141
 
115
- ```bash
116
- npm run dev
142
+ # Force a specific package manager (overrides lockfile detection)
143
+ npx nextworks@latest add blocks --templates --pm pnpm
117
144
  ```
118
145
 
119
- Visit:
146
+ ---
120
147
 
121
- - `/auth/signup`
122
- - `/auth/login`
123
- - `/dashboard` (protected)
148
+ ## Getting started in an existing Next.js app
124
149
 
125
- ### 3) Add Forms (optional)
150
+ Prerequisites:
126
151
 
127
- ```bash
128
- npx nextworks add forms
129
- ```
152
+ - A Next.js project (App Router **or** Pages Router).
153
+ - TypeScript required.
154
+ - Tailwind CSS required (the Blocks kit and templates rely on Tailwind classes).
130
155
 
131
- This adds form primitives and example pages:
156
+ From your app root:
132
157
 
133
- - `/examples/forms/basic`
134
- - `/examples/forms/server-action`
135
- - `/examples/forms/wizard`
158
+ ### 1) Install Blocks (UI kit)
136
159
 
137
- ### 4) Add Data (optional, requires Auth Core)
160
+ Non-interactive / CI-friendly (auto-accept defaults where possible):
138
161
 
139
162
  ```bash
140
- npx nextworks add data
163
+ npx nextworks@latest add blocks --templates --yes
141
164
  ```
142
165
 
143
- Make sure your Prisma migrations are up to date:
166
+ > **Turbopack / Next 16 note (fonts + AppProviders)**
167
+ >
168
+ > Shared packages intentionally avoid importing `next/font/*`.
169
+ > Fonts are configured directly in your app’s router entrypoint (the CLI patches this for you):
170
+ >
171
+ > - App Router: `app/layout.tsx`
172
+ > - Pages Router: `pages/_app.tsx`
173
+ > This avoids Turbopack dev issues related to internal Next font modules.
174
+ >
175
+ > If you ever see a font-related Turbopack error after upgrades or manual edits, re-run:
176
+ >
177
+ > ```bash
178
+ > npx nextworks@latest add blocks --templates
179
+ > ```
180
+ >
181
+ > to re-apply the patch, and ensure your router entrypoint contains a valid
182
+ > `import { ... } from "next/font/google";` plus the corresponding `const geistSans = ...` etc.
183
+ >
184
+ > - App Router: `app/layout.tsx`
185
+ > - Pages Router: `pages/_app.tsx`
144
186
 
145
187
  ```bash
146
- npx prisma generate
147
- npx prisma migrate dev
188
+ npx nextworks@latest add blocks --templates
148
189
  ```
149
190
 
150
- Then visit:
191
+ > Note: Older docs (and the demo video) may show `--sections --templates`. It still works, but `--sections` is no longer needed.
151
192
 
152
- - `/admin/posts`
153
- - `/admin/users`
193
+ This copies:
194
+
195
+ - `components/ui/*` (core UI primitives)
196
+ - `components/sections/*` (reusable sections)
197
+ - Templates (router-native):
198
+ - App Router projects: `app/templates/<template>/**`
199
+ - Pages Router projects:
200
+ - route entry file: `pages/templates/<template>/index.tsx`
201
+ - supporting template files: `components/templates/<template>/**`
202
+ - Theme helpers and `app/globals.css` (if not already present)
203
+
204
+ After this step you should be able to start your dev server and visit:
205
+
206
+ - `/` (if wired as the home page), or
207
+ - `/templates/productlaunch`, `/templates/saasdashboard`, `/templates/digitalagency`
154
208
 
155
209
  ---
156
210
 
@@ -159,15 +213,20 @@ Then visit:
159
213
  For a full UI kit including core primitives, sections, and templates, use:
160
214
 
161
215
  ```bash
162
- npx nextworks add blocks --sections --templates
216
+ npx nextworks@latest add blocks --templates
217
+ ```
218
+
219
+ Non-interactive / CI-friendly:
220
+
221
+ ```bash
222
+ npx nextworks@latest add blocks --templates --yes
163
223
  ```
164
224
 
165
225
  If you want finer control:
166
226
 
167
- - `npx nextworks add blocks --ui-only` – install core UI primitives only (no sections/templates).
168
- - `npx nextworks add blocks --sections` – install core + sections only.
169
- - `npx nextworks add blocks --templates` – install core + templates only.
170
- - `npx nextworks add blocks --sections --templates` – install core + sections + templates.
227
+ - `npx nextworks@latest add blocks --ui-only` – install core UI primitives only (no sections/templates).
228
+ - `npx nextworks@latest add blocks --sections` – install core + sections only.
229
+ - `npx nextworks@latest add blocks --templates` – install core + sections + templates.
171
230
 
172
231
  ---
173
232
 
@@ -176,41 +235,31 @@ If you want finer control:
176
235
  You can add a short “Nextworks setup” section to your app README:
177
236
 
178
237
  ```md
179
- ### Nextworks setup (Blocks + Auth + optional Forms/Data)
238
+ ### Nextworks setup (Blocks)
180
239
 
181
240
  1. Install and run the CLI from your Next.js app root:
182
241
 
183
- npx nextworks add blocks --sections --templates
184
- npx nextworks add auth-core
185
-
186
- 2. Copy environment variables:
187
-
188
- cp .env.example .env
242
+ npx nextworks@latest add blocks --templates
189
243
 
190
- Set DATABASE_URL, NEXTAUTH_URL, NEXTAUTH_SECRET (and any OAuth or email provider vars you need).
244
+ # CI / non-interactive:
191
245
 
192
- 3. Install Prisma (if not present) and run migrations:
246
+ npx nextworks@latest add blocks --templates --yes
193
247
 
194
- npm install @prisma/client prisma
195
- npx prisma generate
196
- npx prisma migrate dev -n init
197
-
198
- 4. (Optional) Add Forms and Data kits:
199
-
200
- npx nextworks add forms
201
- npx nextworks add data
202
- npx prisma generate
203
- npx prisma migrate dev -n init_data
204
-
205
- 5. Start dev server:
248
+ 2. Start dev server:
206
249
 
207
250
  npm run dev
208
251
 
209
- 6. Try these routes:
210
- - `/` or `/templates/productlaunch` (Blocks template)
211
- - `/auth/signup`, `/auth/login`, `/dashboard` (Auth)
212
- - `/examples/forms/basic` (if you ran `npx nextworks add forms`)
213
- - `/admin/posts`, `/admin/users` (if you ran `npx nextworks add data`)
252
+ 3. Try these routes:
253
+ - `/templates/productlaunch`
254
+ - `/templates/saasdashboard`
255
+ - `/templates/digitalagency`
256
+ - `/templates/gallery`
257
+
258
+ Template files live at:
259
+ - App Router: `app/templates/<template>/**`
260
+ - Pages Router:
261
+ - route entry file: `pages/templates/<template>/index.tsx`
262
+ - supporting template files: `components/templates/<template>/**`
214
263
  ```
215
264
 
216
265
  ---
@@ -228,27 +277,6 @@ the MIT License.
228
277
 
229
278
  ## Troubleshooting
230
279
 
231
- - **Prisma errors or missing migrations**
232
-
233
- Ensure you’ve run:
234
-
235
- ```bash
236
- npx prisma generate
237
- npx prisma migrate dev
238
- ```
239
-
240
- and that `DATABASE_URL` in `.env` points to a reachable PostgreSQL instance.
241
-
242
- - **Auth routes 404**
243
-
244
- Make sure you ran:
245
-
246
- ```bash
247
- npx nextworks add auth-core
248
- ```
249
-
250
- from your app root, and restart your dev server.
251
-
252
280
  - **Type errors from imported components**
253
281
 
254
282
  Confirm your project is using TypeScript and that your TypeScript config picks up the new `components/` and `lib/` paths.
@@ -27,11 +27,15 @@
27
27
  "components/ui/theme-toggle.tsx",
28
28
  "components/ui/toaster.tsx",
29
29
  "components/enhanced-theme-provider.tsx",
30
+ "components/providers/BlocksAppProviders.tsx",
30
31
  "components/app-providers.tsx",
32
+ "components/app-providers.app.tsx",
33
+ "components/app-providers.pages.tsx",
31
34
  "components/theme-provider.tsx",
32
35
  "lib/themes.ts",
33
36
  "lib/utils.ts",
34
37
  "app/globals.css",
38
+ "app/tw-animate.css",
35
39
  "next.config.ts",
36
40
  ".nextworks/docs/THEME_GUIDE.md",
37
41
  ".nextworks/docs/BLOCKS_README.md",
@@ -64,34 +68,6 @@
64
68
  "templates": {
65
69
  "description": "Full page templates (Product Launch, SaaS Dashboard, Digital Agency, Gallery)",
66
70
  "files": [
67
- "components/ui/alert-dialog.tsx",
68
- "components/ui/brand-node.tsx",
69
- "components/ui/button.tsx",
70
- "components/ui/card.tsx",
71
- "components/ui/checkbox.tsx",
72
- "components/ui/cta-button.tsx",
73
- "components/ui/dropdown-menu.tsx",
74
- "components/ui/feature-card.tsx",
75
- "components/ui/input.tsx",
76
- "components/ui/label.tsx",
77
- "components/ui/pricing-card.tsx",
78
- "components/ui/select.tsx",
79
- "components/ui/skeleton.tsx",
80
- "components/ui/switch.tsx",
81
- "components/ui/table.tsx",
82
- "components/ui/testimonial-card.tsx",
83
- "components/ui/textarea.tsx",
84
- "components/ui/theme-selector.tsx",
85
- "components/ui/theme-toggle.tsx",
86
- "components/ui/toaster.tsx",
87
- "components/enhanced-theme-provider.tsx",
88
- "components/app-providers.tsx",
89
- "components/theme-provider.tsx",
90
- "lib/themes.ts",
91
- "lib/utils.ts",
92
- "app/globals.css",
93
- "next.config.ts",
94
-
95
71
  "app/templates/productlaunch/page.tsx",
96
72
  "app/templates/productlaunch/PresetThemeVars.tsx",
97
73
  "app/templates/productlaunch/README.md",
@@ -160,8 +136,21 @@
160
136
  "public/placeholders/saas_dashboard/projectBoard.png",
161
137
  ".nextworks/docs/THEME_GUIDE.md"
162
138
  ]
139
+ },
140
+ "gallery": {
141
+ "description": "Gallery of marketing sections (Hero, CTA, Pricing, etc.)",
142
+ "files": [
143
+ "app/templates/gallery/page.tsx",
144
+ "app/templates/gallery/PresetThemeVars.tsx",
145
+ "public/placeholders/gallery/hero-pexels-broken-9945014.avif",
146
+ "public/placeholders/gallery/pexels-googledeepmind-25626431.jpg",
147
+ "public/placeholders/gallery/pexels-googledeepmind-25626432.jpg",
148
+ "public/placeholders/gallery/pexels-googledeepmind-25626434.jpg",
149
+ "public/placeholders/gallery/pexels-googledeepmind-25626436.jpg"
150
+ ]
163
151
  }
164
152
  },
153
+
165
154
  "files": [
166
155
  "public/placeholders/gallery/hero-pexels-broken-9945014.avif",
167
156
  "public/placeholders/gallery/pexels-googledeepmind-25626431.jpg",
@@ -3,6 +3,11 @@ export interface AddBlocksOptions {
3
3
  templates?: boolean;
4
4
  gallery?: boolean;
5
5
  uiOnly?: boolean;
6
+ /** Skip interactive prompts and accept defaults. */
7
+ yes?: boolean;
8
+ /** Force package manager (overrides lockfile detection). */
9
+ pm?: import("../utils/package-manager").PackageManager;
10
+ dryRun?: boolean;
6
11
  }
7
12
  export declare function addBlocks(options?: AddBlocksOptions): Promise<void>;
8
13
  //# sourceMappingURL=blocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/commands/blocks.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2Q7E"}
1
+ {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/commands/blocks.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,4DAA4D;IAC5D,EAAE,CAAC,EAAE,OAAO,0BAA0B,EAAE,cAAc,CAAC;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAokB7E"}