nextworks 0.0.1 → 0.1.0-alpha.1
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 +209 -30
- package/dist/.gitkeep +0 -0
- package/dist/cli_manifests/auth_manifest.json +86 -0
- package/dist/cli_manifests/blocks_manifest.json +185 -0
- package/dist/cli_manifests/data_manifest.json +51 -0
- package/dist/cli_manifests/forms_manifest.json +61 -0
- package/dist/commands/admin-posts.d.ts +2 -0
- package/dist/commands/admin-posts.d.ts.map +1 -0
- package/dist/commands/admin-posts.js +15 -0
- package/dist/commands/admin-posts.js.map +1 -0
- package/dist/commands/admin-users.d.ts +2 -0
- package/dist/commands/admin-users.d.ts.map +1 -0
- package/dist/commands/admin-users.js +15 -0
- package/dist/commands/admin-users.js.map +1 -0
- package/dist/commands/auth-core.d.ts +2 -0
- package/dist/commands/auth-core.d.ts.map +1 -0
- package/dist/commands/auth-core.js +83 -0
- package/dist/commands/auth-core.js.map +1 -0
- package/dist/commands/auth-forms.d.ts +2 -0
- package/dist/commands/auth-forms.d.ts.map +1 -0
- package/dist/commands/auth-forms.js +15 -0
- package/dist/commands/auth-forms.js.map +1 -0
- package/dist/commands/blocks-options.d.ts +7 -0
- package/dist/commands/blocks-options.d.ts.map +1 -0
- package/dist/commands/blocks-options.js +19 -0
- package/dist/commands/blocks-options.js.map +1 -0
- package/dist/commands/blocks.d.ts +7 -0
- package/dist/commands/blocks.d.ts.map +1 -0
- package/dist/commands/blocks.js +145 -0
- package/dist/commands/blocks.js.map +1 -0
- package/dist/commands/data.d.ts +3 -0
- package/dist/commands/data.d.ts.map +1 -0
- package/dist/commands/data.js +88 -0
- package/dist/commands/data.js.map +1 -0
- package/dist/commands/forms.d.ts +6 -0
- package/dist/commands/forms.d.ts.map +1 -0
- package/dist/commands/forms.js +107 -0
- package/dist/commands/forms.js.map +1 -0
- package/dist/commands/remove-auth-core.d.ts +2 -0
- package/dist/commands/remove-auth-core.d.ts.map +1 -0
- package/dist/commands/remove-auth-core.js +69 -0
- package/dist/commands/remove-auth-core.js.map +1 -0
- package/dist/commands/remove-blocks.d.ts +2 -0
- package/dist/commands/remove-blocks.d.ts.map +1 -0
- package/dist/commands/remove-blocks.js +36 -0
- package/dist/commands/remove-blocks.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +109 -0
- package/dist/index.js.map +1 -0
- package/dist/kits/auth-core/README.md +106 -0
- package/dist/kits/auth-core/app/(protected)/dashboard/page.tsx +8 -0
- package/dist/kits/auth-core/app/(protected)/layout.tsx +18 -0
- package/dist/kits/auth-core/app/(protected)/settings/profile/page.tsx +15 -0
- package/dist/kits/auth-core/app/(protected)/settings/profile/profile-form.tsx +114 -0
- package/dist/kits/auth-core/app/api/auth/[...nextauth]/route.ts +1 -0
- package/dist/kits/auth-core/app/api/auth/forgot-password/route.ts +114 -0
- package/dist/kits/auth-core/app/api/auth/providers/route.ts +6 -0
- package/dist/kits/auth-core/app/api/auth/reset-password/route.ts +63 -0
- package/dist/kits/auth-core/app/api/auth/send-verify-email/route.ts +6 -0
- package/dist/kits/auth-core/app/api/signup/route.ts +41 -0
- package/dist/kits/auth-core/app/auth/forgot-password/page.tsx +21 -0
- package/dist/kits/auth-core/app/auth/login/page.tsx +5 -0
- package/dist/kits/auth-core/app/auth/reset-password/page.tsx +187 -0
- package/dist/kits/auth-core/app/auth/signup/page.tsx +5 -0
- package/dist/kits/auth-core/app/auth/verify-email/page.tsx +11 -0
- package/dist/kits/auth-core/components/admin/admin-header.tsx +57 -0
- package/dist/kits/auth-core/components/auth/dashboard.tsx +237 -0
- package/dist/kits/auth-core/components/auth/forgot-password-form.tsx +90 -0
- package/dist/kits/auth-core/components/auth/login-form.tsx +467 -0
- package/dist/kits/auth-core/components/auth/logout-button.tsx +50 -0
- package/dist/kits/auth-core/components/auth/minimal-logout-button.tsx +40 -0
- package/dist/kits/auth-core/components/auth/signup-form.tsx +468 -0
- package/dist/kits/auth-core/components/require-auth.tsx +59 -0
- package/dist/kits/auth-core/components/session-provider.tsx +11 -0
- package/dist/kits/auth-core/components/ui/README.txt +1 -0
- package/dist/kits/auth-core/components/ui/button.tsx +55 -0
- package/dist/kits/auth-core/components/ui/input.tsx +25 -0
- package/dist/kits/auth-core/components/ui/label.tsx +23 -0
- package/dist/kits/auth-core/lib/api/errors.ts +14 -0
- package/dist/kits/auth-core/lib/auth-helpers.ts +29 -0
- package/dist/kits/auth-core/lib/auth.ts +142 -0
- package/dist/kits/auth-core/lib/email/dev-transport.ts +42 -0
- package/dist/kits/auth-core/lib/email/index.ts +28 -0
- package/dist/kits/auth-core/lib/email/provider-smtp.ts +36 -0
- package/dist/kits/auth-core/lib/forms/map-errors.ts +11 -0
- package/dist/kits/auth-core/lib/hash.ts +6 -0
- package/dist/kits/auth-core/lib/prisma.ts +15 -0
- package/dist/kits/auth-core/lib/server/result.ts +45 -0
- package/dist/kits/auth-core/lib/utils.ts +6 -0
- package/dist/kits/auth-core/lib/validation/forms.ts +88 -0
- package/dist/kits/auth-core/package-deps.json +19 -0
- package/dist/kits/auth-core/prisma/auth-models.prisma +81 -0
- package/dist/kits/auth-core/prisma/schema.prisma +81 -0
- package/dist/kits/auth-core/scripts/populate-tokenhash.mjs +26 -0
- package/dist/kits/auth-core/scripts/promote-admin.mjs +33 -0
- package/dist/kits/auth-core/scripts/seed-demo.mjs +40 -0
- package/dist/kits/auth-core/types/next-auth.d.ts +25 -0
- package/dist/kits/blocks/README.md +53 -0
- package/dist/kits/blocks/app/globals.css +175 -0
- package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -0
- package/dist/kits/blocks/app/templates/digitalagency/README.md +36 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +99 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +74 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +227 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +90 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +168 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +297 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -0
- package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -0
- package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -0
- package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +85 -0
- package/dist/kits/blocks/app/templates/gallery/page.tsx +303 -0
- package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +74 -0
- package/dist/kits/blocks/app/templates/productlaunch/README.md +55 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +178 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +93 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +93 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +84 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +89 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +162 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +89 -0
- package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -0
- package/dist/kits/blocks/app/templates/productlaunch/page.tsx +45 -0
- package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -0
- package/dist/kits/blocks/app/templates/saasdashboard/README.md +38 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +176 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +91 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +105 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +127 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +159 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +97 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -0
- package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -0
- package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -0
- package/dist/kits/blocks/components/app-providers.tsx +1 -0
- package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -0
- package/dist/kits/blocks/components/sections/About.tsx +291 -0
- package/dist/kits/blocks/components/sections/CTA.tsx +258 -0
- package/dist/kits/blocks/components/sections/Contact.tsx +267 -0
- package/dist/kits/blocks/components/sections/FAQ.tsx +226 -0
- package/dist/kits/blocks/components/sections/Features.tsx +269 -0
- package/dist/kits/blocks/components/sections/Footer.tsx +302 -0
- package/dist/kits/blocks/components/sections/HeroMotion.tsx +307 -0
- package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -0
- package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -0
- package/dist/kits/blocks/components/sections/Navbar.tsx +353 -0
- package/dist/kits/blocks/components/sections/Newsletter.tsx +156 -0
- package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +550 -0
- package/dist/kits/blocks/components/sections/Pricing.tsx +264 -0
- package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -0
- package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -0
- package/dist/kits/blocks/components/sections/Team.tsx +309 -0
- package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -0
- package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -0
- package/dist/kits/blocks/components/theme-provider.tsx +34 -0
- package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -0
- package/dist/kits/blocks/components/ui/brand-node.tsx +121 -0
- package/dist/kits/blocks/components/ui/button.tsx +122 -0
- package/dist/kits/blocks/components/ui/button_bck.tsx +93 -0
- package/dist/kits/blocks/components/ui/card.tsx +95 -0
- package/dist/kits/blocks/components/ui/checkbox.tsx +30 -0
- package/dist/kits/blocks/components/ui/cta-button.tsx +125 -0
- package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -0
- package/dist/kits/blocks/components/ui/feature-card.tsx +91 -0
- package/dist/kits/blocks/components/ui/input.tsx +27 -0
- package/dist/kits/blocks/components/ui/label.tsx +29 -0
- package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -0
- package/dist/kits/blocks/components/ui/select.tsx +25 -0
- package/dist/kits/blocks/components/ui/skeleton.tsx +13 -0
- package/dist/kits/blocks/components/ui/switch.tsx +78 -0
- package/dist/kits/blocks/components/ui/table.tsx +98 -0
- package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -0
- package/dist/kits/blocks/components/ui/textarea.tsx +26 -0
- package/dist/kits/blocks/components/ui/theme-selector.tsx +247 -0
- package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -0
- package/dist/kits/blocks/components/ui/toaster.tsx +7 -0
- package/dist/kits/blocks/lib/themes.ts +399 -0
- package/dist/kits/blocks/lib/themes_old.ts +37 -0
- package/dist/kits/blocks/lib/utils.ts +9 -0
- package/dist/kits/blocks/next.config.ts +11 -0
- package/dist/kits/blocks/notes/THEME_GUIDE.md +29 -0
- package/dist/kits/blocks/notes/THEMING_CONVERSION_SUMMARY.md +14 -0
- package/dist/kits/blocks/package-deps.json +22 -0
- package/dist/kits/blocks/public/placeholders/gallery/hero-pexels-broken-9945014.avif +0 -0
- package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626431.jpg +0 -0
- package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626432.jpg +0 -0
- package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626434.jpg +0 -0
- package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626436.jpg +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/feature_1.png +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/feature_2.png +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/feature_3.png +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/feature_4.png +0 -0
- package/dist/kits/blocks/public/placeholders/product_launch/hero.png +0 -0
- package/dist/kits/blocks/public/placeholders/saas_dashboard/analytics.png +0 -0
- package/dist/kits/blocks/public/placeholders/saas_dashboard/chat.png +0 -0
- package/dist/kits/blocks/public/placeholders/saas_dashboard/projectBoard.png +0 -0
- package/dist/kits/data/.gitkeep +0 -0
- package/dist/kits/data/README.md +104 -0
- package/dist/kits/data/app/(protected)/admin/posts/page.tsx +5 -0
- package/dist/kits/data/app/(protected)/admin/users/page.tsx +5 -0
- package/dist/kits/data/app/api/posts/[id]/route.ts +83 -0
- package/dist/kits/data/app/api/posts/route.ts +138 -0
- package/dist/kits/data/app/api/seed-demo/route.ts +45 -0
- package/dist/kits/data/app/api/users/[id]/route.ts +127 -0
- package/dist/kits/data/app/api/users/check-email/route.ts +18 -0
- package/dist/kits/data/app/api/users/check-unique/route.ts +27 -0
- package/dist/kits/data/app/api/users/route.ts +79 -0
- package/dist/kits/data/app/examples/demo/README.md +4 -0
- package/dist/kits/data/app/examples/demo/create-post-form.tsx +106 -0
- package/dist/kits/data/app/examples/demo/page.tsx +118 -0
- package/dist/kits/data/app/examples/demo/seed-demo-button.tsx +37 -0
- package/dist/kits/data/components/admin/posts-manager.tsx +719 -0
- package/dist/kits/data/components/admin/users-manager.tsx +432 -0
- package/dist/kits/data/lib/prisma.ts +15 -0
- package/dist/kits/data/lib/server/result.ts +90 -0
- package/dist/kits/data/package-deps.json +11 -0
- package/dist/kits/data/scripts/seed-demo.mjs +41 -0
- package/dist/kits/forms/.gitkeep +0 -0
- package/dist/kits/forms/README.md +49 -0
- package/dist/kits/forms/app/.gitkeep +0 -0
- package/dist/kits/forms/app/api/wizard/route.ts +71 -0
- package/dist/kits/forms/app/examples/forms/basic/page.tsx +124 -0
- package/dist/kits/forms/app/examples/forms/server-action/form-client.tsx +28 -0
- package/dist/kits/forms/app/examples/forms/server-action/page.tsx +71 -0
- package/dist/kits/forms/app/examples/forms/wizard/page.tsx +15 -0
- package/dist/kits/forms/app/examples/forms/wizard/wizard-client.tsx +2 -0
- package/dist/kits/forms/components/.gitkeep +0 -0
- package/dist/kits/forms/components/examples/wizard-client.tsx +231 -0
- package/dist/kits/forms/components/hooks/useCheckUnique.ts +79 -0
- package/dist/kits/forms/components/ui/button.tsx +122 -0
- package/dist/kits/forms/components/ui/checkbox.tsx +30 -0
- package/dist/kits/forms/components/ui/form/context.ts +33 -0
- package/dist/kits/forms/components/ui/form/form-control.tsx +28 -0
- package/dist/kits/forms/components/ui/form/form-description.tsx +22 -0
- package/dist/kits/forms/components/ui/form/form-field.tsx +36 -0
- package/dist/kits/forms/components/ui/form/form-item.tsx +21 -0
- package/dist/kits/forms/components/ui/form/form-label.tsx +24 -0
- package/dist/kits/forms/components/ui/form/form-message.tsx +29 -0
- package/dist/kits/forms/components/ui/form/form.tsx +26 -0
- package/dist/kits/forms/components/ui/input.tsx +27 -0
- package/dist/kits/forms/components/ui/label.tsx +29 -0
- package/dist/kits/forms/components/ui/select.tsx +25 -0
- package/dist/kits/forms/components/ui/switch.tsx +78 -0
- package/dist/kits/forms/components/ui/textarea.tsx +26 -0
- package/dist/kits/forms/lib/.gitkeep +0 -0
- package/dist/kits/forms/lib/forms/map-errors.ts +29 -0
- package/dist/kits/forms/lib/prisma.ts +16 -0
- package/dist/kits/forms/lib/utils.ts +9 -0
- package/dist/kits/forms/lib/validation/forms.ts +88 -0
- package/dist/kits/forms/lib/validation/wizard.ts +32 -0
- package/dist/kits/forms/package-deps.json +17 -0
- package/dist/utils/file-operations.d.ts +18 -0
- package/dist/utils/file-operations.d.ts.map +1 -0
- package/dist/utils/file-operations.js +327 -0
- package/dist/utils/file-operations.js.map +1 -0
- package/dist/utils/installation-tracker.d.ts +26 -0
- package/dist/utils/installation-tracker.d.ts.map +1 -0
- package/dist/utils/installation-tracker.js +98 -0
- package/dist/utils/installation-tracker.js.map +1 -0
- package/package.json +51 -21
- package/index.js +0 -1
package/README.md
CHANGED
|
@@ -1,30 +1,209 @@
|
|
|
1
|
-
# nextworks
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
+
- **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
|
+
|
|
10
|
+
> **Status:** early‑access alpha. Expect rough edges and breaking changes between alpha releases.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Install and run the CLI
|
|
15
|
+
|
|
16
|
+
From your Next.js app root, use `npx`:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx nextworks --help
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Example commands:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx nextworks add blocks --sections --templates
|
|
26
|
+
npx nextworks add auth-core
|
|
27
|
+
npx nextworks add forms
|
|
28
|
+
npx nextworks add data
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Getting started in an existing Next.js app
|
|
34
|
+
|
|
35
|
+
Prerequisites:
|
|
36
|
+
|
|
37
|
+
- A Next.js App Router project (e.g. from `create-next-app`).
|
|
38
|
+
- TypeScript + Tailwind recommended.
|
|
39
|
+
- A **PostgreSQL database** if you plan to use **Auth Core** and **Data**.
|
|
40
|
+
- The kits are designed and tested with Postgres using a database hosted on [Neon](https://neon.tech/).
|
|
41
|
+
|
|
42
|
+
From your app root:
|
|
43
|
+
|
|
44
|
+
### 1) Install Blocks (UI kit)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx nextworks add blocks
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This copies:
|
|
51
|
+
|
|
52
|
+
- `components/ui/*` and `components/sections/*`
|
|
53
|
+
- Page templates under `app/templates/*`
|
|
54
|
+
- Theme helpers and `app/globals.css` (if not already present)
|
|
55
|
+
|
|
56
|
+
After this step you should be able to start your dev server and visit:
|
|
57
|
+
|
|
58
|
+
- `/` (if wired as the home page), or
|
|
59
|
+
- `/templates/productlaunch`, `/templates/saasdashboard`, `/templates/digitalagency`
|
|
60
|
+
|
|
61
|
+
### 2) Add Auth Core
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx nextworks add auth-core
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Then:
|
|
68
|
+
|
|
69
|
+
1. Copy and edit your environment variables:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
cp .env.example .env
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Set at minimum:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
DATABASE_URL=postgres://...
|
|
79
|
+
NEXTAUTH_URL=http://localhost:3000
|
|
80
|
+
NEXTAUTH_SECRET=your-strong-secret
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
2. Install Prisma (if you haven’t already):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install @prisma/client prisma
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
3. Run Prisma:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx prisma generate
|
|
93
|
+
npx prisma migrate dev -n init
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Start your dev server:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm run dev
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Visit:
|
|
103
|
+
|
|
104
|
+
- `/auth/signup`
|
|
105
|
+
- `/auth/login`
|
|
106
|
+
- `/dashboard` (protected)
|
|
107
|
+
|
|
108
|
+
### 3) Add Forms (optional)
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npx nextworks add forms
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This adds form primitives and example pages:
|
|
115
|
+
|
|
116
|
+
- `/examples/forms/basic`
|
|
117
|
+
- `/examples/forms/server-action`
|
|
118
|
+
- `/examples/forms/wizard`
|
|
119
|
+
|
|
120
|
+
### 4) Add Data (optional, requires Auth Core)
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npx nextworks add data
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Make sure your Prisma migrations are up to date:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npx prisma generate
|
|
130
|
+
npx prisma migrate dev
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Then visit:
|
|
134
|
+
|
|
135
|
+
- `/admin/posts`
|
|
136
|
+
- `/admin/users`
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Copy‑paste quickstart for your app README
|
|
141
|
+
|
|
142
|
+
You can add a short “Nextworks setup” section to your app README:
|
|
143
|
+
|
|
144
|
+
```md
|
|
145
|
+
### Nextworks setup (Blocks + Auth + optional Forms/Data)
|
|
146
|
+
|
|
147
|
+
1. Install and run the CLI from your Next.js app root:
|
|
148
|
+
|
|
149
|
+
npx nextworks add blocks --sections --templates
|
|
150
|
+
npx nextworks add auth-core
|
|
151
|
+
|
|
152
|
+
2. Copy environment variables:
|
|
153
|
+
|
|
154
|
+
cp .env.example .env
|
|
155
|
+
|
|
156
|
+
Set DATABASE_URL, NEXTAUTH_URL, NEXTAUTH_SECRET (and any OAuth or email provider vars you need).
|
|
157
|
+
|
|
158
|
+
3. Install Prisma (if not present) and run migrations:
|
|
159
|
+
|
|
160
|
+
npm install @prisma/client prisma
|
|
161
|
+
npx prisma generate
|
|
162
|
+
npx prisma migrate dev -n init
|
|
163
|
+
|
|
164
|
+
4. (Optional) Add Forms and Data kits:
|
|
165
|
+
|
|
166
|
+
npx nextworks add forms
|
|
167
|
+
npx nextworks add data
|
|
168
|
+
npx prisma generate
|
|
169
|
+
npx prisma migrate dev -n init_data
|
|
170
|
+
|
|
171
|
+
5. Start dev server:
|
|
172
|
+
|
|
173
|
+
npm run dev
|
|
174
|
+
|
|
175
|
+
6. Try these routes:
|
|
176
|
+
- `/` or `/templates/productlaunch` (Blocks template)
|
|
177
|
+
- `/auth/signup`, `/auth/login`, `/dashboard` (Auth)
|
|
178
|
+
- `/examples/forms/basic` (if you ran `npx nextworks add forms`)
|
|
179
|
+
- `/admin/posts`, `/admin/users` (if you ran `npx nextworks add data`)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Troubleshooting
|
|
185
|
+
|
|
186
|
+
- **Prisma errors or missing migrations**
|
|
187
|
+
|
|
188
|
+
Ensure you’ve run:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
npx prisma generate
|
|
192
|
+
npx prisma migrate dev
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
and that `DATABASE_URL` in `.env` points to a reachable PostgreSQL instance.
|
|
196
|
+
|
|
197
|
+
- **Auth routes 404**
|
|
198
|
+
|
|
199
|
+
Make sure you ran:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
npx nextworks add auth-core
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
from your app root, and restart your dev server.
|
|
206
|
+
|
|
207
|
+
- **Type errors from imported components**
|
|
208
|
+
|
|
209
|
+
Confirm your project is using TypeScript and that your TypeScript config picks up the new `components/` and `lib/` paths.
|
package/dist/.gitkeep
ADDED
|
File without changes
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "auth",
|
|
3
|
+
"description": "NextAuth + Prisma credentials signup/login, optional GitHub OAuth, session helpers and auth UI",
|
|
4
|
+
"files": [
|
|
5
|
+
"components/auth/login-form.tsx",
|
|
6
|
+
"components/auth/signup-form.tsx",
|
|
7
|
+
"components/auth/forgot-password-form.tsx",
|
|
8
|
+
"components/require-auth.tsx",
|
|
9
|
+
"components/session-provider.tsx",
|
|
10
|
+
"components/auth/dashboard.tsx",
|
|
11
|
+
"components/auth/login-form.tsx",
|
|
12
|
+
"components/auth/signup-form.tsx",
|
|
13
|
+
"components/admin/admin-header.tsx",
|
|
14
|
+
"components/auth/minimal-logout-button.tsx",
|
|
15
|
+
"app/(protected)/settings/profile/page.tsx",
|
|
16
|
+
"app/(protected)/settings/profile/profile-form.tsx",
|
|
17
|
+
"components/ui/input.tsx",
|
|
18
|
+
"components/ui/label.tsx",
|
|
19
|
+
"components/ui/button.tsx",
|
|
20
|
+
"lib/forms/map-errors.ts",
|
|
21
|
+
"lib/server/result.ts",
|
|
22
|
+
"lib/email/index.ts",
|
|
23
|
+
"lib/email/dev-transport.ts",
|
|
24
|
+
"lib/email/provider-smtp.ts",
|
|
25
|
+
"app/auth/signup/page.tsx",
|
|
26
|
+
"app/auth/login/page.tsx",
|
|
27
|
+
"app/auth/forgot-password/page.tsx",
|
|
28
|
+
"app/auth/reset-password/page.tsx",
|
|
29
|
+
"app/auth/verify-email/page.tsx",
|
|
30
|
+
"app/api/auth/[...nextauth]/route.ts",
|
|
31
|
+
"app/api/auth/providers/route.ts",
|
|
32
|
+
"app/api/auth/forgot-password/route.ts",
|
|
33
|
+
"app/api/auth/reset-password/route.ts",
|
|
34
|
+
"app/api/auth/send-verify-email/route.ts",
|
|
35
|
+
"app/api/signup/route.ts",
|
|
36
|
+
"lib/auth.ts",
|
|
37
|
+
"lib/auth-helpers.ts",
|
|
38
|
+
"lib/prisma.ts",
|
|
39
|
+
"lib/hash.ts",
|
|
40
|
+
"prisma/schema.prisma",
|
|
41
|
+
"prisma/auth-models.prisma",
|
|
42
|
+
"lib/email/index.ts",
|
|
43
|
+
"lib/email/dev-transport.ts",
|
|
44
|
+
"lib/email/provider-smtp.ts",
|
|
45
|
+
"lib/validation/forms.ts",
|
|
46
|
+
"lib/forms/map-errors.ts",
|
|
47
|
+
"scripts/seed-demo.mjs",
|
|
48
|
+
"scripts/promote-admin.mjs",
|
|
49
|
+
"scripts/populate-tokenhash.mjs"
|
|
50
|
+
],
|
|
51
|
+
"apiRoutes": [
|
|
52
|
+
"app/api/auth/[...nextauth]/route.ts",
|
|
53
|
+
"app/api/auth/providers/route.ts",
|
|
54
|
+
"app/api/auth/forgot-password/route.ts",
|
|
55
|
+
"app/api/auth/reset-password/route.ts",
|
|
56
|
+
"app/api/auth/send-verify-email/route.ts",
|
|
57
|
+
"app/api/signup/route.ts"
|
|
58
|
+
],
|
|
59
|
+
"prisma": ["prisma/schema.prisma", "prisma/auth-models.prisma"],
|
|
60
|
+
"scripts": [
|
|
61
|
+
"npm run dev",
|
|
62
|
+
"npm run build",
|
|
63
|
+
"npx prisma generate",
|
|
64
|
+
"npx prisma migrate dev -n init",
|
|
65
|
+
"node ./scripts/seed-demo.mjs",
|
|
66
|
+
"node ./scripts/promote-admin.mjs",
|
|
67
|
+
"node ./scripts/populate-tokenhash.mjs"
|
|
68
|
+
],
|
|
69
|
+
"env": [
|
|
70
|
+
"DATABASE_URL",
|
|
71
|
+
"NEXTAUTH_URL",
|
|
72
|
+
"NEXTAUTH_SECRET",
|
|
73
|
+
"GITHUB_ID (optional)",
|
|
74
|
+
"GITHUB_SECRET (optional)",
|
|
75
|
+
"NEXTWORKS_ENABLE_PASSWORD_RESET",
|
|
76
|
+
"NEXTWORKS_USE_DEV_EMAIL",
|
|
77
|
+
"SMTP_HOST",
|
|
78
|
+
"SMTP_PORT",
|
|
79
|
+
"SMTP_USER",
|
|
80
|
+
"SMTP_PASS",
|
|
81
|
+
"NOREPLY_EMAIL",
|
|
82
|
+
"NODE_ENV"
|
|
83
|
+
],
|
|
84
|
+
"cliKitPath": "cli/kits/auth-core",
|
|
85
|
+
"notes": "Auth kit includes NextAuth config, API routes, Prisma schema and dev scripts. When packaging, include scripts and prisma files."
|
|
86
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "blocks",
|
|
3
|
+
"description": "Frontend UI sections, templates, and core UI primitives (Button, Input, Card, Form primitives, theme providers)",
|
|
4
|
+
"groups": {
|
|
5
|
+
"core": {
|
|
6
|
+
"description": "Core UI primitives, theme providers, globals, and next.config baseline",
|
|
7
|
+
"files": [
|
|
8
|
+
"components/ui/alert-dialog.tsx",
|
|
9
|
+
"components/ui/brand-node.tsx",
|
|
10
|
+
"components/ui/button.tsx",
|
|
11
|
+
"components/ui/card.tsx",
|
|
12
|
+
"components/ui/checkbox.tsx",
|
|
13
|
+
"components/ui/cta-button.tsx",
|
|
14
|
+
"components/ui/dropdown-menu.tsx",
|
|
15
|
+
"components/ui/feature-card.tsx",
|
|
16
|
+
"components/ui/input.tsx",
|
|
17
|
+
"components/ui/label.tsx",
|
|
18
|
+
"components/ui/pricing-card.tsx",
|
|
19
|
+
"components/ui/select.tsx",
|
|
20
|
+
"components/ui/skeleton.tsx",
|
|
21
|
+
"components/ui/switch.tsx",
|
|
22
|
+
"components/ui/table.tsx",
|
|
23
|
+
"components/ui/testimonial-card.tsx",
|
|
24
|
+
"components/ui/textarea.tsx",
|
|
25
|
+
"components/ui/theme-selector.tsx",
|
|
26
|
+
"components/ui/theme-toggle.tsx",
|
|
27
|
+
"components/ui/toaster.tsx",
|
|
28
|
+
"components/enhanced-theme-provider.tsx",
|
|
29
|
+
"components/app-providers.tsx",
|
|
30
|
+
"components/theme-provider.tsx",
|
|
31
|
+
"lib/themes.ts",
|
|
32
|
+
"lib/utils.ts",
|
|
33
|
+
"app/globals.css",
|
|
34
|
+
"next.config.ts"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"sections": {
|
|
38
|
+
"description": "Standalone marketing sections (Hero, CTA, Pricing, etc.)",
|
|
39
|
+
"files": [
|
|
40
|
+
"components/sections/About.tsx",
|
|
41
|
+
"components/sections/Contact.tsx",
|
|
42
|
+
"components/sections/CTA.tsx",
|
|
43
|
+
"components/sections/FAQ.tsx",
|
|
44
|
+
"components/sections/Features.tsx",
|
|
45
|
+
"components/sections/Footer.tsx",
|
|
46
|
+
"components/sections/HeroMotion.tsx",
|
|
47
|
+
"components/sections/HeroOverlay.tsx",
|
|
48
|
+
"components/sections/HeroSplit.tsx",
|
|
49
|
+
"components/sections/Navbar.tsx",
|
|
50
|
+
"components/sections/Newsletter.tsx",
|
|
51
|
+
"components/sections/PortfolioSimple.tsx",
|
|
52
|
+
"components/sections/Pricing.tsx",
|
|
53
|
+
"components/sections/ProcessTimeline.tsx",
|
|
54
|
+
"components/sections/ServicesGrid.tsx",
|
|
55
|
+
"components/sections/Team.tsx",
|
|
56
|
+
"components/sections/Testimonials.tsx",
|
|
57
|
+
"components/sections/TrustBadges.tsx"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"templates": {
|
|
61
|
+
"description": "Full page templates (Product Launch, SaaS Dashboard, Digital Agency, Gallery)",
|
|
62
|
+
"files": [
|
|
63
|
+
"components/ui/alert-dialog.tsx",
|
|
64
|
+
"components/ui/brand-node.tsx",
|
|
65
|
+
"components/ui/button.tsx",
|
|
66
|
+
"components/ui/card.tsx",
|
|
67
|
+
"components/ui/checkbox.tsx",
|
|
68
|
+
"components/ui/cta-button.tsx",
|
|
69
|
+
"components/ui/dropdown-menu.tsx",
|
|
70
|
+
"components/ui/feature-card.tsx",
|
|
71
|
+
"components/ui/input.tsx",
|
|
72
|
+
"components/ui/label.tsx",
|
|
73
|
+
"components/ui/pricing-card.tsx",
|
|
74
|
+
"components/ui/select.tsx",
|
|
75
|
+
"components/ui/skeleton.tsx",
|
|
76
|
+
"components/ui/switch.tsx",
|
|
77
|
+
"components/ui/table.tsx",
|
|
78
|
+
"components/ui/testimonial-card.tsx",
|
|
79
|
+
"components/ui/textarea.tsx",
|
|
80
|
+
"components/ui/theme-selector.tsx",
|
|
81
|
+
"components/ui/theme-toggle.tsx",
|
|
82
|
+
"components/ui/toaster.tsx",
|
|
83
|
+
"components/enhanced-theme-provider.tsx",
|
|
84
|
+
"components/app-providers.tsx",
|
|
85
|
+
"components/theme-provider.tsx",
|
|
86
|
+
"lib/themes.ts",
|
|
87
|
+
"lib/utils.ts",
|
|
88
|
+
"app/globals.css",
|
|
89
|
+
"next.config.ts",
|
|
90
|
+
|
|
91
|
+
"app/templates/productlaunch/page.tsx",
|
|
92
|
+
"app/templates/productlaunch/PresetThemeVars.tsx",
|
|
93
|
+
"app/templates/productlaunch/README.md",
|
|
94
|
+
"app/templates/productlaunch/components/About.tsx",
|
|
95
|
+
"app/templates/productlaunch/components/Contact.tsx",
|
|
96
|
+
"app/templates/productlaunch/components/CTA.tsx",
|
|
97
|
+
"app/templates/productlaunch/components/FAQ.tsx",
|
|
98
|
+
"app/templates/productlaunch/components/Features.tsx",
|
|
99
|
+
"app/templates/productlaunch/components/Footer.tsx",
|
|
100
|
+
"app/templates/productlaunch/components/Hero.tsx",
|
|
101
|
+
"app/templates/productlaunch/components/Navbar.tsx",
|
|
102
|
+
"app/templates/productlaunch/components/Pricing.tsx",
|
|
103
|
+
"app/templates/productlaunch/components/ProcessTimeline.tsx",
|
|
104
|
+
"app/templates/productlaunch/components/ServicesGrid.tsx",
|
|
105
|
+
"app/templates/productlaunch/components/Team.tsx",
|
|
106
|
+
"app/templates/productlaunch/components/Testimonials.tsx",
|
|
107
|
+
"app/templates/productlaunch/components/TrustBadges.tsx",
|
|
108
|
+
|
|
109
|
+
"app/templates/saasdashboard/page.tsx",
|
|
110
|
+
"app/templates/saasdashboard/PresetThemeVars.tsx",
|
|
111
|
+
"app/templates/saasdashboard/README.md",
|
|
112
|
+
"app/templates/saasdashboard/components/Contact.tsx",
|
|
113
|
+
"app/templates/saasdashboard/components/Dashboard.tsx",
|
|
114
|
+
"app/templates/saasdashboard/components/FAQ.tsx",
|
|
115
|
+
"app/templates/saasdashboard/components/Features.tsx",
|
|
116
|
+
"app/templates/saasdashboard/components/Footer.tsx",
|
|
117
|
+
"app/templates/saasdashboard/components/Hero.tsx",
|
|
118
|
+
"app/templates/saasdashboard/components/Hero_mask.tsx",
|
|
119
|
+
"app/templates/saasdashboard/components/Navbar.tsx",
|
|
120
|
+
"app/templates/saasdashboard/components/Pricing.tsx",
|
|
121
|
+
"app/templates/saasdashboard/components/SmoothScroll.tsx",
|
|
122
|
+
"app/templates/saasdashboard/components/Testimonials.tsx",
|
|
123
|
+
"app/templates/saasdashboard/components/TrustBadges.tsx",
|
|
124
|
+
|
|
125
|
+
"app/templates/digitalagency/page.tsx",
|
|
126
|
+
"app/templates/digitalagency/PresetThemeVars.tsx",
|
|
127
|
+
"app/templates/digitalagency/README.md",
|
|
128
|
+
"app/templates/digitalagency/components/About.tsx",
|
|
129
|
+
"app/templates/digitalagency/components/Contact.tsx",
|
|
130
|
+
"app/templates/digitalagency/components/CTA.tsx",
|
|
131
|
+
"app/templates/digitalagency/components/Footer.tsx",
|
|
132
|
+
"app/templates/digitalagency/components/Hero.tsx",
|
|
133
|
+
"app/templates/digitalagency/components/Navbar.tsx",
|
|
134
|
+
"app/templates/digitalagency/components/NetworkPattern.tsx",
|
|
135
|
+
"app/templates/digitalagency/components/Portfolio.tsx",
|
|
136
|
+
"app/templates/digitalagency/components/Pricing.tsx",
|
|
137
|
+
"app/templates/digitalagency/components/Process.tsx",
|
|
138
|
+
"app/templates/digitalagency/components/Services.tsx",
|
|
139
|
+
"app/templates/digitalagency/components/Team.tsx",
|
|
140
|
+
"app/templates/digitalagency/components/Testimonials.tsx",
|
|
141
|
+
|
|
142
|
+
"app/templates/gallery/page.tsx",
|
|
143
|
+
"app/templates/gallery/PresetThemeVars.tsx",
|
|
144
|
+
"public/placeholders/gallery/hero-pexels-broken-9945014.avif",
|
|
145
|
+
"public/placeholders/gallery/pexels-googledeepmind-25626431.jpg",
|
|
146
|
+
"public/placeholders/gallery/pexels-googledeepmind-25626432.jpg",
|
|
147
|
+
"public/placeholders/gallery/pexels-googledeepmind-25626434.jpg",
|
|
148
|
+
"public/placeholders/gallery/pexels-googledeepmind-25626436.jpg",
|
|
149
|
+
"public/placeholders/product_launch/feature_1.png",
|
|
150
|
+
"public/placeholders/product_launch/feature_2.png",
|
|
151
|
+
"public/placeholders/product_launch/feature_3.png",
|
|
152
|
+
"public/placeholders/product_launch/feature_4.png",
|
|
153
|
+
"public/placeholders/product_launch/hero.png",
|
|
154
|
+
"public/placeholders/saas_dashboard/analytics.png",
|
|
155
|
+
"public/placeholders/saas_dashboard/chat.png",
|
|
156
|
+
"public/placeholders/saas_dashboard/projectBoard.png",
|
|
157
|
+
"notes/THEME_GUIDE.md",
|
|
158
|
+
"notes/THEMING_CONVERSION_SUMMARY.md"
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"files": [
|
|
163
|
+
"public/placeholders/gallery/hero-pexels-broken-9945014.avif",
|
|
164
|
+
"public/placeholders/gallery/pexels-googledeepmind-25626431.jpg",
|
|
165
|
+
"public/placeholders/gallery/pexels-googledeepmind-25626432.jpg",
|
|
166
|
+
"public/placeholders/gallery/pexels-googledeepmind-25626434.jpg",
|
|
167
|
+
"public/placeholders/gallery/pexels-googledeepmind-25626436.jpg",
|
|
168
|
+
"public/placeholders/product_launch/feature_1.png",
|
|
169
|
+
"public/placeholders/product_launch/feature_2.png",
|
|
170
|
+
"public/placeholders/product_launch/feature_3.png",
|
|
171
|
+
"public/placeholders/product_launch/feature_4.png",
|
|
172
|
+
"public/placeholders/product_launch/hero.png",
|
|
173
|
+
"public/placeholders/saas_dashboard/analytics.png",
|
|
174
|
+
"public/placeholders/saas_dashboard/chat.png",
|
|
175
|
+
"public/placeholders/saas_dashboard/projectBoard.png",
|
|
176
|
+
"notes/THEME_GUIDE.md",
|
|
177
|
+
"notes/THEMING_CONVERSION_SUMMARY.md"
|
|
178
|
+
],
|
|
179
|
+
"apiRoutes": [],
|
|
180
|
+
"cliKitPath": "cli/kits/blocks",
|
|
181
|
+
"prisma": [],
|
|
182
|
+
"scripts": [],
|
|
183
|
+
"env": [],
|
|
184
|
+
"notes": "Blocks are UI-only. When packaging, include app/globals.css and placeholder assets under public/placeholders. Ensure consumers are instructed to import the theme provider in app/layout.tsx."
|
|
185
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "data",
|
|
3
|
+
"description": "Example Posts + Users CRUD with API routes, admin panels, Prisma schema and seed scripts",
|
|
4
|
+
"files": [
|
|
5
|
+
"app/api/posts/route.ts",
|
|
6
|
+
"app/api/posts/[id]/route.ts",
|
|
7
|
+
"app/api/users/route.ts",
|
|
8
|
+
"app/api/users/[id]/route.ts",
|
|
9
|
+
"app/api/users/check-unique/route.ts",
|
|
10
|
+
"app/api/users/check-email/route.ts",
|
|
11
|
+
"app/api/seed-demo/route.ts",
|
|
12
|
+
"components/admin/admin-header.tsx",
|
|
13
|
+
"components/admin/posts-manager.tsx",
|
|
14
|
+
"components/admin/users-manager.tsx",
|
|
15
|
+
"app/(protected)/admin/users/page.tsx",
|
|
16
|
+
"app/(protected)/admin/posts/page.tsx",
|
|
17
|
+
"app/examples/demo/create-post-form.tsx",
|
|
18
|
+
"app/examples/demo/page.tsx",
|
|
19
|
+
"app/examples/demo/seed-demo-button.tsx",
|
|
20
|
+
"lib/prisma.ts",
|
|
21
|
+
"lib/server/result.ts",
|
|
22
|
+
|
|
23
|
+
"scripts/seed-demo.mjs"
|
|
24
|
+
],
|
|
25
|
+
"apiRoutes": [
|
|
26
|
+
"/api/posts",
|
|
27
|
+
"/api/posts/:id",
|
|
28
|
+
"/api/users",
|
|
29
|
+
"/api/users/:id",
|
|
30
|
+
"/api/users/check-unique",
|
|
31
|
+
"/api/users/check-email",
|
|
32
|
+
"/api/seed-demo"
|
|
33
|
+
],
|
|
34
|
+
"prisma": [
|
|
35
|
+
"prisma/schema.prisma",
|
|
36
|
+
"prisma/migrations/*",
|
|
37
|
+
"prisma/auth-models.prisma"
|
|
38
|
+
],
|
|
39
|
+
"scripts": [
|
|
40
|
+
"npx prisma generate",
|
|
41
|
+
"npx prisma migrate dev",
|
|
42
|
+
"SEED_ADMIN_EMAIL=admin@example.com SEED_ADMIN_PASSWORD=password123 node ./scripts/seed-demo.mjs",
|
|
43
|
+
"npm run dev"
|
|
44
|
+
],
|
|
45
|
+
"env": [
|
|
46
|
+
"DATABASE_URL",
|
|
47
|
+
"NEXTAUTH_URL (if auth is used)",
|
|
48
|
+
"NEXTAUTH_SECRET (if auth is used)"
|
|
49
|
+
],
|
|
50
|
+
"notes": "Data kit depends on Auth for RBAC and session handling. See lib/auth-helpers.ts for server-side checks."
|
|
51
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "forms",
|
|
3
|
+
"description": "React Hook Form + zod patterns, form primitives, Select/Checkbox/Switch and wizard example",
|
|
4
|
+
"files": [
|
|
5
|
+
"components/ui/form/context.ts",
|
|
6
|
+
"components/ui/form/form.tsx",
|
|
7
|
+
"components/ui/form/form-field.tsx",
|
|
8
|
+
"components/ui/form/form-item.tsx",
|
|
9
|
+
"components/ui/form/form-control.tsx",
|
|
10
|
+
"components/ui/form/form-description.tsx",
|
|
11
|
+
"components/ui/form/form-label.tsx",
|
|
12
|
+
"components/ui/form/form-message.tsx",
|
|
13
|
+
"components/ui/label.tsx",
|
|
14
|
+
"components/ui/button.tsx",
|
|
15
|
+
"components/ui/checkbox.tsx",
|
|
16
|
+
"components/ui/input.tsx",
|
|
17
|
+
"components/ui/select.tsx",
|
|
18
|
+
"components/ui/switch.tsx",
|
|
19
|
+
"components/ui/textarea.tsx",
|
|
20
|
+
"components/examples/wizard-client.tsx",
|
|
21
|
+
"components/hooks/useCheckUnique.ts",
|
|
22
|
+
"lib/utils.ts",
|
|
23
|
+
"lib/validation/forms.ts",
|
|
24
|
+
"lib/validation/wizard.ts",
|
|
25
|
+
"lib/forms/map-errors.ts",
|
|
26
|
+
"lib/prisma.ts",
|
|
27
|
+
"app/examples/forms/basic/page.tsx",
|
|
28
|
+
"app/examples/forms/wizard/wizard-client.tsx",
|
|
29
|
+
"app/examples/forms/wizard/page.tsx",
|
|
30
|
+
"app/examples/forms/server-action/form-client.tsx",
|
|
31
|
+
"app/examples/forms/server-action/page.tsx",
|
|
32
|
+
"app/api/wizard/route.ts"
|
|
33
|
+
],
|
|
34
|
+
"apiRoutes": [],
|
|
35
|
+
"optionalExamples": {
|
|
36
|
+
"server-action": {
|
|
37
|
+
"files": [
|
|
38
|
+
"app/examples/forms/server-action/page.tsx",
|
|
39
|
+
"app/examples/forms/server-action/form-client.tsx"
|
|
40
|
+
],
|
|
41
|
+
"requires": [],
|
|
42
|
+
"notes": "Server-action demo uses Prisma directly via lib/prisma.ts. Forms kit installs @prisma/client and prisma; run `npx prisma generate` and `npx prisma migrate dev` in your app. The data kit is optional if you want richer demo models."
|
|
43
|
+
},
|
|
44
|
+
"wizard": {
|
|
45
|
+
"files": [
|
|
46
|
+
"app/examples/forms/wizard/page.tsx",
|
|
47
|
+
"app/api/wizard/route.ts",
|
|
48
|
+
"components/examples/wizard-client.tsx"
|
|
49
|
+
],
|
|
50
|
+
"requires": ["data", "auth"],
|
|
51
|
+
"notes": "Wizard demo requires the data and auth kits (Prisma + NextAuth). Run: npx nextworks add data && npx nextworks add auth"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"prisma": [],
|
|
55
|
+
"scripts": [
|
|
56
|
+
"npm run dev",
|
|
57
|
+
"npx prisma generate (optional - only if schema changes)"
|
|
58
|
+
],
|
|
59
|
+
"env": [],
|
|
60
|
+
"notes": "Forms primitives are UI-only and do not require Prisma or NextAuth. When packaging, consider copying components/ui/form/* and select/checkbox/switch plus example pages if you want demo pages included. Optional server examples are listed under \"optionalExamples\" and require additional kits."
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-posts.d.ts","sourceRoot":"","sources":["../../src/commands/admin-posts.ts"],"names":[],"mappings":"AAAA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAUnD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addAdminPosts = addAdminPosts;
|
|
4
|
+
async function addAdminPosts() {
|
|
5
|
+
console.log("Installing admin-posts kit...");
|
|
6
|
+
try {
|
|
7
|
+
console.log("✓ admin-posts kit will be available soon!");
|
|
8
|
+
console.log("This kit will include post management admin panel.");
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
console.log("❌ Failed to install admin-posts kit");
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=admin-posts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-posts.js","sourceRoot":"","sources":["../../src/commands/admin-posts.ts"],"names":[],"mappings":";;AAAA,sCAUC;AAVM,KAAK,UAAU,aAAa;IACjC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAE7C,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;IACpE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-users.d.ts","sourceRoot":"","sources":["../../src/commands/admin-users.ts"],"names":[],"mappings":"AAAA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAUnD"}
|