@iamnishankhan/opencode-kit-grok 1.0.0

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 (198) hide show
  1. package/bin/cli.js +46 -0
  2. package/kit/.opencode/AGENTS.md +392 -0
  3. package/kit/.opencode/README.md +71 -0
  4. package/kit/.opencode/USAGE.md +405 -0
  5. package/kit/.opencode/agents/backend-specialist.md +278 -0
  6. package/kit/.opencode/agents/code-archaeologist.md +114 -0
  7. package/kit/.opencode/agents/database-architect.md +233 -0
  8. package/kit/.opencode/agents/debugger.md +234 -0
  9. package/kit/.opencode/agents/devops-engineer.md +252 -0
  10. package/kit/.opencode/agents/documentation-writer.md +111 -0
  11. package/kit/.opencode/agents/explorer-agent.md +83 -0
  12. package/kit/.opencode/agents/frontend-specialist.md +606 -0
  13. package/kit/.opencode/agents/game-developer.md +169 -0
  14. package/kit/.opencode/agents/mobile-developer.md +385 -0
  15. package/kit/.opencode/agents/orchestrator.md +213 -0
  16. package/kit/.opencode/agents/penetration-tester.md +197 -0
  17. package/kit/.opencode/agents/performance-optimizer.md +194 -0
  18. package/kit/.opencode/agents/product-manager.md +120 -0
  19. package/kit/.opencode/agents/product-owner.md +103 -0
  20. package/kit/.opencode/agents/project-planner.md +418 -0
  21. package/kit/.opencode/agents/qa-automation-engineer.md +113 -0
  22. package/kit/.opencode/agents/security-auditor.md +179 -0
  23. package/kit/.opencode/agents/seo-specialist.md +119 -0
  24. package/kit/.opencode/agents/test-engineer.md +169 -0
  25. package/kit/.opencode/commands/brainstorm.md +113 -0
  26. package/kit/.opencode/commands/coordinate.md +72 -0
  27. package/kit/.opencode/commands/create.md +63 -0
  28. package/kit/.opencode/commands/debug.md +102 -0
  29. package/kit/.opencode/commands/deploy.md +175 -0
  30. package/kit/.opencode/commands/enhance.md +62 -0
  31. package/kit/.opencode/commands/orchestrate.md +241 -0
  32. package/kit/.opencode/commands/plan.md +89 -0
  33. package/kit/.opencode/commands/preview.md +80 -0
  34. package/kit/.opencode/commands/remember.md +67 -0
  35. package/kit/.opencode/commands/status.md +86 -0
  36. package/kit/.opencode/commands/test.md +143 -0
  37. package/kit/.opencode/commands/verify.md +71 -0
  38. package/kit/.opencode/memory/MEMORY.md +6 -0
  39. package/kit/.opencode/memory/feedback-history.md +9 -0
  40. package/kit/.opencode/memory/project-conventions.md +16 -0
  41. package/kit/.opencode/memory/tech-decisions.md +10 -0
  42. package/kit/.opencode/memory/user-preferences.md +9 -0
  43. package/kit/.opencode/opencode.json +15 -0
  44. package/kit/.opencode/scripts/README.md +95 -0
  45. package/kit/.opencode/scripts/auto_preview.py +149 -0
  46. package/kit/.opencode/scripts/checklist.py +75 -0
  47. package/kit/.opencode/scripts/component_registry.py +238 -0
  48. package/kit/.opencode/scripts/dependency_graph.py +73 -0
  49. package/kit/.opencode/scripts/generate_manifest.py +44 -0
  50. package/kit/.opencode/scripts/session_manager.py +120 -0
  51. package/kit/.opencode/scripts/tests/test_toolkit.py +238 -0
  52. package/kit/.opencode/scripts/validate_kit.py +397 -0
  53. package/kit/.opencode/scripts/validation_runner.py +216 -0
  54. package/kit/.opencode/scripts/verify_all.py +85 -0
  55. package/kit/.opencode/skills/api-patterns/SKILL.md +83 -0
  56. package/kit/.opencode/skills/api-patterns/api-style.md +42 -0
  57. package/kit/.opencode/skills/api-patterns/auth.md +24 -0
  58. package/kit/.opencode/skills/api-patterns/documentation.md +26 -0
  59. package/kit/.opencode/skills/api-patterns/graphql.md +41 -0
  60. package/kit/.opencode/skills/api-patterns/rate-limiting.md +31 -0
  61. package/kit/.opencode/skills/api-patterns/response.md +37 -0
  62. package/kit/.opencode/skills/api-patterns/rest.md +40 -0
  63. package/kit/.opencode/skills/api-patterns/scripts/api_validator.py +211 -0
  64. package/kit/.opencode/skills/api-patterns/security-testing.md +122 -0
  65. package/kit/.opencode/skills/api-patterns/trpc.md +41 -0
  66. package/kit/.opencode/skills/api-patterns/versioning.md +22 -0
  67. package/kit/.opencode/skills/app-builder/SKILL.md +78 -0
  68. package/kit/.opencode/skills/app-builder/agent-coordination.md +71 -0
  69. package/kit/.opencode/skills/app-builder/feature-building.md +53 -0
  70. package/kit/.opencode/skills/app-builder/project-detection.md +45 -0
  71. package/kit/.opencode/skills/app-builder/scaffolding.md +110 -0
  72. package/kit/.opencode/skills/app-builder/tech-stack.md +41 -0
  73. package/kit/.opencode/skills/app-builder/templates/SKILL.md +39 -0
  74. package/kit/.opencode/skills/app-builder/templates/astro-static/TEMPLATE.md +78 -0
  75. package/kit/.opencode/skills/app-builder/templates/chrome-extension/TEMPLATE.md +96 -0
  76. package/kit/.opencode/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  77. package/kit/.opencode/skills/app-builder/templates/electron-desktop/TEMPLATE.md +97 -0
  78. package/kit/.opencode/skills/app-builder/templates/express-api/TEMPLATE.md +89 -0
  79. package/kit/.opencode/skills/app-builder/templates/flutter-app/TEMPLATE.md +93 -0
  80. package/kit/.opencode/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +97 -0
  81. package/kit/.opencode/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +126 -0
  82. package/kit/.opencode/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +125 -0
  83. package/kit/.opencode/skills/app-builder/templates/nextjs-static/TEMPLATE.md +174 -0
  84. package/kit/.opencode/skills/app-builder/templates/nuxt-app/TEMPLATE.md +127 -0
  85. package/kit/.opencode/skills/app-builder/templates/python-fastapi/TEMPLATE.md +94 -0
  86. package/kit/.opencode/skills/app-builder/templates/react-native-app/TEMPLATE.md +121 -0
  87. package/kit/.opencode/skills/architecture/SKILL.md +57 -0
  88. package/kit/.opencode/skills/architecture/context-discovery.md +43 -0
  89. package/kit/.opencode/skills/architecture/examples.md +94 -0
  90. package/kit/.opencode/skills/architecture/pattern-selection.md +68 -0
  91. package/kit/.opencode/skills/architecture/patterns-reference.md +50 -0
  92. package/kit/.opencode/skills/architecture/trade-off-analysis.md +77 -0
  93. package/kit/.opencode/skills/bash-linux/SKILL.md +201 -0
  94. package/kit/.opencode/skills/batch-operations/SKILL.md +105 -0
  95. package/kit/.opencode/skills/behavioral-modes/SKILL.md +253 -0
  96. package/kit/.opencode/skills/brainstorming/SKILL.md +178 -0
  97. package/kit/.opencode/skills/brainstorming/dynamic-questioning.md +350 -0
  98. package/kit/.opencode/skills/clean-code/SKILL.md +201 -0
  99. package/kit/.opencode/skills/code-review-checklist/SKILL.md +111 -0
  100. package/kit/.opencode/skills/code-review-graph/SKILL.md +305 -0
  101. package/kit/.opencode/skills/context-compression/SKILL.md +145 -0
  102. package/kit/.opencode/skills/coordinator-mode/SKILL.md +208 -0
  103. package/kit/.opencode/skills/database-design/SKILL.md +54 -0
  104. package/kit/.opencode/skills/database-design/database-selection.md +43 -0
  105. package/kit/.opencode/skills/database-design/indexing.md +39 -0
  106. package/kit/.opencode/skills/database-design/migrations.md +48 -0
  107. package/kit/.opencode/skills/database-design/optimization.md +36 -0
  108. package/kit/.opencode/skills/database-design/orm-selection.md +30 -0
  109. package/kit/.opencode/skills/database-design/schema-design.md +56 -0
  110. package/kit/.opencode/skills/database-design/scripts/schema_validator.py +172 -0
  111. package/kit/.opencode/skills/deployment-procedures/SKILL.md +243 -0
  112. package/kit/.opencode/skills/design-spec/SKILL.md +185 -0
  113. package/kit/.opencode/skills/design-spec/collection.md +106 -0
  114. package/kit/.opencode/skills/documentation-templates/SKILL.md +196 -0
  115. package/kit/.opencode/skills/frontend-architecture/SKILL.md +245 -0
  116. package/kit/.opencode/skills/frontend-design/SKILL.md +1222 -0
  117. package/kit/.opencode/skills/frontend-design/redesign.md +178 -0
  118. package/kit/.opencode/skills/frontend-design/scripts/accessibility_checker.py +145 -0
  119. package/kit/.opencode/skills/frontend-design/scripts/ux_audit.py +722 -0
  120. package/kit/.opencode/skills/frontend-design/style-brutalist.md +92 -0
  121. package/kit/.opencode/skills/frontend-design/style-minimalist.md +85 -0
  122. package/kit/.opencode/skills/game-development/2d-games/SKILL.md +118 -0
  123. package/kit/.opencode/skills/game-development/3d-games/SKILL.md +134 -0
  124. package/kit/.opencode/skills/game-development/SKILL.md +169 -0
  125. package/kit/.opencode/skills/game-development/game-art/SKILL.md +184 -0
  126. package/kit/.opencode/skills/game-development/game-audio/SKILL.md +189 -0
  127. package/kit/.opencode/skills/game-development/game-design/SKILL.md +128 -0
  128. package/kit/.opencode/skills/game-development/mobile-games/SKILL.md +107 -0
  129. package/kit/.opencode/skills/game-development/multiplayer/SKILL.md +131 -0
  130. package/kit/.opencode/skills/game-development/pc-games/SKILL.md +143 -0
  131. package/kit/.opencode/skills/game-development/vr-ar/SKILL.md +122 -0
  132. package/kit/.opencode/skills/game-development/web-games/SKILL.md +149 -0
  133. package/kit/.opencode/skills/geo-fundamentals/SKILL.md +158 -0
  134. package/kit/.opencode/skills/geo-fundamentals/scripts/geo_checker.py +273 -0
  135. package/kit/.opencode/skills/i18n-localization/SKILL.md +156 -0
  136. package/kit/.opencode/skills/i18n-localization/scripts/i18n_checker.py +223 -0
  137. package/kit/.opencode/skills/intelligent-routing/SKILL.md +337 -0
  138. package/kit/.opencode/skills/lint-and-validate/SKILL.md +47 -0
  139. package/kit/.opencode/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  140. package/kit/.opencode/skills/lint-and-validate/scripts/type_coverage.py +245 -0
  141. package/kit/.opencode/skills/mcp-builder/SKILL.md +205 -0
  142. package/kit/.opencode/skills/memory-system/SKILL.md +181 -0
  143. package/kit/.opencode/skills/mobile-design/SKILL.md +396 -0
  144. package/kit/.opencode/skills/mobile-design/decision-trees.md +516 -0
  145. package/kit/.opencode/skills/mobile-design/mobile-backend.md +491 -0
  146. package/kit/.opencode/skills/mobile-design/mobile-color-system.md +420 -0
  147. package/kit/.opencode/skills/mobile-design/mobile-debugging.md +122 -0
  148. package/kit/.opencode/skills/mobile-design/mobile-design-thinking.md +357 -0
  149. package/kit/.opencode/skills/mobile-design/mobile-navigation.md +458 -0
  150. package/kit/.opencode/skills/mobile-design/mobile-performance.md +767 -0
  151. package/kit/.opencode/skills/mobile-design/mobile-testing.md +356 -0
  152. package/kit/.opencode/skills/mobile-design/mobile-typography.md +433 -0
  153. package/kit/.opencode/skills/mobile-design/platform-android.md +666 -0
  154. package/kit/.opencode/skills/mobile-design/platform-ios.md +561 -0
  155. package/kit/.opencode/skills/mobile-design/scripts/mobile_audit.py +670 -0
  156. package/kit/.opencode/skills/mobile-design/touch-psychology.md +537 -0
  157. package/kit/.opencode/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
  158. package/kit/.opencode/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  159. package/kit/.opencode/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  160. package/kit/.opencode/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  161. package/kit/.opencode/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  162. package/kit/.opencode/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  163. package/kit/.opencode/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  164. package/kit/.opencode/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  165. package/kit/.opencode/skills/nextjs-react-expert/9-cache-components.md +103 -0
  166. package/kit/.opencode/skills/nextjs-react-expert/SKILL.md +293 -0
  167. package/kit/.opencode/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  168. package/kit/.opencode/skills/nextjs-react-expert/scripts/react_performance_checker.py +281 -0
  169. package/kit/.opencode/skills/nodejs-best-practices/SKILL.md +336 -0
  170. package/kit/.opencode/skills/parallel-agents/SKILL.md +192 -0
  171. package/kit/.opencode/skills/performance-profiling/SKILL.md +145 -0
  172. package/kit/.opencode/skills/performance-profiling/scripts/bundle_analyzer.py +120 -0
  173. package/kit/.opencode/skills/performance-profiling/scripts/lighthouse_audit.py +108 -0
  174. package/kit/.opencode/skills/plan-writing/SKILL.md +153 -0
  175. package/kit/.opencode/skills/powershell-windows/SKILL.md +169 -0
  176. package/kit/.opencode/skills/python-patterns/SKILL.md +443 -0
  177. package/kit/.opencode/skills/red-team-tactics/SKILL.md +201 -0
  178. package/kit/.opencode/skills/rust-pro/SKILL.md +177 -0
  179. package/kit/.opencode/skills/seo-fundamentals/SKILL.md +131 -0
  180. package/kit/.opencode/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  181. package/kit/.opencode/skills/server-management/SKILL.md +163 -0
  182. package/kit/.opencode/skills/simplify-code/SKILL.md +131 -0
  183. package/kit/.opencode/skills/skillify/SKILL.md +115 -0
  184. package/kit/.opencode/skills/systematic-debugging/SKILL.md +111 -0
  185. package/kit/.opencode/skills/tailwind-patterns/SKILL.md +271 -0
  186. package/kit/.opencode/skills/tdd-workflow/SKILL.md +151 -0
  187. package/kit/.opencode/skills/testing-patterns/SKILL.md +180 -0
  188. package/kit/.opencode/skills/testing-patterns/scripts/test_runner.py +219 -0
  189. package/kit/.opencode/skills/verify-changes/SKILL.md +127 -0
  190. package/kit/.opencode/skills/vulnerability-scanner/SKILL.md +278 -0
  191. package/kit/.opencode/skills/vulnerability-scanner/checklists.md +124 -0
  192. package/kit/.opencode/skills/vulnerability-scanner/scripts/dependency_analyzer.py +144 -0
  193. package/kit/.opencode/skills/vulnerability-scanner/scripts/security_scan.py +410 -0
  194. package/kit/.opencode/skills/web-design-guidelines/SKILL.md +56 -0
  195. package/kit/.opencode/skills/webapp-testing/SKILL.md +189 -0
  196. package/kit/.opencode/skills/webapp-testing/scripts/playwright_runner.py +123 -0
  197. package/lib/init.js +61 -0
  198. package/package.json +21 -0
@@ -0,0 +1,126 @@
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
+ > Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
9
+
10
+ ## Tech Stack
11
+
12
+ | Component | Technology | Version / Notes |
13
+ |-----------|------------|-----------------|
14
+ | Framework | Next.js | v16+ (App Router, Turbopack) |
15
+ | Runtime | Node.js | v24 (Krypton LTS) |
16
+ | Language | TypeScript | v5+ (Strict Mode) |
17
+ | Database | PostgreSQL | Prisma ORM (Serverless friendly) |
18
+ | Styling | Tailwind CSS | v4.0 (Zero-config, CSS-first) |
19
+ | Auth | Auth.js v5 (`next-auth@beta`) / Clerk | Protected routes via `proxy.ts` |
20
+ | UI Logic | React 19 | Server Actions, useActionState |
21
+ | Validation | Zod | Schema validation (API & Forms) |
22
+
23
+ ---
24
+
25
+ ## Directory Structure
26
+
27
+ ```
28
+ project-name/
29
+ ├── prisma/
30
+ │ └── schema.prisma # Database schema
31
+ ├── src/
32
+ │ ├── app/
33
+ │ │ ├── (auth)/ # Route groups for Login/Register
34
+ │ │ ├── (dashboard)/ # Protected routes
35
+ │ │ ├── api/ # Route Handlers (only for Webhooks/External integration)
36
+ │ │ ├── layout.tsx # Root Layout (Metadata, Providers)
37
+ │ │ ├── page.tsx # Landing Page
38
+ │ │ └── globals.css # Tailwind v4 config (@theme) lives here
39
+ │ ├── components/
40
+ │ │ ├── ui/ # Reusable UI (Button, Input)
41
+ │ │ └── forms/ # Client forms using useActionState
42
+ │ ├── lib/
43
+ │ │ ├── db.ts # Prisma singleton client
44
+ │ │ ├── utils.ts # Helper functions
45
+ │ │ └── dal.ts # Data Access Layer (Server-only)
46
+ │ ├── actions/ # Server Actions (Mutations)
47
+ │ └── types/ # Global TS Types
48
+ ├── public/
49
+ ├── next.config.ts # TypeScript Config
50
+ └── package.json
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Key Concepts (Updated)
56
+
57
+ | Concept | Description |
58
+ |---------|-------------|
59
+ | Server Components | Render on server (default). Direct DB access (Prisma) without APIs. |
60
+ | Server Actions | Handle Form mutations. Replaces traditional API Routes. Use in action={}. |
61
+ | React 19 Hooks | Form state management: useActionState, useFormStatus, useOptimistic. |
62
+ | Data Access Layer | Data security. Separation of DB logic (DTOs) for safe reuse. |
63
+ | Tailwind v4 | Styling engine. No tailwind.config.js. Config directly in CSS. |
64
+
65
+ ---
66
+
67
+ ## Environment Variables
68
+
69
+ | Variable | Purpose |
70
+ |----------|---------|
71
+ | DATABASE_URL | PostgreSQL connection string (Prisma) |
72
+ | NEXT_PUBLIC_APP_URL | Public application URL |
73
+ | AUTH_SECRET | Auth.js v5 session secret (default auth) |
74
+ | NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Auth (if using Clerk instead) |
75
+ | CLERK_SECRET_KEY | Clerk secret (server only, if using Clerk) |
76
+
77
+ ---
78
+
79
+ ## Setup Steps
80
+
81
+ 1. Initialize Project:
82
+ ```bash
83
+ npx create-next-app@latest my-app --typescript --tailwind --eslint
84
+ # Select Yes for App Router
85
+ # Select No for src directory (optional, this template uses src)
86
+ ```
87
+
88
+ 2. Install DB & Validation:
89
+ ```bash
90
+ npm install prisma @prisma/client zod
91
+ npm install -D ts-node # For running seed scripts
92
+ ```
93
+
94
+ 3. Configure Tailwind v4 (If missing):
95
+ Ensure `src/app/globals.css` uses the new import syntax instead of a config file:
96
+ ```css
97
+ @import "tailwindcss";
98
+
99
+ @theme {
100
+ --color-primary: oklch(0.5 0.2 240);
101
+ --font-sans: "Inter", sans-serif;
102
+ }
103
+ ```
104
+
105
+ 4. Initialize Database:
106
+ ```bash
107
+ npx prisma init
108
+ # Update schema.prisma
109
+ npm run db:push
110
+ ```
111
+
112
+ 5. Run Developer Server:
113
+ ```bash
114
+ npm run dev --turbo
115
+ # --turbo to enable faster Turbopack
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Best Practices (2026 Standards)
121
+
122
+ - **Fetch Data**: Call Prisma directly in Server Components (async/await). Do not use useEffect for initial data fetching.
123
+ - **Mutations**: Use Server Actions combined with React 19's `useActionState` to handle loading and error states instead of manual useState.
124
+ - **Type Safety**: Share Zod schemas between Server Actions (input validation) and Client Forms.
125
+ - **Security**: Always validate input data with Zod before passing it to Prisma.
126
+ - **Styling**: Use native CSS variables in Tailwind v4 for easier dynamic theming.
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: nextjs-saas
3
+ description: Next.js SaaS template principles (2026 Standards). React 19, Server Actions, Auth.js v5.
4
+ ---
5
+
6
+ # Next.js SaaS Template (Updated 2026)
7
+
8
+ > Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
9
+
10
+ ## Tech Stack
11
+
12
+ | Component | Technology | Version / Notes |
13
+ |-----------|------------|-----------------|
14
+ | Framework | Next.js | v16+ (App Router, React Compiler) |
15
+ | Runtime | Node.js | v24 (Krypton LTS) |
16
+ | Auth | Auth.js | v5 (`next-auth@beta`, formerly NextAuth). Alternative: Clerk |
17
+ | Payments | Stripe API | Latest |
18
+ | Database | PostgreSQL | Prisma v7+ (Serverless Driver) |
19
+ | Email | Resend | React Email |
20
+ | UI | Tailwind CSS | v4 (Oxide Engine, no config file) |
21
+
22
+ ---
23
+
24
+ ## Directory Structure
25
+
26
+ ```
27
+ project-name/
28
+ ├── prisma/
29
+ │ └── schema.prisma # Database Schema
30
+ ├── src/
31
+ │ ├── actions/ # NEW: Server Actions (Replaces API Routes for data mutation)
32
+ │ │ ├── auth-actions.ts
33
+ │ │ ├── billing-actions.ts
34
+ │ │ └── user-actions.ts
35
+ │ ├── app/
36
+ │ │ ├── (auth)/ # Route Group: Login, register
37
+ │ │ ├── (dashboard)/ # Route Group: Protected routes (App Layout)
38
+ │ │ ├── (marketing)/ # Route Group: Landing, pricing (Marketing Layout)
39
+ │ │ └── api/ # Only used for Webhooks or Edge cases
40
+ │ │ └── webhooks/stripe/
41
+ │ ├── components/
42
+ │ │ ├── emails/ # React Email templates
43
+ │ │ ├── forms/ # Client components using useActionState (React 19)
44
+ │ │ └── ui/ # Shadcn UI
45
+ │ ├── lib/
46
+ │ │ ├── auth.ts # Auth.js v5 config
47
+ │ │ ├── db.ts # Prisma Singleton
48
+ │ │ ├── data/ # Data Access Layer (server-only reads)
49
+ │ │ └── stripe.ts # Stripe Singleton
50
+ │ └── styles/
51
+ │ └── globals.css # Tailwind v4 imports (CSS only)
52
+ └── package.json
53
+ ```
54
+
55
+ ---
56
+
57
+ ## SaaS Features
58
+
59
+ | Feature | Implementation |
60
+ |---------|---------------|
61
+ | Auth | Auth.js v5 + Passkeys + OAuth |
62
+ | Data Mutation | Server Actions (No API routes) |
63
+ | Subscriptions | Stripe Checkout & Customer Portal |
64
+ | Webhooks | Asynchronous Stripe event handling |
65
+ | Email | Transactional via Resend |
66
+ | Validation | Zod (Server-side validation) |
67
+
68
+ ---
69
+
70
+ ## Database Schema
71
+
72
+ | Model | Fields (Key fields) |
73
+ |-------|---------------------|
74
+ | User | id, email, stripeCustomerId, subscriptionId, plan |
75
+ | Account | OAuth provider data (Google, GitHub...) |
76
+ | Session | User sessions (Database strategy) |
77
+
78
+ ---
79
+
80
+ ## Environment Variables
81
+
82
+ | Variable | Purpose |
83
+ |----------|---------|
84
+ | DATABASE_URL | Prisma connection string (Postgres) |
85
+ | AUTH_SECRET | Replaces NEXTAUTH_SECRET (Auth.js v5) |
86
+ | STRIPE_SECRET_KEY | Payments (Server-side) |
87
+ | STRIPE_WEBHOOK_SECRET | Webhook verification |
88
+ | RESEND_API_KEY | Email sending |
89
+ | NEXT_PUBLIC_APP_URL | Application Canonical URL |
90
+
91
+ ---
92
+
93
+ ## Setup Steps
94
+
95
+ 1. Initialize project (Node 24):
96
+ ```bash
97
+ npx create-next-app@latest {{name}} --typescript --eslint
98
+ ```
99
+
100
+ 2. Install core libraries:
101
+ ```bash
102
+ npm install next-auth@beta stripe resend @prisma/client
103
+ ```
104
+
105
+ 3. Install Tailwind v4 (Add to globals.css):
106
+ ```css
107
+ @import "tailwindcss";
108
+ ```
109
+
110
+ 4. Configure environment (.env.local)
111
+
112
+ 5. Sync Database:
113
+ ```bash
114
+ npx prisma db push
115
+ ```
116
+
117
+ 6. Run local Webhook:
118
+ ```bash
119
+ npm run stripe:listen
120
+ ```
121
+
122
+ 7. Run project:
123
+ ```bash
124
+ npm run dev
125
+ ```
@@ -0,0 +1,174 @@
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
+ > Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
9
+
10
+ ## Tech Stack
11
+
12
+ | Component | Technology | Notes |
13
+ |-----------|------------|-------|
14
+ | Framework | Next.js 16+ | App Router, Turbopack, Static Exports |
15
+ | Core | React 19 | Server Components, New Hooks, Compiler |
16
+ | Language | TypeScript | Strict Mode |
17
+ | Styling | Tailwind CSS v4 | CSS-first configuration (No js config), Oxide Engine |
18
+ | Animations | Framer Motion | Layout animations & gestures |
19
+ | Icons | Lucide React | Lightweight SVG icons |
20
+ | SEO | Metadata API | Native Next.js API (Replaces next-seo) |
21
+
22
+ ---
23
+
24
+ ## Directory Structure
25
+
26
+ Streamlined structure thanks to Tailwind v4 (theme configuration lives inside CSS).
27
+
28
+ ```
29
+ project-name/
30
+ ├── src/
31
+ │ ├── app/
32
+ │ │ ├── layout.tsx # Contains root SEO Metadata
33
+ │ │ ├── page.tsx # Landing Page
34
+ │ │ ├── globals.css # Import Tailwind v4 & @theme config
35
+ │ │ ├── not-found.tsx # Custom 404 page
36
+ │ │ ├── sitemap.ts # Generated sitemap (Metadata convention)
37
+ │ │ ├── robots.ts # Generated robots.txt (Metadata convention)
38
+ │ │ ├── opengraph-image.tsx # Dynamic OG image
39
+ │ │ └── (routes)/ # Route groups (about, contact...)
40
+ │ ├── components/
41
+ │ │ ├── layout/ # Header, Footer
42
+ │ │ ├── sections/ # Hero, Features, Pricing, CTA
43
+ │ │ └── ui/ # Atomic components (Button, Card)
44
+ │ └── lib/
45
+ │ └── utils.ts # Helper functions (cn, formatters)
46
+ ├── content/ # Markdown/MDX content
47
+ ├── public/ # Static assets (images, fonts)
48
+ ├── next.config.ts # Next.js Config (TypeScript)
49
+ └── package.json
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Static Export Config
55
+
56
+ Using `next.config.ts` instead of `.js` for better type safety.
57
+
58
+ ```typescript
59
+ // next.config.ts
60
+ import type { NextConfig } from "next";
61
+
62
+ const nextConfig: NextConfig = {
63
+ output: 'export', // Required for Static Hosting (S3, GitHub Pages)
64
+ images: {
65
+ unoptimized: true // Required if not using Node.js server image optimization
66
+ },
67
+ trailingSlash: true, // Recommended for SEO and fixing 404s on some hosts
68
+ reactStrictMode: true,
69
+ };
70
+
71
+ export default nextConfig;
72
+ ```
73
+
74
+ ---
75
+
76
+ ## SEO Implementation (Metadata API)
77
+
78
+ Deprecated next-seo. Configure directly in layout.tsx or page.tsx.
79
+
80
+ ```typescript
81
+ // src/app/layout.tsx
82
+ import type { Metadata } from 'next';
83
+
84
+ export const metadata: Metadata = {
85
+ title: {
86
+ template: '%s | Product Name',
87
+ default: 'Home - Product Name',
88
+ },
89
+ description: 'SEO optimized description for the landing page.',
90
+ openGraph: {
91
+ type: 'website',
92
+ locale: 'en_US',
93
+ url: 'https://mysite.com',
94
+ siteName: 'My Brand',
95
+ },
96
+ };
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Landing Page Sections
102
+
103
+ | Section | Purpose | Suggested Component |
104
+ |---------|---------|---------------------|
105
+ | Hero | First impression, H1 & Main CTA | `<HeroSection />` |
106
+ | Features | Product benefits (Grid/Bento layout) | `<FeaturesGrid />` |
107
+ | Social Proof | Partner logos, User numbers | `<LogoCloud />` |
108
+ | Testimonials | Customer reviews | `<TestimonialCarousel />` |
109
+ | Pricing | Service plans | `<PricingCards />` |
110
+ | FAQ | Questions & Answers (Good for SEO) | `<Accordion />` |
111
+ | CTA | Final conversion | `<CallToAction />` |
112
+
113
+ ---
114
+
115
+ ## Animation Patterns (Framer Motion)
116
+
117
+ | Pattern | Usage | Implementation |
118
+ |---------|-------|----------------|
119
+ | Fade Up | Headlines, paragraphs | `initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }}` |
120
+ | Stagger | Lists of Features/Cards | Use variants with `staggerChildren` |
121
+ | Parallax | Background images or floating elements | `useScroll` & `useTransform` |
122
+ | Micro-interactions | Hover buttons, click effects | `whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }}` |
123
+
124
+ ---
125
+
126
+ ## Setup Steps
127
+
128
+ 1. Initialize Project:
129
+ ```bash
130
+ npx create-next-app@latest my-site --typescript --tailwind --eslint
131
+ # Select 'Yes' for App Router
132
+ # Select 'No' for 'Would you like to customize the default import alias?'
133
+ ```
134
+
135
+ 2. Install Auxiliary Libraries:
136
+ ```bash
137
+ npm install framer-motion lucide-react clsx tailwind-merge
138
+ # clsx and tailwind-merge help handle dynamic classes better
139
+ ```
140
+
141
+ 3. Configure Tailwind v4 (in `src/app/globals.css`):
142
+ ```css
143
+ @import "tailwindcss";
144
+
145
+ @theme {
146
+ --color-primary: #3b82f6;
147
+ --font-sans: 'Inter', sans-serif;
148
+ }
149
+ ```
150
+
151
+ 4. Development:
152
+ ```bash
153
+ npm run dev --turbopack
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Deployment
159
+
160
+ | Platform | Method | Important Notes |
161
+ |----------|--------|-----------------|
162
+ | Vercel | Git Push | Auto-detects Next.js. Best for performance. |
163
+ | GitHub Pages | GitHub Actions | Need to set `basePath` in `next.config.ts` if not using a custom domain. |
164
+ | AWS S3 / CloudFront | Upload out folder | Ensure Error Document is configured to `404.html`. |
165
+ | Netlify | Git Push | Set build command to `npm run build`. |
166
+
167
+ ---
168
+
169
+ ## Best Practices (Modern)
170
+
171
+ - **React Server Components (RSC)**: Default all components to Server Components. Only add `'use client'` when you need state (`useState`) or event listeners (`onClick`).
172
+ - **Image Optimization**: Use the `<Image />` component but remember `unoptimized: true` for static export or use an external image CDN (Cloudinary/Imgix).
173
+ - **Font Optimization**: Use `next/font` (Google Fonts) to automatically host fonts and prevent layout shift.
174
+ - **Responsive**: Mobile-first design using Tailwind prefixes like `sm:`, `md:`, `lg:`.
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: nuxt-app
3
+ description: Nuxt 4 full-stack template. Vue 3, Pinia, Tailwind v4, Prisma.
4
+ ---
5
+
6
+ # Nuxt 4 Full-Stack Template (2026 Edition)
7
+
8
+ > Modern full-stack template for Nuxt 4. Versions reflect the latest stable line verified 2026-05; pin to current stable when scaffolding.
9
+
10
+ ## Tech Stack
11
+
12
+ | Component | Technology | Version / Notes |
13
+ |-----------|------------|-----------------|
14
+ | Framework | Nuxt | v4+ (app/ srcDir structure) |
15
+ | UI Engine | Vue | v3 (stable) |
16
+ | Language | TypeScript | v5+ (Strict Mode) |
17
+ | State | Pinia | v3+ (setup store syntax) |
18
+ | Database | PostgreSQL | Prisma ORM |
19
+ | Styling | Tailwind CSS | v4 (@tailwindcss/vite plugin) |
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
+ Nuxt 4 defaults `srcDir` to `app/`, keeping client code separate from `server/` and root config.
28
+
29
+ ```
30
+ project-name/
31
+ ├── app/ # Application source (Nuxt 4 srcDir)
32
+ │ ├── assets/css/
33
+ │ │ └── main.css # Tailwind v4 import
34
+ │ ├── components/ # Auto-imported components
35
+ │ ├── composables/ # Auto-imported logic
36
+ │ ├── layouts/
37
+ │ ├── middleware/
38
+ │ ├── pages/ # File-based routing
39
+ │ ├── plugins/
40
+ │ ├── stores/ # Pinia stores
41
+ │ ├── app.vue # Root component
42
+ │ └── app.config.ts # Reactive runtime config
43
+ ├── server/ # Nitro server engine
44
+ │ ├── api/ # API routes (e.g. /api/users)
45
+ │ ├── routes/ # Server routes
46
+ │ └── utils/ # Server-only helpers (Prisma client)
47
+ ├── shared/ # Isomorphic code (types, Zod schemas)
48
+ ├── prisma/
49
+ │ └── schema.prisma
50
+ ├── public/
51
+ ├── nuxt.config.ts
52
+ └── package.json
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Key Concepts (2026)
58
+
59
+ | Concept | Description |
60
+ |---------|-------------|
61
+ | **app/ srcDir** | Client code lives under `app/`, cleanly separated from `server/` and config |
62
+ | **shared/** | Isomorphic code (types, Zod validators) usable in both Vue app and Nitro server |
63
+ | **Server Engine** | Nitro-based; API routes in `server/api/`, Prisma client in `server/utils/` |
64
+ | **Tailwind v4** | CSS-first config; theme lives in CSS via `@theme`, no `tailwind.config.js` |
65
+ | **Vapor Mode** | Experimental no-VDOM renderer (not GA in 2026). Opt-in per component via `<script setup vapor>` when shipped |
66
+
67
+ ---
68
+
69
+ ## Environment Variables
70
+
71
+ | Variable | Purpose |
72
+ |----------|---------|
73
+ | DATABASE_URL | Prisma connection string (PostgreSQL) |
74
+ | NUXT_PUBLIC_APP_URL | Canonical URL |
75
+ | NUXT_SESSION_PASSWORD | Session encryption key |
76
+
77
+ ---
78
+
79
+ ## Setup Steps
80
+
81
+ 1. Initialize project:
82
+ ```bash
83
+ npx nuxi@latest init my-app
84
+ ```
85
+
86
+ 2. Install core deps:
87
+ ```bash
88
+ npm install @pinia/nuxt @prisma/client zod
89
+ npm install -D prisma
90
+ ```
91
+
92
+ 3. Setup Tailwind v4 (first-party Vite plugin, NOT @nuxtjs/tailwindcss):
93
+ ```bash
94
+ npm install tailwindcss @tailwindcss/vite
95
+ ```
96
+
97
+ Add to `nuxt.config.ts`:
98
+ ```ts
99
+ import tailwindcss from '@tailwindcss/vite'
100
+ export default defineNuxtConfig({
101
+ vite: { plugins: [tailwindcss()] },
102
+ css: ['~/assets/css/main.css']
103
+ })
104
+ ```
105
+
106
+ 4. Configure CSS in `app/assets/css/main.css`:
107
+ ```css
108
+ @import "tailwindcss";
109
+ @theme {
110
+ --color-primary: oklch(0.6 0.15 150);
111
+ }
112
+ ```
113
+
114
+ 5. Run development:
115
+ ```bash
116
+ npm run dev
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Best Practices
122
+
123
+ - **Data Fetching**: Use `useFetch`/`useAsyncData` for SSR-friendly data; reserve `server: false` for client-only work.
124
+ - **State**: Use Pinia (`defineStore`) for global state, Nuxt's `useState` for simple shared SSR state.
125
+ - **Validation**: Define Zod schemas in `shared/` and reuse on client forms and Nitro API routes.
126
+ - **Type Safety**: API route types are inferred automatically with `$fetch`.
127
+ - **Server-only**: Instantiate the Prisma client in `server/utils/` so it never leaks to the client bundle.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: python-fastapi
3
+ description: FastAPI REST API template principles. SQLAlchemy, Pydantic, Alembic.
4
+ ---
5
+
6
+ # FastAPI API Template
7
+
8
+ > Versions reflect the latest stable line verified 2026-05. Pin to the current stable when scaffolding.
9
+
10
+ ## Tech Stack
11
+
12
+ | Component | Technology |
13
+ |-----------|------------|
14
+ | Framework | FastAPI |
15
+ | Language | Python 3.12+ (current stable 3.14) |
16
+ | ORM | SQLAlchemy 2.0 (async) |
17
+ | Validation | Pydantic v2 |
18
+ | Migrations | Alembic |
19
+ | Auth | JWT + passlib |
20
+
21
+ ---
22
+
23
+ ## Directory Structure
24
+
25
+ > Domain/module layout (scales better than file-type for non-trivial apps). Each domain owns its router, schemas, models, service.
26
+
27
+ ```
28
+ project-name/
29
+ ├── alembic/ # Migrations
30
+ ├── src/
31
+ │ ├── auth/
32
+ │ │ ├── router.py # APIRouter
33
+ │ │ ├── schemas.py # Pydantic models
34
+ │ │ ├── models.py # SQLAlchemy models
35
+ │ │ ├── service.py # Business logic
36
+ │ │ ├── dependencies.py
37
+ │ │ └── exceptions.py
38
+ │ ├── posts/ # Same shape per domain
39
+ │ ├── config.py # Global settings (BaseSettings)
40
+ │ ├── database.py # Async engine / session
41
+ │ ├── models.py # Shared base models
42
+ │ ├── exceptions.py # Global exceptions
43
+ │ └── main.py # FastAPI() + include_router
44
+ ├── tests/
45
+ ├── requirements/ # base.txt / dev.txt / prod.txt
46
+ ├── alembic.ini
47
+ └── .env
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Key Concepts
53
+
54
+ | Concept | Description |
55
+ |---------|-------------|
56
+ | Domain modules | Each feature folder owns router + schemas + models + service |
57
+ | Async | async/await throughout (AsyncSession, async_sessionmaker) |
58
+ | Dependency Injection | FastAPI Depends (validation, auth, DB session) |
59
+ | Pydantic v2 | Validation + serialization |
60
+ | SQLAlchemy 2.0 | Async sessions |
61
+
62
+ ---
63
+
64
+ ## API Structure
65
+
66
+ | Layer | Responsibility |
67
+ |-------|---------------|
68
+ | Routers | HTTP handling |
69
+ | Dependencies | Auth, validation |
70
+ | Services | Business logic |
71
+ | Models | Database entities |
72
+ | Schemas | Request/response |
73
+
74
+ ---
75
+
76
+ ## Setup Steps
77
+
78
+ 1. `python -m venv venv`
79
+ 2. `source venv/bin/activate`
80
+ 3. `pip install fastapi uvicorn "sqlalchemy[asyncio]" alembic pydantic pydantic-settings`
81
+ 4. Create `.env`
82
+ 5. `alembic upgrade head`
83
+ 6. `uvicorn src.main:app --reload`
84
+
85
+ ---
86
+
87
+ ## Best Practices
88
+
89
+ - Use async everywhere (AsyncSession, async dependencies; wrap sync SDKs in `run_in_threadpool`)
90
+ - Per-module `BaseSettings` over one global config
91
+ - Pydantic v2 for validation
92
+ - SQLAlchemy 2.0 async sessions
93
+ - Alembic migrations: static, reversible, descriptive slugs
94
+ - pytest-asyncio for tests; use `dependency_overrides` to mock