bps-kit 1.0.2 → 1.0.4
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 +4 -4
- package/package.json +1 -1
- package/templates/{.agents → agents-template}/rules/GEMINI.md +5 -5
- package/templates/skills_extra/nodejs-best-practices/SKILL.md +8 -2
- package/templates/skills_normal/api-patterns/SKILL.md +7 -2
- package/templates/skills_normal/app-builder/SKILL.md +8 -3
- package/templates/skills_normal/app-builder/tech-stack.md +2 -2
- package/templates/skills_normal/app-builder/templates/SKILL.md +7 -2
- package/templates/skills_normal/app-builder/templates/nextjs-fullstack/TEMPLATE.md +39 -79
- package/templates/skills_normal/app-builder/templates/nextjs-saas/TEMPLATE.md +53 -75
- package/templates/skills_normal/app-builder/templates/nextjs-static/TEMPLATE.md +56 -119
- package/templates/skills_normal/app-builder/templates/nuxt-app/TEMPLATE.md +61 -94
- package/templates/skills_normal/app-builder/templates/react-native-app/TEMPLATE.md +56 -82
- package/templates/skills_normal/behavioral-modes/SKILL.md +7 -2
- package/templates/skills_normal/brainstorming/SKILL.md +173 -104
- package/templates/skills_normal/clean-code/SKILL.md +90 -197
- package/templates/skills_normal/database-design/SKILL.md +7 -2
- package/templates/skills_normal/frontend-design/LICENSE.txt +177 -0
- package/templates/skills_normal/frontend-design/SKILL.md +172 -313
- package/templates/skills_normal/lint-and-validate/SKILL.md +7 -2
- package/templates/skills_normal/lint-and-validate/scripts/lint_runner.py +2 -14
- package/templates/skills_normal/performance-profiling/SKILL.md +7 -2
- package/templates/skills_normal/plan-writing/SKILL.md +4 -2
- package/templates/skills_normal/seo-fundamentals/SKILL.md +125 -79
- package/templates/skills_normal/systematic-debugging/CREATION-LOG.md +119 -0
- package/templates/skills_normal/systematic-debugging/SKILL.md +275 -85
- package/templates/skills_normal/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/templates/skills_normal/systematic-debugging/condition-based-waiting.md +115 -0
- package/templates/skills_normal/systematic-debugging/defense-in-depth.md +122 -0
- package/templates/skills_normal/systematic-debugging/find-polluter.sh +63 -0
- package/templates/skills_normal/systematic-debugging/root-cause-tracing.md +169 -0
- package/templates/skills_normal/systematic-debugging/test-academic.md +14 -0
- package/templates/skills_normal/systematic-debugging/test-pressure-1.md +58 -0
- package/templates/skills_normal/systematic-debugging/test-pressure-2.md +68 -0
- package/templates/skills_normal/systematic-debugging/test-pressure-3.md +69 -0
- package/templates/skills_normal/tailwind-patterns/SKILL.md +8 -2
- package/templates/skills_normal/testing-patterns/SKILL.md +212 -125
- package/templates/skills_normal/vulnerability-scanner/SKILL.md +7 -2
- package/templates/.agents/agents/backend-specialist.md +0 -263
- package/templates/.agents/agents/code-archaeologist.md +0 -106
- package/templates/.agents/agents/database-architect.md +0 -226
- package/templates/.agents/agents/debugger.md +0 -225
- package/templates/.agents/agents/devops-engineer.md +0 -242
- package/templates/.agents/agents/documentation-writer.md +0 -104
- package/templates/.agents/agents/explorer-agent.md +0 -73
- package/templates/.agents/agents/frontend-specialist.md +0 -593
- package/templates/.agents/agents/game-developer.md +0 -162
- package/templates/.agents/agents/mobile-developer.md +0 -377
- package/templates/.agents/agents/orchestrator.md +0 -416
- package/templates/.agents/agents/penetration-tester.md +0 -188
- package/templates/.agents/agents/performance-optimizer.md +0 -187
- package/templates/.agents/agents/product-manager.md +0 -112
- package/templates/.agents/agents/product-owner.md +0 -95
- package/templates/.agents/agents/project-planner.md +0 -406
- package/templates/.agents/agents/qa-automation-engineer.md +0 -103
- package/templates/.agents/agents/security-auditor.md +0 -170
- package/templates/.agents/agents/seo-specialist.md +0 -111
- package/templates/.agents/agents/test-engineer.md +0 -158
- package/templates/.agents/scripts/auto_preview.py +0 -148
- package/templates/.agents/scripts/checklist.py +0 -217
- package/templates/.agents/scripts/session_manager.py +0 -120
- package/templates/.agents/scripts/verify_all.py +0 -327
- package/templates/.agents/workflows/brainstorm.md +0 -113
- package/templates/.agents/workflows/create.md +0 -59
- package/templates/.agents/workflows/debug.md +0 -103
- package/templates/.agents/workflows/deploy.md +0 -176
- package/templates/.agents/workflows/enhance.md +0 -63
- package/templates/.agents/workflows/orchestrate.md +0 -237
- package/templates/.agents/workflows/plan.md +0 -89
- package/templates/.agents/workflows/preview.md +0 -81
- package/templates/.agents/workflows/status.md +0 -86
- package/templates/.agents/workflows/test.md +0 -144
- package/templates/.agents/workflows/ui-ux-pro-max.md +0 -296
- package/templates/skills_normal/brainstorming/dynamic-questioning.md +0 -350
- package/templates/skills_normal/frontend-design/animation-guide.md +0 -331
- package/templates/skills_normal/frontend-design/color-system.md +0 -311
- package/templates/skills_normal/frontend-design/decision-trees.md +0 -418
- package/templates/skills_normal/frontend-design/motion-graphics.md +0 -306
- package/templates/skills_normal/frontend-design/scripts/accessibility_checker.py +0 -183
- package/templates/skills_normal/frontend-design/scripts/ux_audit.py +0 -722
- package/templates/skills_normal/frontend-design/typography-system.md +0 -345
- package/templates/skills_normal/frontend-design/ux-psychology.md +0 -1116
- package/templates/skills_normal/frontend-design/visual-effects.md +0 -383
- package/templates/skills_normal/testing-patterns/scripts/test_runner.py +0 -219
- /package/templates/{.agents → agents-template}/workflows/setup-brain.md +0 -0
|
@@ -1,93 +1,54 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: nextjs-static
|
|
3
|
-
description:
|
|
3
|
+
description: Next.js static site template principles. Landing pages, portfolios, marketing.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Next.js Static Site Template
|
|
6
|
+
# Next.js Static Site Template
|
|
7
7
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
|
-
| Component | Technology |
|
|
11
|
-
|
|
12
|
-
| Framework | Next.js
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
| SEO | Metadata API | Native Next.js API (Replaces next-seo) |
|
|
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 |
|
|
19
18
|
|
|
20
19
|
---
|
|
21
20
|
|
|
22
21
|
## Directory Structure
|
|
23
22
|
|
|
24
|
-
Streamlined structure thanks to Tailwind v4 (theme configuration lives inside CSS).
|
|
25
|
-
|
|
26
23
|
```
|
|
27
24
|
project-name/
|
|
28
25
|
├── src/
|
|
29
26
|
│ ├── app/
|
|
30
|
-
│ │ ├── layout.tsx
|
|
31
|
-
│ │ ├── page.tsx # Landing
|
|
32
|
-
│ │ ├──
|
|
33
|
-
│ │ ├──
|
|
34
|
-
│ │ └──
|
|
27
|
+
│ │ ├── layout.tsx
|
|
28
|
+
│ │ ├── page.tsx # Landing
|
|
29
|
+
│ │ ├── about/
|
|
30
|
+
│ │ ├── contact/
|
|
31
|
+
│ │ └── blog/
|
|
35
32
|
│ ├── components/
|
|
36
33
|
│ │ ├── layout/ # Header, Footer
|
|
37
|
-
│ │ ├── sections/ # Hero, Features,
|
|
38
|
-
│ │ └── ui/
|
|
34
|
+
│ │ ├── sections/ # Hero, Features, CTA
|
|
35
|
+
│ │ └── ui/
|
|
39
36
|
│ └── lib/
|
|
40
|
-
|
|
41
|
-
├──
|
|
42
|
-
|
|
43
|
-
├── next.config.ts # Next.js Config (TypeScript)
|
|
44
|
-
└── package.json
|
|
37
|
+
├── content/ # Markdown content
|
|
38
|
+
├── public/
|
|
39
|
+
└── next.config.js
|
|
45
40
|
```
|
|
46
41
|
|
|
47
42
|
---
|
|
48
43
|
|
|
49
44
|
## Static Export Config
|
|
50
45
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
},
|
|
46
|
+
```javascript
|
|
47
|
+
// next.config.js
|
|
48
|
+
const nextConfig = {
|
|
49
|
+
output: 'export',
|
|
50
|
+
images: { unoptimized: true },
|
|
51
|
+
trailingSlash: true,
|
|
91
52
|
};
|
|
92
53
|
```
|
|
93
54
|
|
|
@@ -95,75 +56,51 @@ export const metadata: Metadata = {
|
|
|
95
56
|
|
|
96
57
|
## Landing Page Sections
|
|
97
58
|
|
|
98
|
-
| Section | Purpose |
|
|
99
|
-
|
|
100
|
-
| Hero |
|
|
101
|
-
| Features | Product benefits
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
| FAQ | Questions & Answers (Good for SEO) | `<Accordion />` |
|
|
106
|
-
| CTA | Final conversion | `<CallToAction />` |
|
|
59
|
+
| Section | Purpose |
|
|
60
|
+
|---------|---------|
|
|
61
|
+
| Hero | Main headline, CTA |
|
|
62
|
+
| Features | Product benefits |
|
|
63
|
+
| Testimonials | Social proof |
|
|
64
|
+
| Pricing | Plans |
|
|
65
|
+
| CTA | Final conversion |
|
|
107
66
|
|
|
108
67
|
---
|
|
109
68
|
|
|
110
|
-
## Animation Patterns
|
|
69
|
+
## Animation Patterns
|
|
111
70
|
|
|
112
|
-
| Pattern |
|
|
113
|
-
|
|
114
|
-
| Fade
|
|
115
|
-
| Stagger |
|
|
116
|
-
|
|
|
117
|
-
|
|
|
71
|
+
| Pattern | Use |
|
|
72
|
+
|---------|-----|
|
|
73
|
+
| Fade up | Content entry |
|
|
74
|
+
| Stagger | List items |
|
|
75
|
+
| Scroll reveal | On viewport |
|
|
76
|
+
| Hover | Interactive feedback |
|
|
118
77
|
|
|
119
78
|
---
|
|
120
79
|
|
|
121
80
|
## Setup Steps
|
|
122
81
|
|
|
123
|
-
1.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
```
|
|
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`
|
|
150
87
|
|
|
151
88
|
---
|
|
152
89
|
|
|
153
90
|
## Deployment
|
|
154
91
|
|
|
155
|
-
| Platform | Method |
|
|
156
|
-
|
|
157
|
-
| Vercel |
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
92
|
+
| Platform | Method |
|
|
93
|
+
|----------|--------|
|
|
94
|
+
| Vercel | Auto |
|
|
95
|
+
| Netlify | Auto |
|
|
96
|
+
| GitHub Pages | gh-pages branch |
|
|
97
|
+
| Any host | Upload `out` folder |
|
|
161
98
|
|
|
162
99
|
---
|
|
163
100
|
|
|
164
|
-
## Best Practices
|
|
101
|
+
## Best Practices
|
|
165
102
|
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
103
|
+
- Static export for maximum performance
|
|
104
|
+
- Framer Motion for premium animations
|
|
105
|
+
- Responsive mobile-first design
|
|
106
|
+
- SEO metadata on every page
|
|
@@ -1,65 +1,66 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: nuxt-app
|
|
3
|
-
description: Nuxt
|
|
3
|
+
description: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Nuxt
|
|
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.
|
|
6
|
+
# Nuxt 3 Full-Stack Template
|
|
9
7
|
|
|
10
8
|
## Tech Stack
|
|
11
9
|
|
|
12
|
-
| Component | Technology |
|
|
13
|
-
|
|
14
|
-
| Framework | Nuxt
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
| State | Pinia |
|
|
18
|
-
| Database | PostgreSQL
|
|
19
|
-
| Styling | Tailwind CSS |
|
|
20
|
-
|
|
|
21
|
-
| Validation | Zod | Schema validation |
|
|
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 |
|
|
22
19
|
|
|
23
20
|
---
|
|
24
21
|
|
|
25
|
-
## Directory Structure
|
|
26
|
-
|
|
27
|
-
Sử dụng cấu trúc `app/` để giữ thư mục gốc gọn gàng.
|
|
22
|
+
## Directory Structure
|
|
28
23
|
|
|
29
24
|
```
|
|
30
25
|
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
26
|
├── prisma/
|
|
46
27
|
│ └── schema.prisma
|
|
47
|
-
├──
|
|
48
|
-
├──
|
|
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
|
|
49
50
|
└── package.json
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
---
|
|
53
54
|
|
|
54
|
-
## Key Concepts
|
|
55
|
+
## Key Concepts
|
|
55
56
|
|
|
56
|
-
| Concept | Description |
|
|
57
|
-
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
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 |
|
|
63
64
|
|
|
64
65
|
---
|
|
65
66
|
|
|
@@ -67,68 +68,34 @@ project-name/
|
|
|
67
68
|
|
|
68
69
|
| Variable | Purpose |
|
|
69
70
|
|----------|---------|
|
|
70
|
-
| DATABASE_URL | Prisma connection
|
|
71
|
-
| NUXT_PUBLIC_APP_URL |
|
|
72
|
-
| NUXT_SESSION_PASSWORD | Session encryption key |
|
|
71
|
+
| DATABASE_URL | Prisma connection |
|
|
72
|
+
| NUXT_PUBLIC_APP_URL | Public URL |
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
76
76
|
## Setup Steps
|
|
77
77
|
|
|
78
|
-
1.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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`:
|
|
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`:
|
|
97
83
|
```ts
|
|
98
|
-
|
|
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
|
|
84
|
+
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss']
|
|
120
85
|
```
|
|
86
|
+
6. `npx prisma init`
|
|
87
|
+
7. Configure schema
|
|
88
|
+
8. `npx prisma db push`
|
|
89
|
+
9. `npm run dev`
|
|
121
90
|
|
|
122
91
|
---
|
|
123
92
|
|
|
124
93
|
## Best Practices
|
|
125
94
|
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
-
|
|
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).
|
|
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
|
|
@@ -3,117 +3,91 @@ name: react-native-app
|
|
|
3
3
|
description: React Native mobile app template principles. Expo, TypeScript, navigation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# React Native App Template
|
|
7
|
-
|
|
8
|
-
Modern mobile app template, optimized for New Architecture and React 19.
|
|
6
|
+
# React Native App Template
|
|
9
7
|
|
|
10
8
|
## Tech Stack
|
|
11
9
|
|
|
12
|
-
| Component | Technology |
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
| Language | TypeScript |
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
| Styling | NativeWind |
|
|
19
|
-
|
|
|
20
|
-
| Storage | Expo SecureStore | Encrypted local storage |
|
|
10
|
+
| Component | Technology |
|
|
11
|
+
|-----------|------------|
|
|
12
|
+
| Framework | React Native + Expo |
|
|
13
|
+
| Language | TypeScript |
|
|
14
|
+
| Navigation | Expo Router |
|
|
15
|
+
| State | Zustand + React Query |
|
|
16
|
+
| Styling | NativeWind |
|
|
17
|
+
| Testing | Jest + RNTL |
|
|
21
18
|
|
|
22
19
|
---
|
|
23
20
|
|
|
24
21
|
## Directory Structure
|
|
25
22
|
|
|
26
|
-
Standardized structure for Expo Router and NativeWind v4.
|
|
27
|
-
|
|
28
23
|
```
|
|
29
24
|
project-name/
|
|
30
|
-
├── app/ # Expo Router (
|
|
31
|
-
│ ├── _layout.tsx # Root
|
|
32
|
-
│ ├── index.tsx #
|
|
33
|
-
│ ├── (tabs)/ #
|
|
34
|
-
│
|
|
35
|
-
│ │ ├── home.tsx
|
|
36
|
-
│ │ └── profile.tsx
|
|
37
|
-
│ ├── +not-found.tsx # 404 Page
|
|
38
|
-
│ └── [id].tsx # Dynamic Route (Typed)
|
|
25
|
+
├── app/ # Expo Router (file-based)
|
|
26
|
+
│ ├── _layout.tsx # Root layout
|
|
27
|
+
│ ├── index.tsx # Home
|
|
28
|
+
│ ├── (tabs)/ # Tab navigation
|
|
29
|
+
│ └── [id].tsx # Dynamic route
|
|
39
30
|
├── components/
|
|
40
|
-
│ ├── ui/ #
|
|
41
|
-
│ └── features/
|
|
42
|
-
├── hooks/
|
|
31
|
+
│ ├── ui/ # Reusable
|
|
32
|
+
│ └── features/
|
|
33
|
+
├── hooks/
|
|
43
34
|
├── lib/
|
|
44
|
-
│ ├── api.ts
|
|
45
|
-
│ └── storage.ts
|
|
46
|
-
├── store/
|
|
47
|
-
├── constants/
|
|
48
|
-
|
|
49
|
-
├── global.css # Entry point for NativeWind v4
|
|
50
|
-
├── tailwind.config.ts # Tailwind Config (if custom theme needed)
|
|
51
|
-
├── babel.config.js # NativeWind Babel Plugin
|
|
52
|
-
└── app.json # Expo Config
|
|
35
|
+
│ ├── api.ts
|
|
36
|
+
│ └── storage.ts
|
|
37
|
+
├── store/
|
|
38
|
+
├── constants/
|
|
39
|
+
└── app.json
|
|
53
40
|
```
|
|
54
41
|
|
|
55
42
|
---
|
|
56
43
|
|
|
57
|
-
## Navigation Patterns
|
|
44
|
+
## Navigation Patterns
|
|
58
45
|
|
|
59
|
-
| Pattern |
|
|
60
|
-
|
|
61
|
-
| Stack |
|
|
62
|
-
| Tabs | Bottom navigation
|
|
63
|
-
| Drawer | Side
|
|
64
|
-
|
|
|
46
|
+
| Pattern | Use |
|
|
47
|
+
|---------|-----|
|
|
48
|
+
| Stack | Page hierarchy |
|
|
49
|
+
| Tabs | Bottom navigation |
|
|
50
|
+
| Drawer | Side menu |
|
|
51
|
+
| Modal | Overlay screens |
|
|
65
52
|
|
|
66
53
|
---
|
|
67
54
|
|
|
68
|
-
##
|
|
55
|
+
## State Management
|
|
69
56
|
|
|
70
|
-
|
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
| zustand | Global state management (lighter than Redux) |
|
|
77
|
-
| expo-image | Optimized image rendering for performance |
|
|
57
|
+
| Type | Tool |
|
|
58
|
+
|------|------|
|
|
59
|
+
| Local | Zustand |
|
|
60
|
+
| Server | React Query |
|
|
61
|
+
| Forms | React Hook Form |
|
|
62
|
+
| Storage | Expo SecureStore |
|
|
78
63
|
|
|
79
64
|
---
|
|
80
65
|
|
|
81
|
-
##
|
|
66
|
+
## Key Packages
|
|
82
67
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
npx expo install expo-router react-native-safe-area-context react-native-screens expo-link expo-constants expo-status-bar
|
|
92
|
-
```
|
|
68
|
+
| Package | Purpose |
|
|
69
|
+
|---------|---------|
|
|
70
|
+
| expo-router | File-based routing |
|
|
71
|
+
| zustand | Local state |
|
|
72
|
+
| @tanstack/react-query | Server state |
|
|
73
|
+
| nativewind | Tailwind styling |
|
|
74
|
+
| expo-secure-store | Secure storage |
|
|
93
75
|
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
npm install nativewind tailwindcss react-native-reanimated
|
|
97
|
-
```
|
|
76
|
+
---
|
|
98
77
|
|
|
99
|
-
|
|
100
|
-
- Add plugin to `babel.config.js`: `plugins: ["nativewind/babel"]`.
|
|
101
|
-
- Create `global.css` with: `@import "tailwindcss";`.
|
|
102
|
-
- Import `global.css` in `app/_layout.tsx`.
|
|
78
|
+
## Setup Steps
|
|
103
79
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
```
|
|
80
|
+
1. `npx create-expo-app {{name}} -t expo-template-blank-typescript`
|
|
81
|
+
2. `npx expo install expo-router react-native-safe-area-context`
|
|
82
|
+
3. Install state: `npm install zustand @tanstack/react-query`
|
|
83
|
+
4. `npx expo start`
|
|
109
84
|
|
|
110
85
|
---
|
|
111
86
|
|
|
112
|
-
## Best Practices
|
|
87
|
+
## Best Practices
|
|
113
88
|
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
- **API**: Always wrap API calls with TanStack Query, avoid direct calls in `useEffect`.
|
|
89
|
+
- Expo Router for navigation
|
|
90
|
+
- Zustand for local, React Query for server state
|
|
91
|
+
- NativeWind for consistent styling
|
|
92
|
+
- Expo SecureStore for tokens
|
|
93
|
+
- Test on both iOS and Android
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: behavioral-modes
|
|
3
|
-
description: AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
|
|
4
|
-
|
|
3
|
+
description: "AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type."
|
|
4
|
+
risk: unknown
|
|
5
|
+
source: community
|
|
6
|
+
date_added: "2026-02-27"
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# Behavioral Modes - Adaptive AI Operating Modes
|
|
@@ -240,3 +242,6 @@ Users can explicitly request a mode:
|
|
|
240
242
|
/debug why login fails
|
|
241
243
|
/review this pull request
|
|
242
244
|
```
|
|
245
|
+
|
|
246
|
+
## When to Use
|
|
247
|
+
This skill is applicable to execute the workflow or actions described in the overview.
|