ai-devx 1.0.0 → 1.0.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.
Files changed (206) hide show
  1. package/package.json +1 -1
  2. package/templates/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
  3. package/templates/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
  4. package/templates/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
  5. package/templates/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
  6. package/templates/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
  7. package/templates/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
  8. package/templates/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
  9. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  10. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  11. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  12. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  13. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  14. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  15. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  16. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
  17. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  18. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  19. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  20. package/templates/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  21. package/templates/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
  22. package/templates/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
  23. package/templates/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  24. package/templates/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  25. package/templates/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
  26. package/templates/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  27. package/templates/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  28. package/templates/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
  29. package/templates/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
  30. package/templates/.agent/.shared/ui-ux-pro-max/scripts/search.py +106 -0
  31. package/templates/.agent/ARCHITECTURE.md +288 -0
  32. package/templates/.agent/agents/backend-specialist.md +251 -135
  33. package/templates/.agent/agents/code-archaeologist.md +106 -0
  34. package/templates/.agent/agents/database-architect.md +222 -160
  35. package/templates/.agent/agents/debugger.md +205 -108
  36. package/templates/.agent/agents/devops-engineer.md +226 -169
  37. package/templates/.agent/agents/documentation-writer.md +104 -0
  38. package/templates/.agent/agents/explorer-agent.md +73 -0
  39. package/templates/.agent/agents/frontend-specialist.md +587 -116
  40. package/templates/.agent/agents/game-developer.md +162 -0
  41. package/templates/.agent/agents/mobile-developer.md +377 -0
  42. package/templates/.agent/agents/orchestrator.md +412 -133
  43. package/templates/.agent/agents/penetration-tester.md +188 -0
  44. package/templates/.agent/agents/performance-optimizer.md +187 -0
  45. package/templates/.agent/agents/product-manager.md +112 -0
  46. package/templates/.agent/agents/product-owner.md +95 -0
  47. package/templates/.agent/agents/project-planner.md +390 -111
  48. package/templates/.agent/agents/qa-automation-engineer.md +103 -0
  49. package/templates/.agent/agents/security-auditor.md +158 -110
  50. package/templates/.agent/agents/seo-specialist.md +111 -0
  51. package/templates/.agent/agents/test-engineer.md +136 -154
  52. package/templates/.agent/mcp_config.json +24 -0
  53. package/templates/.agent/rules/GEMINI.md +273 -0
  54. package/templates/.agent/scripts/auto_preview.py +148 -0
  55. package/templates/.agent/scripts/checklist.py +217 -0
  56. package/templates/.agent/scripts/session_manager.py +120 -0
  57. package/templates/.agent/scripts/verify_all.py +327 -0
  58. package/templates/.agent/skills/api-patterns/SKILL.md +77 -232
  59. package/templates/.agent/skills/api-patterns/api-style.md +42 -0
  60. package/templates/.agent/skills/api-patterns/auth.md +24 -0
  61. package/templates/.agent/skills/api-patterns/documentation.md +26 -0
  62. package/templates/.agent/skills/api-patterns/graphql.md +41 -0
  63. package/templates/.agent/skills/api-patterns/rate-limiting.md +31 -0
  64. package/templates/.agent/skills/api-patterns/response.md +37 -0
  65. package/templates/.agent/skills/api-patterns/rest.md +40 -0
  66. package/templates/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
  67. package/templates/.agent/skills/api-patterns/security-testing.md +122 -0
  68. package/templates/.agent/skills/api-patterns/trpc.md +41 -0
  69. package/templates/.agent/skills/api-patterns/versioning.md +22 -0
  70. package/templates/.agent/skills/app-builder/SKILL.md +75 -0
  71. package/templates/.agent/skills/app-builder/agent-coordination.md +71 -0
  72. package/templates/.agent/skills/app-builder/feature-building.md +53 -0
  73. package/templates/.agent/skills/app-builder/project-detection.md +34 -0
  74. package/templates/.agent/skills/app-builder/scaffolding.md +118 -0
  75. package/templates/.agent/skills/app-builder/tech-stack.md +40 -0
  76. package/templates/.agent/skills/app-builder/templates/SKILL.md +39 -0
  77. package/templates/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  78. package/templates/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  79. package/templates/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  80. package/templates/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  81. package/templates/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  82. package/templates/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  83. package/templates/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  84. package/templates/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
  85. package/templates/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
  86. package/templates/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
  87. package/templates/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
  88. package/templates/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  89. package/templates/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
  90. package/templates/.agent/skills/architecture/SKILL.md +55 -0
  91. package/templates/.agent/skills/architecture/context-discovery.md +43 -0
  92. package/templates/.agent/skills/architecture/examples.md +94 -0
  93. package/templates/.agent/skills/architecture/pattern-selection.md +68 -0
  94. package/templates/.agent/skills/architecture/patterns-reference.md +50 -0
  95. package/templates/.agent/skills/architecture/trade-off-analysis.md +77 -0
  96. package/templates/.agent/skills/bash-linux/SKILL.md +199 -0
  97. package/templates/.agent/skills/behavioral-modes/SKILL.md +242 -0
  98. package/templates/.agent/skills/brainstorming/SKILL.md +163 -0
  99. package/templates/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
  100. package/templates/.agent/skills/clean-code/SKILL.md +201 -0
  101. package/templates/.agent/skills/code-review-checklist/SKILL.md +109 -0
  102. package/templates/.agent/skills/database-design/SKILL.md +34 -285
  103. package/templates/.agent/skills/database-design/database-selection.md +43 -0
  104. package/templates/.agent/skills/database-design/indexing.md +39 -0
  105. package/templates/.agent/skills/database-design/migrations.md +48 -0
  106. package/templates/.agent/skills/database-design/optimization.md +36 -0
  107. package/templates/.agent/skills/database-design/orm-selection.md +30 -0
  108. package/templates/.agent/skills/database-design/schema-design.md +56 -0
  109. package/templates/.agent/skills/database-design/scripts/schema_validator.py +172 -0
  110. package/templates/.agent/skills/deployment-procedures/SKILL.md +241 -0
  111. package/templates/.agent/skills/doc.md +177 -0
  112. package/templates/.agent/skills/documentation-templates/SKILL.md +194 -0
  113. package/templates/.agent/skills/frontend-design/SKILL.md +418 -0
  114. package/templates/.agent/skills/frontend-design/animation-guide.md +331 -0
  115. package/templates/.agent/skills/frontend-design/color-system.md +311 -0
  116. package/templates/.agent/skills/frontend-design/decision-trees.md +418 -0
  117. package/templates/.agent/skills/frontend-design/motion-graphics.md +306 -0
  118. package/templates/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  119. package/templates/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
  120. package/templates/.agent/skills/frontend-design/typography-system.md +345 -0
  121. package/templates/.agent/skills/frontend-design/ux-psychology.md +1116 -0
  122. package/templates/.agent/skills/frontend-design/visual-effects.md +383 -0
  123. package/templates/.agent/skills/game-development/2d-games/SKILL.md +119 -0
  124. package/templates/.agent/skills/game-development/3d-games/SKILL.md +135 -0
  125. package/templates/.agent/skills/game-development/SKILL.md +167 -0
  126. package/templates/.agent/skills/game-development/game-art/SKILL.md +185 -0
  127. package/templates/.agent/skills/game-development/game-audio/SKILL.md +190 -0
  128. package/templates/.agent/skills/game-development/game-design/SKILL.md +129 -0
  129. package/templates/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
  130. package/templates/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
  131. package/templates/.agent/skills/game-development/pc-games/SKILL.md +144 -0
  132. package/templates/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
  133. package/templates/.agent/skills/game-development/web-games/SKILL.md +150 -0
  134. package/templates/.agent/skills/geo-fundamentals/SKILL.md +156 -0
  135. package/templates/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  136. package/templates/.agent/skills/i18n-localization/SKILL.md +154 -0
  137. package/templates/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  138. package/templates/.agent/skills/intelligent-routing/SKILL.md +335 -0
  139. package/templates/.agent/skills/lint-and-validate/SKILL.md +45 -0
  140. package/templates/.agent/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  141. package/templates/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  142. package/templates/.agent/skills/mcp-builder/SKILL.md +176 -0
  143. package/templates/.agent/skills/mobile-design/SKILL.md +394 -0
  144. package/templates/.agent/skills/mobile-design/decision-trees.md +516 -0
  145. package/templates/.agent/skills/mobile-design/mobile-backend.md +491 -0
  146. package/templates/.agent/skills/mobile-design/mobile-color-system.md +420 -0
  147. package/templates/.agent/skills/mobile-design/mobile-debugging.md +122 -0
  148. package/templates/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
  149. package/templates/.agent/skills/mobile-design/mobile-navigation.md +458 -0
  150. package/templates/.agent/skills/mobile-design/mobile-performance.md +767 -0
  151. package/templates/.agent/skills/mobile-design/mobile-testing.md +356 -0
  152. package/templates/.agent/skills/mobile-design/mobile-typography.md +433 -0
  153. package/templates/.agent/skills/mobile-design/platform-android.md +666 -0
  154. package/templates/.agent/skills/mobile-design/platform-ios.md +561 -0
  155. package/templates/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
  156. package/templates/.agent/skills/mobile-design/touch-psychology.md +537 -0
  157. package/templates/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  158. package/templates/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  159. package/templates/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  160. package/templates/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  161. package/templates/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  162. package/templates/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  163. package/templates/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  164. package/templates/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  165. package/templates/.agent/skills/nextjs-react-expert/SKILL.md +286 -0
  166. package/templates/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  167. package/templates/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  168. package/templates/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
  169. package/templates/.agent/skills/parallel-agents/SKILL.md +175 -0
  170. package/templates/.agent/skills/performance-profiling/SKILL.md +143 -0
  171. package/templates/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  172. package/templates/.agent/skills/plan-writing/SKILL.md +152 -0
  173. package/templates/.agent/skills/powershell-windows/SKILL.md +167 -0
  174. package/templates/.agent/skills/python-patterns/SKILL.md +441 -0
  175. package/templates/.agent/skills/red-team-tactics/SKILL.md +199 -0
  176. package/templates/.agent/skills/rust-pro/SKILL.md +176 -0
  177. package/templates/.agent/skills/seo-fundamentals/SKILL.md +129 -0
  178. package/templates/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  179. package/templates/.agent/skills/server-management/SKILL.md +161 -0
  180. package/templates/.agent/skills/systematic-debugging/SKILL.md +109 -0
  181. package/templates/.agent/skills/tailwind-patterns/SKILL.md +269 -0
  182. package/templates/.agent/skills/tdd-workflow/SKILL.md +149 -0
  183. package/templates/.agent/skills/testing-patterns/SKILL.md +156 -240
  184. package/templates/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
  185. package/templates/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
  186. package/templates/.agent/skills/vulnerability-scanner/checklists.md +121 -0
  187. package/templates/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  188. package/templates/.agent/skills/web-design-guidelines/SKILL.md +57 -0
  189. package/templates/.agent/skills/webapp-testing/SKILL.md +187 -0
  190. package/templates/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  191. package/templates/.agent/workflows/brainstorm.md +113 -0
  192. package/templates/.agent/workflows/create.md +40 -112
  193. package/templates/.agent/workflows/debug.md +82 -117
  194. package/templates/.agent/workflows/deploy.md +142 -129
  195. package/templates/.agent/workflows/enhance.md +63 -0
  196. package/templates/.agent/workflows/orchestrate.md +237 -0
  197. package/templates/.agent/workflows/plan.md +74 -138
  198. package/templates/.agent/workflows/preview.md +81 -0
  199. package/templates/.agent/workflows/status.md +86 -0
  200. package/templates/.agent/workflows/test.md +109 -130
  201. package/templates/.agent/workflows/ui-ux-pro-max.md +296 -0
  202. package/templates/.agent/scripts/checklist.js +0 -260
  203. package/templates/.agent/scripts/security_scan.js +0 -251
  204. package/templates/.agent/skills/docker-expert/SKILL.md +0 -286
  205. package/templates/.agent/skills/react-best-practices/SKILL.md +0 -246
  206. package/templates/.agent/workflows/security.md +0 -181
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: monorepo-turborepo
3
+ description: Turborepo monorepo template principles. pnpm workspaces, shared packages.
4
+ ---
5
+
6
+ # Turborepo Monorepo Template
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Build System | Turborepo |
13
+ | Package Manager | pnpm |
14
+ | Apps | Next.js, Express |
15
+ | Packages | Shared UI, Config, Types |
16
+ | Language | TypeScript |
17
+
18
+ ---
19
+
20
+ ## Directory Structure
21
+
22
+ ```
23
+ project-name/
24
+ ├── apps/
25
+ │ ├── web/ # Next.js app
26
+ │ ├── api/ # Express API
27
+ │ └── docs/ # Documentation
28
+ ├── packages/
29
+ │ ├── ui/ # Shared components
30
+ │ ├── config/ # ESLint, TS, Tailwind
31
+ │ ├── types/ # Shared types
32
+ │ └── utils/ # Shared utilities
33
+ ├── turbo.json
34
+ ├── pnpm-workspace.yaml
35
+ └── package.json
36
+ ```
37
+
38
+ ---
39
+
40
+ ## Key Concepts
41
+
42
+ | Concept | Description |
43
+ |---------|-------------|
44
+ | Workspaces | pnpm-workspace.yaml |
45
+ | Pipeline | turbo.json task graph |
46
+ | Caching | Remote/local task caching |
47
+ | Dependencies | `workspace:*` protocol |
48
+
49
+ ---
50
+
51
+ ## Turbo Pipeline
52
+
53
+ | Task | Depends On |
54
+ |------|------------|
55
+ | build | ^build (dependencies first) |
56
+ | dev | cache: false, persistent |
57
+ | lint | ^build |
58
+ | test | ^build |
59
+
60
+ ---
61
+
62
+ ## Setup Steps
63
+
64
+ 1. Create root directory
65
+ 2. `pnpm init`
66
+ 3. Create pnpm-workspace.yaml
67
+ 4. Create turbo.json
68
+ 5. Add apps and packages
69
+ 6. `pnpm install`
70
+ 7. `pnpm dev`
71
+
72
+ ---
73
+
74
+ ## Common Commands
75
+
76
+ | Command | Description |
77
+ |---------|-------------|
78
+ | `pnpm dev` | Run all apps |
79
+ | `pnpm build` | Build all |
80
+ | `pnpm --filter @name/web dev` | Run specific app |
81
+ | `pnpm --filter @name/web add axios` | Add dep to app |
82
+
83
+ ---
84
+
85
+ ## Best Practices
86
+
87
+ - Shared configs in packages/config
88
+ - Shared types in packages/types
89
+ - Internal packages with `workspace:*`
90
+ - Use Turbo remote caching for CI
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: nextjs-fullstack
3
+ description: Next.js full-stack template principles. App Router, Prisma, Tailwind v4.
4
+ ---
5
+
6
+ # Next.js Full-Stack Template (2026 Edition)
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology | Version / Notes |
11
+ |-----------|------------|-----------------|
12
+ | Framework | Next.js | v16+ (App Router, Turbopack) |
13
+ | Language | TypeScript | v5+ (Strict Mode) |
14
+ | Database | PostgreSQL | Prisma ORM (Serverless friendly) |
15
+ | Styling | Tailwind CSS | v4.0 (Zero-config, CSS-first) |
16
+ | Auth | Clerk / Better Auth | Middleware Protected Routes |
17
+ | UI Logic | React 19 | Server Actions, useActionState |
18
+ | Validation | Zod | Schema validation (API & Forms) |
19
+
20
+ ---
21
+
22
+ ## Directory Structure
23
+
24
+ ```
25
+ project-name/
26
+ ├── prisma/
27
+ │ └── schema.prisma # Database schema
28
+ ├── src/
29
+ │ ├── app/
30
+ │ │ ├── (auth)/ # Route groups for Login/Register
31
+ │ │ ├── (dashboard)/ # Protected routes
32
+ │ │ ├── api/ # Route Handlers (only for Webhooks/External integration)
33
+ │ │ ├── layout.tsx # Root Layout (Metadata, Providers)
34
+ │ │ ├── page.tsx # Landing Page
35
+ │ │ └── globals.css # Tailwind v4 config (@theme) lives here
36
+ │ ├── components/
37
+ │ │ ├── ui/ # Reusable UI (Button, Input)
38
+ │ │ └── forms/ # Client forms using useActionState
39
+ │ ├── lib/
40
+ │ │ ├── db.ts # Prisma singleton client
41
+ │ │ ├── utils.ts # Helper functions
42
+ │ │ └── dal.ts # Data Access Layer (Server-only)
43
+ │ ├── actions/ # Server Actions (Mutations)
44
+ │ └── types/ # Global TS Types
45
+ ├── public/
46
+ ├── next.config.ts # TypeScript Config
47
+ └── package.json
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Key Concepts (Updated)
53
+
54
+ | Concept | Description |
55
+ |---------|-------------|
56
+ | Server Components | Render on server (default). Direct DB access (Prisma) without APIs. |
57
+ | Server Actions | Handle Form mutations. Replaces traditional API Routes. Use in action={}. |
58
+ | React 19 Hooks | Form state management: useActionState, useFormStatus, useOptimistic. |
59
+ | Data Access Layer | Data security. Separation of DB logic (DTOs) for safe reuse. |
60
+ | Tailwind v4 | Styling engine. No tailwind.config.js. Config directly in CSS. |
61
+
62
+ ---
63
+
64
+ ## Environment Variables
65
+
66
+ | Variable | Purpose |
67
+ |----------|---------|
68
+ | DATABASE_URL | PostgreSQL connection string (Prisma) |
69
+ | NEXT_PUBLIC_APP_URL | Public application URL |
70
+ | NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Auth (if using Clerk) |
71
+ | CLERK_SECRET_KEY | Auth Secret (Server only) |
72
+
73
+ ---
74
+
75
+ ## Setup Steps
76
+
77
+ 1. Initialize Project:
78
+ ```bash
79
+ npx create-next-app@latest my-app --typescript --tailwind --eslint
80
+ # Select Yes for App Router
81
+ # Select No for src directory (optional, this template uses src)
82
+ ```
83
+
84
+ 2. Install DB & Validation:
85
+ ```bash
86
+ npm install prisma @prisma/client zod
87
+ npm install -D ts-node # For running seed scripts
88
+ ```
89
+
90
+ 3. Configure Tailwind v4 (If missing):
91
+ Ensure `src/app/globals.css` uses the new import syntax instead of a config file:
92
+ ```css
93
+ @import "tailwindcss";
94
+
95
+ @theme {
96
+ --color-primary: oklch(0.5 0.2 240);
97
+ --font-sans: "Inter", sans-serif;
98
+ }
99
+ ```
100
+
101
+ 4. Initialize Database:
102
+ ```bash
103
+ npx prisma init
104
+ # Update schema.prisma
105
+ npm run db:push
106
+ ```
107
+
108
+ 5. Run Developer Server:
109
+ ```bash
110
+ npm run dev --turbo
111
+ # --turbo to enable faster Turbopack
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Best Practices (2026 Standards)
117
+
118
+ - **Fetch Data**: Call Prisma directly in Server Components (async/await). Do not use useEffect for initial data fetching.
119
+ - **Mutations**: Use Server Actions combined with React 19's `useActionState` to handle loading and error states instead of manual useState.
120
+ - **Type Safety**: Share Zod schemas between Server Actions (input validation) and Client Forms.
121
+ - **Security**: Always validate input data with Zod before passing it to Prisma.
122
+ - **Styling**: Use native CSS variables in Tailwind v4 for easier dynamic theming.
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: nextjs-saas
3
+ description: Next.js SaaS template principles (2026 Standards). React 19, Server Actions, Auth.js v6.
4
+ ---
5
+
6
+ # Next.js SaaS Template (Updated 2026)
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology | Version / Notes |
11
+ |-----------|------------|-----------------|
12
+ | Framework | Next.js | v16+ (App Router, React Compiler) |
13
+ | Runtime | Node.js | v24 (Krypton LTS) |
14
+ | Auth | Auth.js | v6 (formerly NextAuth) |
15
+ | Payments | Stripe API | Latest |
16
+ | Database | PostgreSQL | Prisma v6 (Serverless Driver) |
17
+ | Email | Resend | React Email |
18
+ | UI | Tailwind CSS | v4 (Oxide Engine, no config file) |
19
+
20
+ ---
21
+
22
+ ## Directory Structure
23
+
24
+ ```
25
+ project-name/
26
+ ├── prisma/
27
+ │ └── schema.prisma # Database Schema
28
+ ├── src/
29
+ │ ├── actions/ # NEW: Server Actions (Replaces API Routes for data mutation)
30
+ │ │ ├── auth-actions.ts
31
+ │ │ ├── billing-actions.ts
32
+ │ │ └── user-actions.ts
33
+ │ ├── app/
34
+ │ │ ├── (auth)/ # Route Group: Login, register
35
+ │ │ ├── (dashboard)/ # Route Group: Protected routes (App Layout)
36
+ │ │ ├── (marketing)/ # Route Group: Landing, pricing (Marketing Layout)
37
+ │ │ └── api/ # Only used for Webhooks or Edge cases
38
+ │ │ └── webhooks/stripe/
39
+ │ ├── components/
40
+ │ │ ├── emails/ # React Email templates
41
+ │ │ ├── forms/ # Client components using useActionState (React 19)
42
+ │ │ └── ui/ # Shadcn UI
43
+ │ ├── lib/
44
+ │ │ ├── auth.ts # Auth.js v6 config
45
+ │ │ ├── db.ts # Prisma Singleton
46
+ │ │ └── stripe.ts # Stripe Singleton
47
+ │ └── styles/
48
+ │ └── globals.css # Tailwind v4 imports (CSS only)
49
+ └── package.json
50
+ ```
51
+
52
+ ---
53
+
54
+ ## SaaS Features
55
+
56
+ | Feature | Implementation |
57
+ |---------|---------------|
58
+ | Auth | Auth.js v6 + Passkeys + OAuth |
59
+ | Data Mutation | Server Actions (No API routes) |
60
+ | Subscriptions | Stripe Checkout & Customer Portal |
61
+ | Webhooks | Asynchronous Stripe event handling |
62
+ | Email | Transactional via Resend |
63
+ | Validation | Zod (Server-side validation) |
64
+
65
+ ---
66
+
67
+ ## Database Schema
68
+
69
+ | Model | Fields (Key fields) |
70
+ |-------|---------------------|
71
+ | User | id, email, stripeCustomerId, subscriptionId, plan |
72
+ | Account | OAuth provider data (Google, GitHub...) |
73
+ | Session | User sessions (Database strategy) |
74
+
75
+ ---
76
+
77
+ ## Environment Variables
78
+
79
+ | Variable | Purpose |
80
+ |----------|---------|
81
+ | DATABASE_URL | Prisma connection string (Postgres) |
82
+ | AUTH_SECRET | Replaces NEXTAUTH_SECRET (Auth.js v6) |
83
+ | STRIPE_SECRET_KEY | Payments (Server-side) |
84
+ | STRIPE_WEBHOOK_SECRET | Webhook verification |
85
+ | RESEND_API_KEY | Email sending |
86
+ | NEXT_PUBLIC_APP_URL | Application Canonical URL |
87
+
88
+ ---
89
+
90
+ ## Setup Steps
91
+
92
+ 1. Initialize project (Node 24):
93
+ ```bash
94
+ npx create-next-app@latest {{name}} --typescript --eslint
95
+ ```
96
+
97
+ 2. Install core libraries:
98
+ ```bash
99
+ npm install next-auth@beta stripe resend @prisma/client
100
+ ```
101
+
102
+ 3. Install Tailwind v4 (Add to globals.css):
103
+ ```css
104
+ @import "tailwindcss";
105
+ ```
106
+
107
+ 4. Configure environment (.env.local)
108
+
109
+ 5. Sync Database:
110
+ ```bash
111
+ npx prisma db push
112
+ ```
113
+
114
+ 6. Run local Webhook:
115
+ ```bash
116
+ npm run stripe:listen
117
+ ```
118
+
119
+ 7. Run project:
120
+ ```bash
121
+ npm run dev
122
+ ```
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: nextjs-static
3
+ description: Modern template for Next.js 16, React 19 & Tailwind v4. Optimized for Landing pages and Portfolios.
4
+ ---
5
+
6
+ # Next.js Static Site Template (Modern Edition)
7
+
8
+ ## Tech Stack
9
+
10
+ | Component | Technology | Notes |
11
+ |-----------|------------|-------|
12
+ | Framework | Next.js 16+ | App Router, Turbopack, Static Exports |
13
+ | Core | React 19 | Server Components, New Hooks, Compiler |
14
+ | Language | TypeScript | Strict Mode |
15
+ | Styling | Tailwind CSS v4 | CSS-first configuration (No js config), Oxide Engine |
16
+ | Animations | Framer Motion | Layout animations & gestures |
17
+ | Icons | Lucide React | Lightweight SVG icons |
18
+ | SEO | Metadata API | Native Next.js API (Replaces next-seo) |
19
+
20
+ ---
21
+
22
+ ## Directory Structure
23
+
24
+ Streamlined structure thanks to Tailwind v4 (theme configuration lives inside CSS).
25
+
26
+ ```
27
+ project-name/
28
+ ├── src/
29
+ │ ├── app/
30
+ │ │ ├── layout.tsx # Contains root SEO Metadata
31
+ │ │ ├── page.tsx # Landing Page
32
+ │ │ ├── globals.css # Import Tailwind v4 & @theme config
33
+ │ │ ├── not-found.tsx # Custom 404 page
34
+ │ │ └── (routes)/ # Route groups (about, contact...)
35
+ │ ├── components/
36
+ │ │ ├── layout/ # Header, Footer
37
+ │ │ ├── sections/ # Hero, Features, Pricing, CTA
38
+ │ │ └── ui/ # Atomic components (Button, Card)
39
+ │ └── lib/
40
+ │ └── utils.ts # Helper functions (cn, formatters)
41
+ ├── content/ # Markdown/MDX content
42
+ ├── public/ # Static assets (images, fonts)
43
+ ├── next.config.ts # Next.js Config (TypeScript)
44
+ └── package.json
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Static Export Config
50
+
51
+ Using `next.config.ts` instead of `.js` for better type safety.
52
+
53
+ ```typescript
54
+ // next.config.ts
55
+ import type { NextConfig } from "next";
56
+
57
+ const nextConfig: NextConfig = {
58
+ output: 'export', // Required for Static Hosting (S3, GitHub Pages)
59
+ images: {
60
+ unoptimized: true // Required if not using Node.js server image optimization
61
+ },
62
+ trailingSlash: true, // Recommended for SEO and fixing 404s on some hosts
63
+ reactStrictMode: true,
64
+ };
65
+
66
+ export default nextConfig;
67
+ ```
68
+
69
+ ---
70
+
71
+ ## SEO Implementation (Metadata API)
72
+
73
+ Deprecated next-seo. Configure directly in layout.tsx or page.tsx.
74
+
75
+ ```typescript
76
+ // src/app/layout.tsx
77
+ import type { Metadata } from 'next';
78
+
79
+ export const metadata: Metadata = {
80
+ title: {
81
+ template: '%s | Product Name',
82
+ default: 'Home - Product Name',
83
+ },
84
+ description: 'SEO optimized description for the landing page.',
85
+ openGraph: {
86
+ type: 'website',
87
+ locale: 'en_US',
88
+ url: 'https://mysite.com',
89
+ siteName: 'My Brand',
90
+ },
91
+ };
92
+ ```
93
+
94
+ ---
95
+
96
+ ## Landing Page Sections
97
+
98
+ | Section | Purpose | Suggested Component |
99
+ |---------|---------|---------------------|
100
+ | Hero | First impression, H1 & Main CTA | `<HeroSection />` |
101
+ | Features | Product benefits (Grid/Bento layout) | `<FeaturesGrid />` |
102
+ | Social Proof | Partner logos, User numbers | `<LogoCloud />` |
103
+ | Testimonials | Customer reviews | `<TestimonialCarousel />` |
104
+ | Pricing | Service plans | `<PricingCards />` |
105
+ | FAQ | Questions & Answers (Good for SEO) | `<Accordion />` |
106
+ | CTA | Final conversion | `<CallToAction />` |
107
+
108
+ ---
109
+
110
+ ## Animation Patterns (Framer Motion)
111
+
112
+ | Pattern | Usage | Implementation |
113
+ |---------|-------|----------------|
114
+ | Fade Up | Headlines, paragraphs | `initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }}` |
115
+ | Stagger | Lists of Features/Cards | Use variants with `staggerChildren` |
116
+ | Parallax | Background images or floating elements | `useScroll` & `useTransform` |
117
+ | Micro-interactions | Hover buttons, click effects | `whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }}` |
118
+
119
+ ---
120
+
121
+ ## Setup Steps
122
+
123
+ 1. Initialize Project:
124
+ ```bash
125
+ npx create-next-app@latest my-site --typescript --tailwind --eslint
126
+ # Select 'Yes' for App Router
127
+ # Select 'No' for 'Would you like to customize the default import alias?'
128
+ ```
129
+
130
+ 2. Install Auxiliary Libraries:
131
+ ```bash
132
+ npm install framer-motion lucide-react clsx tailwind-merge
133
+ # clsx and tailwind-merge help handle dynamic classes better
134
+ ```
135
+
136
+ 3. Configure Tailwind v4 (in `src/app/globals.css`):
137
+ ```css
138
+ @import "tailwindcss";
139
+
140
+ @theme {
141
+ --color-primary: #3b82f6;
142
+ --font-sans: 'Inter', sans-serif;
143
+ }
144
+ ```
145
+
146
+ 4. Development:
147
+ ```bash
148
+ npm run dev --turbopack
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Deployment
154
+
155
+ | Platform | Method | Important Notes |
156
+ |----------|--------|-----------------|
157
+ | Vercel | Git Push | Auto-detects Next.js. Best for performance. |
158
+ | GitHub Pages | GitHub Actions | Need to set `basePath` in `next.config.ts` if not using a custom domain. |
159
+ | AWS S3 / CloudFront | Upload out folder | Ensure Error Document is configured to `404.html`. |
160
+ | Netlify | Git Push | Set build command to `npm run build`. |
161
+
162
+ ---
163
+
164
+ ## Best Practices (Modern)
165
+
166
+ - **React Server Components (RSC)**: Default all components to Server Components. Only add `'use client'` when you need state (`useState`) or event listeners (`onClick`).
167
+ - **Image Optimization**: Use the `<Image />` component but remember `unoptimized: true` for static export or use an external image CDN (Cloudinary/Imgix).
168
+ - **Font Optimization**: Use `next/font` (Google Fonts) to automatically host fonts and prevent layout shift.
169
+ - **Responsive**: Mobile-first design using Tailwind prefixes like `sm:`, `md:`, `lg:`.
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: nuxt-app
3
+ description: Nuxt 4 full-stack template. Vue 3 (Vapor), Pinia, Tailwind v4, Prisma.
4
+ ---
5
+
6
+ # Nuxt 4 Full-Stack Template (2026 Edition)
7
+
8
+ Mẫu template Full-Stack hiện đại cho Nuxt 4, tối ưu hóa hiệu suất với Vue Vapor Mode và Tailwind v4.
9
+
10
+ ## Tech Stack
11
+
12
+ | Component | Technology | Version / Notes |
13
+ |-----------|------------|-----------------|
14
+ | Framework | Nuxt | v4.0+ (App Directory structure) |
15
+ | UI Engine | Vue | v3.6+ (Vapor Mode enabled) |
16
+ | Language | TypeScript | v5+ (Strict Mode) |
17
+ | State | Pinia | v3+ (Store syntax) |
18
+ | Database | PostgreSQL | Prisma ORM |
19
+ | Styling | Tailwind CSS | v4.0 (Vite Plugin, Zero-config) |
20
+ | UI Lib | Nuxt UI | v3 (Tailwind v4 native) |
21
+ | Validation | Zod | Schema validation |
22
+
23
+ ---
24
+
25
+ ## Directory Structure (Nuxt 4 Standard)
26
+
27
+ Sử dụng cấu trúc `app/` để giữ thư mục gốc gọn gàng.
28
+
29
+ ```
30
+ project-name/
31
+ ├── app/ # Application Source
32
+ │ ├── assets/
33
+ │ │ └── css/
34
+ │ │ └── main.css # Tailwind v4 imports
35
+ │ ├── components/ # Auto-imported components
36
+ │ ├── composables/ # Auto-imported logic
37
+ │ ├── layouts/
38
+ │ ├── pages/ # File-based routing
39
+ │ ├── app.vue # Root component
40
+ │ └── router.options.ts
41
+ ├── server/ # Nitro Server Engine
42
+ │ ├── api/ # API Routes (e.g. /api/users)
43
+ │ ├── routes/ # Server Routes
44
+ │ └── utils/ # Server-only helpers (Prisma)
45
+ ├── prisma/
46
+ │ └── schema.prisma
47
+ ├── public/
48
+ ├── nuxt.config.ts # Main Config
49
+ └── package.json
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Key Concepts (2026)
55
+
56
+ | Concept | Description | Future Update |
57
+ |---------|-------------|---------------|
58
+ | **App Directory** | `app/` | Tách biệt mã nguồn ứng dụng và file cấu hình root. |
59
+ | **Vapor Mode** | Opt-in performance | Render không cần Virtual DOM (như SolidJS). Bật trong `nuxt.config`. |
60
+ | **Server Functions** | RPC-style calls | Gọi hàm server trực tiếp từ client (thay thế dần API routes thủ công). |
61
+ | **Tailwind v4** | CSS-first | Cấu hình theme trực tiếp trong CSS, không cần `tailwind.config.js`. |
62
+ | **Nuxt Islands** | Server Components | Render component cô lập trên server (`<NuxtIsland name="..." />`). |
63
+
64
+ ---
65
+
66
+ ## Environment Variables
67
+
68
+ | Variable | Purpose |
69
+ |----------|---------|
70
+ | DATABASE_URL | Prisma connection string (PostgreSQL) |
71
+ | NUXT_PUBLIC_APP_URL | Canonical URL |
72
+ | NUXT_SESSION_PASSWORD | Session encryption key |
73
+
74
+ ---
75
+
76
+ ## Setup Steps
77
+
78
+ 1. Initialize Project:
79
+ ```bash
80
+ npx nuxi@latest init my-app
81
+ # Select "Nuxt 4 structure" if prompted
82
+ ```
83
+
84
+ 2. Install Core Deps:
85
+ ```bash
86
+ npm install @pinia/nuxt @prisma/client zod
87
+ npm install -D prisma
88
+ ```
89
+
90
+ 3. Setup Tailwind v4:
91
+ Install the Vite plugin (new standard):
92
+ ```bash
93
+ npm install tailwindcss @tailwindcss/vite
94
+ ```
95
+
96
+ Add to `nuxt.config.ts`:
97
+ ```ts
98
+ import tailwindcss from '@tailwindcss/vite'
99
+ export default defineNuxtConfig({
100
+ vite: {
101
+ plugins: [tailwindcss()]
102
+ },
103
+ css: ['~/assets/css/main.css']
104
+ })
105
+ ```
106
+
107
+ 4. Configure CSS:
108
+ In `app/assets/css/main.css`:
109
+ ```css
110
+ @import "tailwindcss";
111
+ @theme {
112
+ --color-primary: oklch(0.6 0.15 150);
113
+ }
114
+ ```
115
+
116
+ 5. Run Development:
117
+ ```bash
118
+ npm run dev
119
+ # Runs with Turbo/Vite
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Best Practices
125
+
126
+ - **Vapor Mode**: Kích hoạt cho các component nặng về render:
127
+ ```ts
128
+ <script setup lang="ts" vapor>
129
+ // Component này sẽ compile sang chế độ Vapor (No VDOM)
130
+ </script>
131
+ ```
132
+ - **Data Fetching**: Sử dụng `useFetch` với `server: false` cho các tác vụ client-only, hoặc dùng Server Functions để type-safety tốt hơn.
133
+ - **State**: Dùng `defineStore` (Pinia) cho global state, `useState` của Nuxt cho state đơn giản chia sẻ giữa Server/Client.
134
+ - **Type Safety**: Tự động tạo type cho API routes (`$fetch` typed automatically).