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.
- package/README.md +174 -146
- package/dist/cli_manifests/blocks_manifest.json +17 -28
- package/dist/commands/blocks.d.ts +5 -0
- package/dist/commands/blocks.d.ts.map +1 -1
- package/dist/commands/blocks.js +309 -32
- package/dist/commands/blocks.js.map +1 -1
- package/dist/commands/doctor.d.ts +48 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +197 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/remove-blocks.d.ts +4 -1
- package/dist/commands/remove-blocks.d.ts.map +1 -1
- package/dist/commands/remove-blocks.js +24 -6
- package/dist/commands/remove-blocks.js.map +1 -1
- package/dist/index.js +104 -25
- package/dist/index.js.map +1 -1
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +93 -186
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +83 -44
- package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +269 -223
- package/dist/kits/blocks/LICENSE +1 -1
- package/dist/kits/blocks/app/globals.css +1 -1
- package/dist/kits/blocks/app/templates/digitalagency/README.md +8 -2
- package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +71 -99
- package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +40 -74
- package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +123 -227
- package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -89
- package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +83 -90
- package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +121 -168
- package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +288 -297
- package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -157
- package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +1 -2
- package/dist/kits/blocks/app/templates/gallery/page.tsx +300 -303
- package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +1 -0
- package/dist/kits/blocks/app/templates/productlaunch/README.md +9 -2
- package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +0 -94
- package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +2 -45
- package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +4 -11
- package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +1 -2
- package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +1 -1
- package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +6 -7
- package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +8 -54
- package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +1 -1
- package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +1 -1
- package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +1 -1
- package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +1 -1
- package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +2 -1
- package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +1 -1
- package/dist/kits/blocks/app/templates/productlaunch/page.tsx +0 -2
- package/dist/kits/blocks/app/templates/saasdashboard/README.md +9 -3
- package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +0 -47
- package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +2 -2
- package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +0 -1
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +0 -1
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +0 -1
- package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +4 -46
- package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +3 -4
- package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +1 -1
- package/dist/kits/blocks/app/tw-animate.css +257 -0
- package/dist/kits/blocks/components/app-providers.app.tsx +17 -0
- package/dist/kits/blocks/components/app-providers.pages.tsx +12 -0
- package/dist/kits/blocks/components/app-providers.tsx +1 -1
- package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -195
- package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -0
- package/dist/kits/blocks/components/sections/CTA.tsx +0 -1
- package/dist/kits/blocks/components/sections/FAQ.tsx +0 -12
- package/dist/kits/blocks/components/sections/Features.tsx +7 -8
- package/dist/kits/blocks/components/sections/HeroMotion.tsx +6 -5
- package/dist/kits/blocks/components/sections/HeroOverlay.tsx +2 -2
- package/dist/kits/blocks/components/sections/HeroSplit.tsx +1 -1
- package/dist/kits/blocks/components/sections/Navbar.tsx +1 -4
- package/dist/kits/blocks/components/sections/Newsletter.tsx +2 -2
- package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +0 -1
- package/dist/kits/blocks/components/sections/ServicesGrid.tsx +1 -1
- package/dist/kits/blocks/components/theme-provider.tsx +0 -33
- package/dist/kits/blocks/components/ui/switch.tsx +78 -78
- package/dist/kits/blocks/components/ui/theme-selector.tsx +2 -6
- package/dist/kits/blocks/lib/themes.ts +1 -0
- package/dist/kits/blocks/lib/utils.ts +0 -3
- package/dist/kits/blocks/package-deps.json +40 -22
- package/dist/utils/file-operations.d.ts +7 -1
- package/dist/utils/file-operations.d.ts.map +1 -1
- package/dist/utils/file-operations.js +496 -14
- package/dist/utils/file-operations.js.map +1 -1
- package/dist/utils/installation-tracker.d.ts +2 -2
- package/dist/utils/installation-tracker.d.ts.map +1 -1
- package/dist/utils/installation-tracker.js +11 -11
- package/dist/utils/installation-tracker.js.map +1 -1
- package/dist/utils/next-pages-document.d.ts +3 -0
- package/dist/utils/next-pages-document.d.ts.map +1 -0
- package/dist/utils/next-pages-document.js +48 -0
- package/dist/utils/next-pages-document.js.map +1 -0
- package/dist/utils/package-manager.d.ts +6 -0
- package/dist/utils/package-manager.d.ts.map +1 -0
- package/dist/utils/package-manager.js +58 -0
- package/dist/utils/package-manager.js.map +1 -0
- package/dist/utils/yarn-pnp.d.ts +6 -0
- package/dist/utils/yarn-pnp.d.ts.map +1 -0
- package/dist/utils/yarn-pnp.js +39 -0
- package/dist/utils/yarn-pnp.js.map +1 -0
- package/package.json +54 -54
- package/dist/cli_manifests/auth_manifest.json +0 -92
- package/dist/cli_manifests/data_manifest.json +0 -53
- package/dist/cli_manifests/forms_manifest.json +0 -64
- package/dist/commands/admin-posts.d.ts +0 -2
- package/dist/commands/admin-posts.d.ts.map +0 -1
- package/dist/commands/admin-posts.js +0 -15
- package/dist/commands/admin-posts.js.map +0 -1
- package/dist/commands/admin-users.d.ts +0 -2
- package/dist/commands/admin-users.d.ts.map +0 -1
- package/dist/commands/admin-users.js +0 -15
- package/dist/commands/admin-users.js.map +0 -1
- package/dist/commands/auth-core.d.ts +0 -2
- package/dist/commands/auth-core.d.ts.map +0 -1
- package/dist/commands/auth-core.js +0 -83
- package/dist/commands/auth-core.js.map +0 -1
- package/dist/commands/auth-forms.d.ts +0 -2
- package/dist/commands/auth-forms.d.ts.map +0 -1
- package/dist/commands/auth-forms.js +0 -15
- package/dist/commands/auth-forms.js.map +0 -1
- package/dist/commands/data.d.ts +0 -3
- package/dist/commands/data.d.ts.map +0 -1
- package/dist/commands/data.js +0 -88
- package/dist/commands/data.js.map +0 -1
- package/dist/commands/forms.d.ts +0 -6
- package/dist/commands/forms.d.ts.map +0 -1
- package/dist/commands/forms.js +0 -107
- package/dist/commands/forms.js.map +0 -1
- package/dist/commands/remove-auth-core.d.ts +0 -2
- package/dist/commands/remove-auth-core.d.ts.map +0 -1
- package/dist/commands/remove-auth-core.js +0 -69
- package/dist/commands/remove-auth-core.js.map +0 -1
- package/dist/kits/auth-core/.nextworks/docs/AUTH_CORE_README.md +0 -117
- package/dist/kits/auth-core/.nextworks/docs/AUTH_QUICKSTART.md +0 -244
- package/dist/kits/auth-core/LICENSE +0 -21
- package/dist/kits/auth-core/app/(protected)/admin/posts/page.tsx +0 -29
- package/dist/kits/auth-core/app/(protected)/admin/users/page.tsx +0 -29
- package/dist/kits/auth-core/app/(protected)/dashboard/page.tsx +0 -8
- package/dist/kits/auth-core/app/(protected)/layout.tsx +0 -18
- package/dist/kits/auth-core/app/(protected)/settings/profile/page.tsx +0 -15
- package/dist/kits/auth-core/app/(protected)/settings/profile/profile-form.tsx +0 -114
- package/dist/kits/auth-core/app/api/auth/[...nextauth]/route.ts +0 -1
- package/dist/kits/auth-core/app/api/auth/forgot-password/route.ts +0 -114
- package/dist/kits/auth-core/app/api/auth/providers/route.ts +0 -6
- package/dist/kits/auth-core/app/api/auth/reset-password/route.ts +0 -63
- package/dist/kits/auth-core/app/api/auth/send-verify-email/route.ts +0 -6
- package/dist/kits/auth-core/app/api/signup/route.ts +0 -41
- package/dist/kits/auth-core/app/api/users/[id]/route.ts +0 -127
- package/dist/kits/auth-core/app/auth/forgot-password/page.tsx +0 -21
- package/dist/kits/auth-core/app/auth/login/page.tsx +0 -5
- package/dist/kits/auth-core/app/auth/reset-password/page.tsx +0 -187
- package/dist/kits/auth-core/app/auth/signup/page.tsx +0 -5
- package/dist/kits/auth-core/app/auth/verify-email/page.tsx +0 -11
- package/dist/kits/auth-core/components/admin/admin-header.tsx +0 -57
- package/dist/kits/auth-core/components/auth/dashboard.tsx +0 -237
- package/dist/kits/auth-core/components/auth/forgot-password-form.tsx +0 -90
- package/dist/kits/auth-core/components/auth/login-form.tsx +0 -467
- package/dist/kits/auth-core/components/auth/logout-button.tsx +0 -50
- package/dist/kits/auth-core/components/auth/minimal-logout-button.tsx +0 -40
- package/dist/kits/auth-core/components/auth/signup-form.tsx +0 -468
- package/dist/kits/auth-core/components/require-auth.tsx +0 -59
- package/dist/kits/auth-core/components/session-provider.tsx +0 -11
- package/dist/kits/auth-core/components/ui/README.txt +0 -1
- package/dist/kits/auth-core/components/ui/button.tsx +0 -122
- package/dist/kits/auth-core/components/ui/input.tsx +0 -27
- package/dist/kits/auth-core/components/ui/label.tsx +0 -29
- package/dist/kits/auth-core/lib/api/errors.ts +0 -14
- package/dist/kits/auth-core/lib/auth-helpers.ts +0 -29
- package/dist/kits/auth-core/lib/auth.ts +0 -142
- package/dist/kits/auth-core/lib/email/dev-transport.ts +0 -42
- package/dist/kits/auth-core/lib/email/index.ts +0 -28
- package/dist/kits/auth-core/lib/email/provider-smtp.ts +0 -36
- package/dist/kits/auth-core/lib/forms/map-errors.ts +0 -11
- package/dist/kits/auth-core/lib/hash.ts +0 -6
- package/dist/kits/auth-core/lib/prisma.ts +0 -15
- package/dist/kits/auth-core/lib/server/result.ts +0 -45
- package/dist/kits/auth-core/lib/utils.ts +0 -6
- package/dist/kits/auth-core/lib/validation/forms.ts +0 -88
- package/dist/kits/auth-core/package-deps.json +0 -19
- package/dist/kits/auth-core/prisma/auth-models.prisma +0 -81
- package/dist/kits/auth-core/prisma/schema.prisma +0 -81
- package/dist/kits/auth-core/scripts/populate-tokenhash.mjs +0 -26
- package/dist/kits/auth-core/scripts/promote-admin.mjs +0 -33
- package/dist/kits/auth-core/scripts/seed-demo.mjs +0 -40
- package/dist/kits/auth-core/types/next-auth.d.ts +0 -25
- package/dist/kits/blocks/notes/THEME_GUIDE.md +0 -29
- package/dist/kits/data/.gitkeep +0 -0
- package/dist/kits/data/.nextworks/docs/DATA_QUICKSTART.md +0 -112
- package/dist/kits/data/.nextworks/docs/DATA_README.md +0 -117
- package/dist/kits/data/LICENSE +0 -21
- package/dist/kits/data/app/(protected)/admin/posts/page.tsx +0 -5
- package/dist/kits/data/app/(protected)/admin/users/page.tsx +0 -5
- package/dist/kits/data/app/api/posts/[id]/route.ts +0 -83
- package/dist/kits/data/app/api/posts/route.ts +0 -138
- package/dist/kits/data/app/api/seed-demo/route.ts +0 -45
- package/dist/kits/data/app/api/users/[id]/route.ts +0 -127
- package/dist/kits/data/app/api/users/check-email/route.ts +0 -18
- package/dist/kits/data/app/api/users/check-unique/route.ts +0 -27
- package/dist/kits/data/app/api/users/route.ts +0 -79
- package/dist/kits/data/app/examples/demo/README.md +0 -4
- package/dist/kits/data/app/examples/demo/create-post-form.tsx +0 -106
- package/dist/kits/data/app/examples/demo/page.tsx +0 -118
- package/dist/kits/data/app/examples/demo/seed-demo-button.tsx +0 -37
- package/dist/kits/data/components/admin/posts-manager.tsx +0 -719
- package/dist/kits/data/components/admin/users-manager.tsx +0 -432
- package/dist/kits/data/lib/prisma.ts +0 -15
- package/dist/kits/data/lib/server/result.ts +0 -90
- package/dist/kits/data/package-deps.json +0 -11
- package/dist/kits/data/scripts/seed-demo.mjs +0 -41
- package/dist/kits/forms/.gitkeep +0 -0
- package/dist/kits/forms/.nextworks/docs/FORMS_QUICKSTART.md +0 -85
- package/dist/kits/forms/.nextworks/docs/FORMS_README.md +0 -61
- package/dist/kits/forms/LICENSE +0 -21
- package/dist/kits/forms/app/.gitkeep +0 -0
- package/dist/kits/forms/app/api/wizard/route.ts +0 -71
- package/dist/kits/forms/app/examples/forms/basic/page.tsx +0 -124
- package/dist/kits/forms/app/examples/forms/server-action/form-client.tsx +0 -28
- package/dist/kits/forms/app/examples/forms/server-action/page.tsx +0 -71
- package/dist/kits/forms/app/examples/forms/wizard/page.tsx +0 -15
- package/dist/kits/forms/app/examples/forms/wizard/wizard-client.tsx +0 -2
- package/dist/kits/forms/components/.gitkeep +0 -0
- package/dist/kits/forms/components/examples/wizard-client.tsx +0 -231
- package/dist/kits/forms/components/hooks/useCheckUnique.ts +0 -79
- package/dist/kits/forms/components/ui/button.tsx +0 -122
- package/dist/kits/forms/components/ui/checkbox.tsx +0 -30
- package/dist/kits/forms/components/ui/form/context.ts +0 -33
- package/dist/kits/forms/components/ui/form/form-control.tsx +0 -28
- package/dist/kits/forms/components/ui/form/form-description.tsx +0 -22
- package/dist/kits/forms/components/ui/form/form-field.tsx +0 -36
- package/dist/kits/forms/components/ui/form/form-item.tsx +0 -21
- package/dist/kits/forms/components/ui/form/form-label.tsx +0 -24
- package/dist/kits/forms/components/ui/form/form-message.tsx +0 -29
- package/dist/kits/forms/components/ui/form/form.tsx +0 -26
- package/dist/kits/forms/components/ui/input.tsx +0 -27
- package/dist/kits/forms/components/ui/label.tsx +0 -29
- package/dist/kits/forms/components/ui/select.tsx +0 -25
- package/dist/kits/forms/components/ui/switch.tsx +0 -78
- package/dist/kits/forms/components/ui/textarea.tsx +0 -26
- package/dist/kits/forms/lib/.gitkeep +0 -0
- package/dist/kits/forms/lib/forms/map-errors.ts +0 -29
- package/dist/kits/forms/lib/prisma.ts +0 -16
- package/dist/kits/forms/lib/utils.ts +0 -9
- package/dist/kits/forms/lib/validation/forms.ts +0 -88
- package/dist/kits/forms/lib/validation/wizard.ts +0 -32
- 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
|
+
[](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
|
-
>
|
|
15
|
+
> **Support matrix:**
|
|
13
16
|
>
|
|
14
|
-
>
|
|
15
|
-
>
|
|
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
|
-
>
|
|
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
|
-
##
|
|
66
|
+
## Known issues (alpha)
|
|
23
67
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
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
|
-
##
|
|
74
|
+
## Safety (read this first)
|
|
31
75
|
|
|
32
|
-
|
|
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
|
-
|
|
35
|
-
npx nextworks --help
|
|
36
|
-
```
|
|
78
|
+
Before running installs, strongly consider:
|
|
37
79
|
|
|
38
|
-
|
|
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
|
-
|
|
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
|
-
|
|
96
|
+
For a transparent breakdown of what each kit writes/edits, see:
|
|
50
97
|
|
|
51
|
-
|
|
98
|
+
- https://github.com/jblh/nextworks-cli/blob/main/docs/FILE_CHANGES.md
|
|
52
99
|
|
|
53
|
-
|
|
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
|
-
|
|
102
|
+
## Feedback
|
|
59
103
|
|
|
60
|
-
|
|
104
|
+
Nextworks is early‑access alpha and I’m actively looking for feedback from early testers.
|
|
61
105
|
|
|
62
|
-
|
|
63
|
-
npx nextworks add blocks --sections --templates
|
|
64
|
-
```
|
|
106
|
+
### Where to post feedback
|
|
65
107
|
|
|
66
|
-
|
|
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
|
-
|
|
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
|
-
|
|
113
|
+
### Bug reports
|
|
74
114
|
|
|
75
|
-
|
|
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
|
-
###
|
|
117
|
+
### Private contact (optional)
|
|
79
118
|
|
|
80
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
125
|
+
From your Next.js app root, run the CLI with your preferred package manager:
|
|
101
126
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
127
|
+
```bash
|
|
128
|
+
npx nextworks@latest --help
|
|
129
|
+
pnpm dlx nextworks@latest --help
|
|
130
|
+
yarn dlx nextworks@latest --help
|
|
131
|
+
```
|
|
105
132
|
|
|
106
|
-
|
|
133
|
+
Example commands:
|
|
107
134
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
-
|
|
140
|
+
npx nextworks@latest add blocks --templates --yes # non-interactive / CI
|
|
114
141
|
|
|
115
|
-
|
|
116
|
-
|
|
142
|
+
# Force a specific package manager (overrides lockfile detection)
|
|
143
|
+
npx nextworks@latest add blocks --templates --pm pnpm
|
|
117
144
|
```
|
|
118
145
|
|
|
119
|
-
|
|
146
|
+
---
|
|
120
147
|
|
|
121
|
-
|
|
122
|
-
- `/auth/login`
|
|
123
|
-
- `/dashboard` (protected)
|
|
148
|
+
## Getting started in an existing Next.js app
|
|
124
149
|
|
|
125
|
-
|
|
150
|
+
Prerequisites:
|
|
126
151
|
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
156
|
+
From your app root:
|
|
132
157
|
|
|
133
|
-
|
|
134
|
-
- `/examples/forms/server-action`
|
|
135
|
-
- `/examples/forms/wizard`
|
|
158
|
+
### 1) Install Blocks (UI kit)
|
|
136
159
|
|
|
137
|
-
|
|
160
|
+
Non-interactive / CI-friendly (auto-accept defaults where possible):
|
|
138
161
|
|
|
139
162
|
```bash
|
|
140
|
-
npx nextworks add
|
|
163
|
+
npx nextworks@latest add blocks --templates --yes
|
|
141
164
|
```
|
|
142
165
|
|
|
143
|
-
|
|
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
|
|
147
|
-
npx prisma migrate dev
|
|
188
|
+
npx nextworks@latest add blocks --templates
|
|
148
189
|
```
|
|
149
190
|
|
|
150
|
-
|
|
191
|
+
> Note: Older docs (and the demo video) may show `--sections --templates`. It still works, but `--sections` is no longer needed.
|
|
151
192
|
|
|
152
|
-
|
|
153
|
-
|
|
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 --
|
|
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
|
|
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
|
|
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 --
|
|
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
|
-
|
|
244
|
+
# CI / non-interactive:
|
|
191
245
|
|
|
192
|
-
|
|
246
|
+
npx nextworks@latest add blocks --templates --yes
|
|
193
247
|
|
|
194
|
-
|
|
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
|
-
|
|
210
|
-
-
|
|
211
|
-
- `/
|
|
212
|
-
- `/
|
|
213
|
-
- `/
|
|
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":"
|
|
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"}
|