@mrtrinhvn/ag-kit 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.
- package/bin/cli.js +88 -0
- package/package.json +28 -0
- package/template/.agent/agents/backend-specialist.md +263 -0
- package/template/.agent/agents/code-archaeologist.md +106 -0
- package/template/.agent/agents/database-architect.md +226 -0
- package/template/.agent/agents/debugger.md +225 -0
- package/template/.agent/agents/devops-engineer.md +242 -0
- package/template/.agent/agents/documentation-writer.md +104 -0
- package/template/.agent/agents/explorer-agent.md +73 -0
- package/template/.agent/agents/frontend-specialist.md +556 -0
- package/template/.agent/agents/game-developer.md +162 -0
- package/template/.agent/agents/mobile-developer.md +377 -0
- package/template/.agent/agents/orchestrator.md +416 -0
- package/template/.agent/agents/penetration-tester.md +188 -0
- package/template/.agent/agents/performance-optimizer.md +187 -0
- package/template/.agent/agents/product-manager.md +112 -0
- package/template/.agent/agents/product-owner.md +95 -0
- package/template/.agent/agents/project-planner.md +406 -0
- package/template/.agent/agents/qa-automation-engineer.md +103 -0
- package/template/.agent/agents/quant-architect.md +31 -0
- package/template/.agent/agents/security-auditor.md +170 -0
- package/template/.agent/agents/seo-specialist.md +111 -0
- package/template/.agent/agents/test-engineer.md +158 -0
- package/template/.agent/knowledge/.gitkeep +0 -0
- package/template/.agent/rules/GEMINI.md +280 -0
- package/template/.agent/scripts/auto_preview.py +148 -0
- package/template/.agent/scripts/checklist.py +217 -0
- package/template/.agent/scripts/session_manager.py +120 -0
- package/template/.agent/scripts/verify_all.py +327 -0
- package/template/.agent/skills/api-patterns/SKILL.md +81 -0
- package/template/.agent/skills/api-patterns/api-style.md +42 -0
- package/template/.agent/skills/api-patterns/auth.md +24 -0
- package/template/.agent/skills/api-patterns/documentation.md +26 -0
- package/template/.agent/skills/api-patterns/graphql.md +41 -0
- package/template/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/template/.agent/skills/api-patterns/response.md +37 -0
- package/template/.agent/skills/api-patterns/rest.md +40 -0
- package/template/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/template/.agent/skills/api-patterns/security-testing.md +122 -0
- package/template/.agent/skills/api-patterns/trpc.md +41 -0
- package/template/.agent/skills/api-patterns/versioning.md +22 -0
- package/template/.agent/skills/app-builder/SKILL.md +75 -0
- package/template/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/template/.agent/skills/app-builder/feature-building.md +53 -0
- package/template/.agent/skills/app-builder/project-detection.md +34 -0
- package/template/.agent/skills/app-builder/scaffolding.md +118 -0
- package/template/.agent/skills/app-builder/tech-stack.md +40 -0
- package/template/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/template/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/template/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/template/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/template/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/template/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/template/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/template/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/template/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/template/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/template/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/template/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/template/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/template/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/template/.agent/skills/architecture/SKILL.md +55 -0
- package/template/.agent/skills/architecture/context-discovery.md +43 -0
- package/template/.agent/skills/architecture/examples.md +94 -0
- package/template/.agent/skills/architecture/pattern-selection.md +68 -0
- package/template/.agent/skills/architecture/patterns-reference.md +50 -0
- package/template/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/template/.agent/skills/bash-linux/SKILL.md +199 -0
- package/template/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/template/.agent/skills/brainstorming/SKILL.md +168 -0
- package/template/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/template/.agent/skills/business-ops/SKILL.md +26 -0
- package/template/.agent/skills/clean-code/SKILL.md +202 -0
- package/template/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/template/.agent/skills/data-science/SKILL.md +28 -0
- package/template/.agent/skills/database-design/SKILL.md +52 -0
- package/template/.agent/skills/database-design/database-selection.md +43 -0
- package/template/.agent/skills/database-design/indexing.md +39 -0
- package/template/.agent/skills/database-design/migrations.md +48 -0
- package/template/.agent/skills/database-design/optimization.md +36 -0
- package/template/.agent/skills/database-design/orm-selection.md +30 -0
- package/template/.agent/skills/database-design/schema-design.md +56 -0
- package/template/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/template/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/template/.agent/skills/doc.md +177 -0
- package/template/.agent/skills/documentation-templates/SKILL.md +194 -0
- package/template/.agent/skills/frontend-design/SKILL.md +418 -0
- package/template/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/template/.agent/skills/frontend-design/color-system.md +311 -0
- package/template/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/template/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/template/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/template/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/template/.agent/skills/frontend-design/typography-system.md +345 -0
- package/template/.agent/skills/frontend-design/ux-psychology.md +541 -0
- package/template/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/template/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/template/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/template/.agent/skills/game-development/SKILL.md +167 -0
- package/template/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/template/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/template/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/template/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/template/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/template/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/template/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/template/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/template/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/template/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/template/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/template/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/template/.agent/skills/intelligent-routing/SKILL.md +335 -0
- package/template/.agent/skills/knowledge-management/SKILL.md +54 -0
- package/template/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/template/.agent/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/template/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/template/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/template/.agent/skills/mobile-design/SKILL.md +394 -0
- package/template/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/template/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/template/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/template/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/template/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/template/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/template/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/template/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/template/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/template/.agent/skills/mobile-design/platform-android.md +666 -0
- package/template/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/template/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/template/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/template/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/template/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/template/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/template/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/template/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/template/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/template/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/template/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/template/.agent/skills/nextjs-react-expert/SKILL.md +267 -0
- package/template/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/template/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/template/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/template/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/template/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/template/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/template/.agent/skills/plan-writing/SKILL.md +153 -0
- package/template/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/template/.agent/skills/product-management/SKILL.md +30 -0
- package/template/.agent/skills/python-patterns/SKILL.md +441 -0
- package/template/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/template/.agent/skills/seo-fundamentals/SKILL.md +129 -0
- package/template/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/template/.agent/skills/server-management/SKILL.md +161 -0
- package/template/.agent/skills/systematic-debugging/SKILL.md +110 -0
- package/template/.agent/skills/tailwind-patterns/SKILL.md +269 -0
- package/template/.agent/skills/tdd-workflow/SKILL.md +148 -0
- package/template/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/template/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/template/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/template/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/template/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/template/.agent/skills/web-design-guidelines/SKILL.md +57 -0
- package/template/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/template/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/template/.agent/workflows/brainstorm.md +113 -0
- package/template/.agent/workflows/create.md +59 -0
- package/template/.agent/workflows/debug.md +103 -0
- package/template/.agent/workflows/deploy.md +176 -0
- package/template/.agent/workflows/enhance.md +63 -0
- package/template/.agent/workflows/orchestrate.md +237 -0
- package/template/.agent/workflows/plan.md +89 -0
- package/template/.agent/workflows/preview.md +81 -0
- package/template/.agent/workflows/status.md +86 -0
- package/template/.agent/workflows/test.md +144 -0
- package/template/.agent/workflows/ui-ux-pro-max.md +296 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flutter-app
|
|
3
|
+
description: Flutter mobile app template principles. Riverpod, Go Router, clean architecture.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Flutter App Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | Flutter 3.x |
|
|
13
|
+
| Language | Dart 3.x |
|
|
14
|
+
| State | Riverpod 2.0 |
|
|
15
|
+
| Navigation | Go Router |
|
|
16
|
+
| HTTP | Dio |
|
|
17
|
+
| Storage | Hive |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Directory Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
project_name/
|
|
25
|
+
├── lib/
|
|
26
|
+
│ ├── main.dart
|
|
27
|
+
│ ├── app.dart
|
|
28
|
+
│ ├── core/
|
|
29
|
+
│ │ ├── constants/
|
|
30
|
+
│ │ ├── theme/
|
|
31
|
+
│ │ ├── router/
|
|
32
|
+
│ │ └── utils/
|
|
33
|
+
│ ├── features/
|
|
34
|
+
│ │ ├── auth/
|
|
35
|
+
│ │ │ ├── data/
|
|
36
|
+
│ │ │ ├── domain/
|
|
37
|
+
│ │ │ └── presentation/
|
|
38
|
+
│ │ └── home/
|
|
39
|
+
│ ├── shared/
|
|
40
|
+
│ │ ├── widgets/
|
|
41
|
+
│ │ └── providers/
|
|
42
|
+
│ └── services/
|
|
43
|
+
│ ├── api/
|
|
44
|
+
│ └── storage/
|
|
45
|
+
├── test/
|
|
46
|
+
└── pubspec.yaml
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Architecture Layers
|
|
52
|
+
|
|
53
|
+
| Layer | Contents |
|
|
54
|
+
|-------|----------|
|
|
55
|
+
| Presentation | Screens, Widgets, Providers |
|
|
56
|
+
| Domain | Entities, Use Cases |
|
|
57
|
+
| Data | Repositories, Models |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Key Packages
|
|
62
|
+
|
|
63
|
+
| Package | Purpose |
|
|
64
|
+
|---------|---------|
|
|
65
|
+
| flutter_riverpod | State management |
|
|
66
|
+
| riverpod_annotation | Code generation |
|
|
67
|
+
| go_router | Navigation |
|
|
68
|
+
| dio | HTTP client |
|
|
69
|
+
| freezed | Immutable models |
|
|
70
|
+
| hive | Local storage |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Setup Steps
|
|
75
|
+
|
|
76
|
+
1. `flutter create {{name}} --org com.{{bundle}}`
|
|
77
|
+
2. Update `pubspec.yaml`
|
|
78
|
+
3. `flutter pub get`
|
|
79
|
+
4. Run code generation: `dart run build_runner build`
|
|
80
|
+
5. `flutter run`
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Best Practices
|
|
85
|
+
|
|
86
|
+
- Feature-first folder structure
|
|
87
|
+
- Riverpod for state, React Query pattern for server state
|
|
88
|
+
- Freezed for immutable data classes
|
|
89
|
+
- Go Router for declarative navigation
|
|
90
|
+
- Material 3 theming
|
|
@@ -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,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nextjs-fullstack
|
|
3
|
+
description: Next.js full-stack template principles. App Router, Prisma, Tailwind.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Next.js Full-Stack Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | Next.js 14 (App Router) |
|
|
13
|
+
| Language | TypeScript |
|
|
14
|
+
| Database | PostgreSQL + Prisma |
|
|
15
|
+
| Styling | Tailwind CSS |
|
|
16
|
+
| Auth | Clerk (optional) |
|
|
17
|
+
| Validation | Zod |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Directory Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
project-name/
|
|
25
|
+
├── prisma/
|
|
26
|
+
│ └── schema.prisma
|
|
27
|
+
├── src/
|
|
28
|
+
│ ├── app/
|
|
29
|
+
│ │ ├── layout.tsx
|
|
30
|
+
│ │ ├── page.tsx
|
|
31
|
+
│ │ ├── globals.css
|
|
32
|
+
│ │ └── api/
|
|
33
|
+
│ ├── components/
|
|
34
|
+
│ │ └── ui/
|
|
35
|
+
│ ├── lib/
|
|
36
|
+
│ │ ├── db.ts # Prisma client
|
|
37
|
+
│ │ └── utils.ts
|
|
38
|
+
│ └── types/
|
|
39
|
+
├── .env.example
|
|
40
|
+
└── package.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Key Concepts
|
|
46
|
+
|
|
47
|
+
| Concept | Description |
|
|
48
|
+
|---------|-------------|
|
|
49
|
+
| Server Components | Default, fetch data |
|
|
50
|
+
| Server Actions | Form mutations |
|
|
51
|
+
| Route Handlers | API endpoints |
|
|
52
|
+
| Prisma | Type-safe ORM |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Environment Variables
|
|
57
|
+
|
|
58
|
+
| Variable | Purpose |
|
|
59
|
+
|----------|---------|
|
|
60
|
+
| DATABASE_URL | Prisma connection |
|
|
61
|
+
| NEXT_PUBLIC_APP_URL | Public URL |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Setup Steps
|
|
66
|
+
|
|
67
|
+
1. `npx create-next-app {{name}} --typescript --tailwind --app`
|
|
68
|
+
2. `npm install prisma @prisma/client zod`
|
|
69
|
+
3. `npx prisma init`
|
|
70
|
+
4. Configure schema
|
|
71
|
+
5. `npm run db:push`
|
|
72
|
+
6. `npm run dev`
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Best Practices
|
|
77
|
+
|
|
78
|
+
- Server Components by default
|
|
79
|
+
- Server Actions for mutations
|
|
80
|
+
- Prisma for type-safe DB
|
|
81
|
+
- Zod for validation
|
|
82
|
+
- Edge runtime where possible
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nextjs-saas
|
|
3
|
+
description: Next.js SaaS template principles. Auth, payments, email.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Next.js SaaS Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | Next.js 14 (App Router) |
|
|
13
|
+
| Auth | NextAuth.js v5 |
|
|
14
|
+
| Payments | Stripe |
|
|
15
|
+
| Database | PostgreSQL + Prisma |
|
|
16
|
+
| Email | Resend |
|
|
17
|
+
| UI | Tailwind (ASK USER: shadcn/Headless UI/Custom?) |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Directory Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
project-name/
|
|
25
|
+
├── prisma/
|
|
26
|
+
├── src/
|
|
27
|
+
│ ├── app/
|
|
28
|
+
│ │ ├── (auth)/ # Login, register
|
|
29
|
+
│ │ ├── (dashboard)/ # Protected routes
|
|
30
|
+
│ │ ├── (marketing)/ # Landing, pricing
|
|
31
|
+
│ │ └── api/
|
|
32
|
+
│ │ ├── auth/[...nextauth]/
|
|
33
|
+
│ │ └── webhooks/stripe/
|
|
34
|
+
│ ├── components/
|
|
35
|
+
│ │ ├── auth/
|
|
36
|
+
│ │ ├── billing/
|
|
37
|
+
│ │ └── dashboard/
|
|
38
|
+
│ ├── lib/
|
|
39
|
+
│ │ ├── auth.ts # NextAuth config
|
|
40
|
+
│ │ ├── stripe.ts # Stripe client
|
|
41
|
+
│ │ └── email.ts # Resend client
|
|
42
|
+
│ └── config/
|
|
43
|
+
│ └── subscriptions.ts
|
|
44
|
+
└── package.json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## SaaS Features
|
|
50
|
+
|
|
51
|
+
| Feature | Implementation |
|
|
52
|
+
|---------|---------------|
|
|
53
|
+
| Auth | NextAuth + OAuth |
|
|
54
|
+
| Subscriptions | Stripe Checkout |
|
|
55
|
+
| Billing Portal | Stripe Portal |
|
|
56
|
+
| Webhooks | Stripe events |
|
|
57
|
+
| Email | Transactional via Resend |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Database Schema
|
|
62
|
+
|
|
63
|
+
| Model | Fields |
|
|
64
|
+
|-------|--------|
|
|
65
|
+
| User | id, email, stripeCustomerId, subscriptionId |
|
|
66
|
+
| Account | OAuth provider data |
|
|
67
|
+
| Session | User sessions |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Environment Variables
|
|
72
|
+
|
|
73
|
+
| Variable | Purpose |
|
|
74
|
+
|----------|---------|
|
|
75
|
+
| DATABASE_URL | Prisma |
|
|
76
|
+
| NEXTAUTH_SECRET | Auth |
|
|
77
|
+
| STRIPE_SECRET_KEY | Payments |
|
|
78
|
+
| STRIPE_WEBHOOK_SECRET | Webhooks |
|
|
79
|
+
| RESEND_API_KEY | Email |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Setup Steps
|
|
84
|
+
|
|
85
|
+
1. `npx create-next-app {{name}} --typescript --tailwind --app`
|
|
86
|
+
2. Install: `npm install next-auth @auth/prisma-adapter stripe resend`
|
|
87
|
+
3. Setup Stripe products/prices
|
|
88
|
+
4. Configure environment
|
|
89
|
+
5. `npm run db:push`
|
|
90
|
+
6. `npm run stripe:listen` (webhooks)
|
|
91
|
+
7. `npm run dev`
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Best Practices
|
|
96
|
+
|
|
97
|
+
- Route groups for layout separation
|
|
98
|
+
- Stripe webhooks for subscription sync
|
|
99
|
+
- NextAuth with Prisma adapter
|
|
100
|
+
- Email templates with React Email
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nextjs-static
|
|
3
|
+
description: Next.js static site template principles. Landing pages, portfolios, marketing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Next.js Static Site Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | Next.js 14 (Static Export) |
|
|
13
|
+
| Language | TypeScript |
|
|
14
|
+
| Styling | Tailwind CSS |
|
|
15
|
+
| Animations | Framer Motion |
|
|
16
|
+
| Icons | Lucide React |
|
|
17
|
+
| SEO | Next SEO |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Directory Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
project-name/
|
|
25
|
+
├── src/
|
|
26
|
+
│ ├── app/
|
|
27
|
+
│ │ ├── layout.tsx
|
|
28
|
+
│ │ ├── page.tsx # Landing
|
|
29
|
+
│ │ ├── about/
|
|
30
|
+
│ │ ├── contact/
|
|
31
|
+
│ │ └── blog/
|
|
32
|
+
│ ├── components/
|
|
33
|
+
│ │ ├── layout/ # Header, Footer
|
|
34
|
+
│ │ ├── sections/ # Hero, Features, CTA
|
|
35
|
+
│ │ └── ui/
|
|
36
|
+
│ └── lib/
|
|
37
|
+
├── content/ # Markdown content
|
|
38
|
+
├── public/
|
|
39
|
+
└── next.config.js
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Static Export Config
|
|
45
|
+
|
|
46
|
+
```javascript
|
|
47
|
+
// next.config.js
|
|
48
|
+
const nextConfig = {
|
|
49
|
+
output: 'export',
|
|
50
|
+
images: { unoptimized: true },
|
|
51
|
+
trailingSlash: true,
|
|
52
|
+
};
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Landing Page Sections
|
|
58
|
+
|
|
59
|
+
| Section | Purpose |
|
|
60
|
+
|---------|---------|
|
|
61
|
+
| Hero | Main headline, CTA |
|
|
62
|
+
| Features | Product benefits |
|
|
63
|
+
| Testimonials | Social proof |
|
|
64
|
+
| Pricing | Plans |
|
|
65
|
+
| CTA | Final conversion |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Animation Patterns
|
|
70
|
+
|
|
71
|
+
| Pattern | Use |
|
|
72
|
+
|---------|-----|
|
|
73
|
+
| Fade up | Content entry |
|
|
74
|
+
| Stagger | List items |
|
|
75
|
+
| Scroll reveal | On viewport |
|
|
76
|
+
| Hover | Interactive feedback |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Setup Steps
|
|
81
|
+
|
|
82
|
+
1. `npx create-next-app {{name}} --typescript --tailwind --app`
|
|
83
|
+
2. Install: `npm install framer-motion lucide-react next-seo`
|
|
84
|
+
3. Configure static export
|
|
85
|
+
4. Create sections
|
|
86
|
+
5. `npm run dev`
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Deployment
|
|
91
|
+
|
|
92
|
+
| Platform | Method |
|
|
93
|
+
|----------|--------|
|
|
94
|
+
| Vercel | Auto |
|
|
95
|
+
| Netlify | Auto |
|
|
96
|
+
| GitHub Pages | gh-pages branch |
|
|
97
|
+
| Any host | Upload `out` folder |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Best Practices
|
|
102
|
+
|
|
103
|
+
- Static export for maximum performance
|
|
104
|
+
- Framer Motion for premium animations
|
|
105
|
+
- Responsive mobile-first design
|
|
106
|
+
- SEO metadata on every page
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nuxt-app
|
|
3
|
+
description: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Nuxt 3 Full-Stack Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | Nuxt 3 |
|
|
13
|
+
| Language | TypeScript |
|
|
14
|
+
| UI | Vue 3 (Composition API) |
|
|
15
|
+
| State | Pinia |
|
|
16
|
+
| Database | PostgreSQL + Prisma |
|
|
17
|
+
| Styling | Tailwind CSS |
|
|
18
|
+
| Validation | Zod |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Directory Structure
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
project-name/
|
|
26
|
+
├── prisma/
|
|
27
|
+
│ └── schema.prisma
|
|
28
|
+
├── server/
|
|
29
|
+
│ ├── api/
|
|
30
|
+
│ │ └── [resource]/
|
|
31
|
+
│ │ └── index.ts
|
|
32
|
+
│ └── utils/
|
|
33
|
+
│ └── db.ts # Prisma client
|
|
34
|
+
├── composables/
|
|
35
|
+
│ └── useAuth.ts
|
|
36
|
+
├── stores/
|
|
37
|
+
│ └── user.ts # Pinia store
|
|
38
|
+
├── components/
|
|
39
|
+
│ └── ui/
|
|
40
|
+
├── pages/
|
|
41
|
+
│ ├── index.vue
|
|
42
|
+
│ └── [...slug].vue
|
|
43
|
+
├── layouts/
|
|
44
|
+
│ └── default.vue
|
|
45
|
+
├── assets/
|
|
46
|
+
│ └── css/
|
|
47
|
+
│ └── main.css
|
|
48
|
+
├── .env.example
|
|
49
|
+
├── nuxt.config.ts
|
|
50
|
+
└── package.json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Key Concepts
|
|
56
|
+
|
|
57
|
+
| Concept | Description |
|
|
58
|
+
|---------|-------------|
|
|
59
|
+
| Auto-imports | Components, composables, utils |
|
|
60
|
+
| File-based routing | pages/ → routes |
|
|
61
|
+
| Server Routes | server/api/ → API endpoints |
|
|
62
|
+
| Composables | Reusable reactive logic |
|
|
63
|
+
| Pinia | State management |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Environment Variables
|
|
68
|
+
|
|
69
|
+
| Variable | Purpose |
|
|
70
|
+
|----------|---------|
|
|
71
|
+
| DATABASE_URL | Prisma connection |
|
|
72
|
+
| NUXT_PUBLIC_APP_URL | Public URL |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Setup Steps
|
|
77
|
+
|
|
78
|
+
1. `npx nuxi@latest init {{name}}`
|
|
79
|
+
2. `cd {{name}}`
|
|
80
|
+
3. `npm install @pinia/nuxt @prisma/client prisma zod`
|
|
81
|
+
4. `npm install -D @nuxtjs/tailwindcss`
|
|
82
|
+
5. Add modules to `nuxt.config.ts`:
|
|
83
|
+
```ts
|
|
84
|
+
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss']
|
|
85
|
+
```
|
|
86
|
+
6. `npx prisma init`
|
|
87
|
+
7. Configure schema
|
|
88
|
+
8. `npx prisma db push`
|
|
89
|
+
9. `npm run dev`
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Best Practices
|
|
94
|
+
|
|
95
|
+
- Use `<script setup>` for components
|
|
96
|
+
- Composables for reusable logic
|
|
97
|
+
- Pinia stores in `stores/` folder
|
|
98
|
+
- Server routes for API logic
|
|
99
|
+
- Auto-import for clean code
|
|
100
|
+
- TypeScript for type safety
|
|
101
|
+
- See `@[skills/vue-expert]` for Vue patterns
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: python-fastapi
|
|
3
|
+
description: FastAPI REST API template principles. SQLAlchemy, Pydantic, Alembic.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# FastAPI API Template
|
|
7
|
+
|
|
8
|
+
## Tech Stack
|
|
9
|
+
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | FastAPI |
|
|
13
|
+
| Language | Python 3.11+ |
|
|
14
|
+
| ORM | SQLAlchemy 2.0 |
|
|
15
|
+
| Validation | Pydantic v2 |
|
|
16
|
+
| Migrations | Alembic |
|
|
17
|
+
| Auth | JWT + passlib |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Directory Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
project-name/
|
|
25
|
+
├── alembic/ # Migrations
|
|
26
|
+
├── app/
|
|
27
|
+
│ ├── main.py # FastAPI app
|
|
28
|
+
│ ├── config.py # Settings
|
|
29
|
+
│ ├── database.py # DB connection
|
|
30
|
+
│ ├── models/ # SQLAlchemy models
|
|
31
|
+
│ ├── schemas/ # Pydantic schemas
|
|
32
|
+
│ ├── routers/ # API routes
|
|
33
|
+
│ ├── services/ # Business logic
|
|
34
|
+
│ ├── dependencies/ # DI
|
|
35
|
+
│ └── utils/
|
|
36
|
+
├── tests/
|
|
37
|
+
├── .env.example
|
|
38
|
+
└── requirements.txt
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Key Concepts
|
|
44
|
+
|
|
45
|
+
| Concept | Description |
|
|
46
|
+
|---------|-------------|
|
|
47
|
+
| Async | async/await throughout |
|
|
48
|
+
| Dependency Injection | FastAPI Depends |
|
|
49
|
+
| Pydantic v2 | Validation + serialization |
|
|
50
|
+
| SQLAlchemy 2.0 | Async sessions |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## API Structure
|
|
55
|
+
|
|
56
|
+
| Layer | Responsibility |
|
|
57
|
+
|-------|---------------|
|
|
58
|
+
| Routers | HTTP handling |
|
|
59
|
+
| Dependencies | Auth, validation |
|
|
60
|
+
| Services | Business logic |
|
|
61
|
+
| Models | Database entities |
|
|
62
|
+
| Schemas | Request/response |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Setup Steps
|
|
67
|
+
|
|
68
|
+
1. `python -m venv venv`
|
|
69
|
+
2. `source venv/bin/activate`
|
|
70
|
+
3. `pip install fastapi uvicorn sqlalchemy alembic pydantic`
|
|
71
|
+
4. Create `.env`
|
|
72
|
+
5. `alembic upgrade head`
|
|
73
|
+
6. `uvicorn app.main:app --reload`
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Best Practices
|
|
78
|
+
|
|
79
|
+
- Use async everywhere
|
|
80
|
+
- Pydantic v2 for validation
|
|
81
|
+
- SQLAlchemy 2.0 async sessions
|
|
82
|
+
- Alembic for migrations
|
|
83
|
+
- pytest-asyncio for tests
|