nextjs15-init
π―Skillfrom bear2u/my-skills
Generates a fully configured Next.js 15 project with App Router, modern stack, and domain-specific structure in one interactive command.
Installation
npx skills add https://github.com/bear2u/my-skills --skill nextjs15-initSkill Details
Use when user wants to create a new Next.js 15 project (Todo/Blog/Dashboard/E-commerce/Custom domain) with App Router, ShadCN, Zustand, Tanstack Query, and modern Next.js stack
Overview
# NextJS 15 Init Skill
λλ©μΈ κΈ°λ° Next.js 15 νλ‘μ νΈλ₯Ό μμ±νκ³ νλμ μΈ μ€νμΌλ‘ μλ μ€μ ν©λλ€.
Todo, Blog, Dashboard, E-commerce λλ Custom λλ©μΈμ μ ννμ¬ App Router κΈ°λ°μ μμ ν CRUD μ±μ μ¦μ μμ±ν μ μμ΅λλ€.
Quick Start
μ€ν¬ μ€ν μ λ€μ μ 보λ₯Ό μ λ ₯λ°μ΅λλ€:
- ν΄λλͺ (μ: my-todo-app)
- νλ‘μ νΈλͺ (μ: todo-app)
- λλ©μΈ μ ν (Todo/Blog/Dashboard/E-commerce/Custom)
- μ€ν ν리μ (Minimal/Essential/Full Stack/Custom)
κ·Έ ν μλμΌλ‘ λ€μ λ¨κ³κ° μ€νλ©λλ€:
```bash
# 1. Next.js 15 νλ‘μ νΈ μμ± (App Router, TypeScript, Tailwind)
npx create-next-app@latest [ν΄λλͺ ] --typescript --tailwind --app --use-npm
# 2. ν¨ν€μ§ μ€μΉ
npm install
# 3. λλ©μΈλ³ App Router ꡬ쑰 μλ μμ±
# - app/[domain]/ (νμ΄μ§)
# - components/[domain]/ (μ»΄ν¬λνΈ)
# - lib/stores/[domain].ts (Zustand μ€ν μ΄)
# - lib/api/[domain].ts (API λ‘μ§)
# - lib/validations/[domain].ts (Zod μ€ν€λ§)
# 4. μ½λ νμ§ κ²μ¦ (νμ)
npm run lint
# 5. κ°λ° μλ² μ€ν
npm run dev
```
Task Instructions
IMPORTANT: μ΄ μ€ν¬μ λννμΌλ‘ μ§νλ©λλ€.
Step 1: λλ©μΈ λ° νλ‘μ νΈ μ€μ μ§λ¬Έ
λ¨Όμ μ¬μ©μμκ² μ΄λ κ² λ¬Όμ΄λ³΄μΈμ:
"Next.js 15 μ±μ μμ±ν©λλ€. λ€μ μ 보λ₯Ό μλ €μ£ΌμΈμ:
1. λλ©μΈ(μν°ν°) μ ν
μ΄λ€ λλ©μΈμ μ±μ λ§λμκ² μ΅λκΉ?
A) Todo (ν μΌ κ΄λ¦¬)
- νλ: title, description, completed, createdAt, updatedAt
- κΈ°λ₯: CRUD, νν°λ§(μ 체/μ§νμ€/μλ£), 체ν¬λ°μ€ ν κΈ
- API: /api/todos (GET, POST, PATCH, DELETE)
B) Blog (λΈλ‘κ·Έ/CMS)
- νλ: title, content, excerpt, slug, published, createdAt, updatedAt
- κΈ°λ₯: CRUD, κΈ μμ±/μμ , λͺ©λ‘/μμΈ νμ΄μ§, κ²μ
- API: /api/posts (GET, POST, PATCH, DELETE)
C) Dashboard (λμ보λ/μ΄λλ―Ό)
- νλ: ν΅κ³, μ°¨νΈ λ°μ΄ν°, μ¬μ©μ κ΄λ¦¬
- κΈ°λ₯: λ°μ΄ν° μκ°ν, ν μ΄λΈ, νν°λ§, νμ΄μ§λ€μ΄μ
- API: /api/analytics, /api/users
D) E-commerce (μΌνλͺ°)
- νλ: name, price, description, images, stock, category
- κΈ°λ₯: μν λͺ©λ‘/μμΈ, μ₯λ°κ΅¬λ, μ£Όλ¬Έ
- API: /api/products, /api/cart, /api/orders
E) Custom (μ§μ μ μ)
- μν°ν°λͺ κ³Ό νλλ₯Ό μ§μ μ λ ₯
2. νλ‘μ νΈ μ 보
- ν΄λλͺ : νλ‘μ νΈλ₯Ό μμ±ν ν΄λ μ΄λ¦ (κΈ°λ³Έκ°: [λλ©μΈ]-app, μ: todo-app)
- μ΄ ν΄λμ Next.js νλ‘μ νΈκ° μμ±λ©λλ€
- νλ‘μ νΈλͺ : Next.js νλ‘μ νΈ μ΄λ¦ (κΈ°λ³Έκ°: ν΄λλͺ κ³Ό λμΌ)
- package.jsonμ name νλμ μ¬μ©λ©λλ€
3. μ€ν ν리μ μ ν
λ€μ μ€ νλλ₯Ό μ νν΄μ£ΌμΈμ:
A) Essential (κΆμ₯)
- β Next.js 15 (App Router)
- β TypeScript
- β Tailwind CSS
- β ShadCN/ui (UI μ»΄ν¬λνΈ)
- β Zustand (ν΄λΌμ΄μΈνΈ μν κ΄λ¦¬)
- β React Hook Form + Zod (νΌ κ΄λ¦¬ + κ²μ¦)
- β Lucide Icons
- β Tanstack Query μ μΈ
- β Prisma μ μΈ
- β NextAuth μ μΈ
B) Minimal (κ°μ₯ λ¨μ)
- β Next.js 15 (App Router)
- β TypeScript
- β Tailwind CSS
- β ShadCN μ μΈ
- β Zustand μ μΈ
- β React Hook Form μ μΈ
- β κΈ°ν λΌμ΄λΈλ¬λ¦¬ μ μΈ
C) Full Stack (λͺ¨λ κΈ°λ₯)
- β Next.js 15 (App Router)
- β TypeScript
- β Tailwind CSS
- β ShadCN/ui
- β Zustand (ν΄λΌμ΄μΈνΈ μν)
- β Tanstack Query (μλ² μν)
- β React Hook Form + Zod
- β Drizzle ORM (TypeScript-first ORM)
- β Better Auth (μΈμ¦)
- β Framer Motion (μ λλ©μ΄μ )
- β Lucide Icons
D) Custom (μ§μ μ ν)
- κ° κΈ°λ₯μ κ°λ³μ μΌλ‘ μ ν
μ΄λ€ λλ©μΈκ³Ό ν리μ μ μ ννμκ² μ΅λκΉ? (λλ©μΈ: A/B/C/D/E, ν리μ : A/B/C/D)"
Step 2: Custom μ ν μ μΆκ° μ§λ¬Έ
#### 2-1. Custom λλ©μΈ (E) μ ν μ:
- μν°ν°λͺ : μν°ν° μ΄λ¦μ μ λ ₯νμΈμ (μ: Product, Post, User)
- νλ μ μ: κ° νλλ₯Ό μ λ ₯νμΈμ (νμ: νλλͺ :νμ , μ: title:string, price:number, isActive:boolean)
- μ§μ νμ : string, number, boolean, Date
- createdAt, updatedAtμ μλ μΆκ°λ¨
- μ£Όμ κΈ°λ₯: νν°λ§/μ λ ¬ κΈ°μ€μ΄ λ νλλ₯Ό μ ννμΈμ
#### 2-2. Custom μ€ν ν리μ (D) μ ν μ:
λ€μ μ§λ¬Έλ€μ μμ°¨μ μΌλ‘ νμΈμ:
- UI μ»΄ν¬λνΈ: ShadCN/uiλ₯Ό μ¬μ©νμκ² μ΅λκΉ? (μ/μλμ€)
- μν κ΄λ¦¬: Zustandλ₯Ό μ¬μ©νμκ² μ΅λκΉ? (μ/μλμ€)
- μλ² μν: Tanstack Queryλ₯Ό μ¬μ©νμκ² μ΅λκΉ? (μ/μλμ€)
- νΌ κ΄λ¦¬: React Hook Form + Zodλ₯Ό μ¬μ©νμκ² μ΅λκΉ? (μ/μλμ€)
- λ°μ΄ν°λ² μ΄μ€: Drizzle ORMμ μ¬μ©νμκ² μ΅λκΉ? (μ/μλμ€)
- μΈμ¦: Better Authλ₯Ό μ¬μ©νμκ² μ΅λκΉ? (μ/μλμ€)
- μ λλ©μ΄μ : Framer Motionμ μ¬μ©νμκ² μ΅λκΉ? (μ/μλμ€)
Step 3: μ νλ λλ©μΈκ³Ό μ€νμ λ°λΌ νλ‘μ νΈ μμ±
- Next.js 15 νλ‘μ νΈ μμ±:
- μ¬μ©μκ° μ§μ ν ν΄λλͺ μΌλ‘ νλ‘μ νΈ μμ±
- λͺ
λ Ήμ΄: npx create-next-app@latest [ν΄λλͺ
] --typescript --tailwind --app --use-npm
- ν΄λλͺ
κ³Ό νλ‘μ νΈλͺ
μ΄ λ€λ₯Έ κ²½μ°, μμ± ν package.jsonμ name νλλ₯Ό μμ
- μ νλ ν¨ν€μ§ μ€μΉ:
npm install [ν¨ν€μ§λ€]
- ν΄λ ꡬ쑰 μμ±: App Router κΈ°λ° κ΅¬μ‘°
```
app/
βββ (auth)/
βββ [domain]/
βββ api/[domain]/
βββ layout.tsx
βββ page.tsx
components/
βββ ui/ (ShadCN)
βββ [domain]/
βββ layouts/
lib/
βββ db/ (Prisma)
βββ stores/ (Zustand)
βββ api/
βββ utils/
βββ validations/ (Zod)
```
- λλ©μΈλ³ 보μΌλ¬νλ μ΄νΈ μμ±:
A) Todo: title, description, completed, createdAt, updatedAt
- API Routes: /api/todos (CRUD)
- Pages: /todos (리μ€νΈ), /todos/[id] (μμΈ)
- Components: TodoList, TodoItem, TodoForm
- Store: useTodoStore (Zustand)
- Validation: todoSchema (Zod)
B) Blog: title, content, excerpt, slug, published, createdAt, updatedAt
- API Routes: /api/posts (CRUD)
- Pages: /blog (λͺ©λ‘), /blog/[slug] (μμΈ), /blog/write (μμ±)
- Components: PostList, PostCard, PostEditor
- Store: usePostStore (Zustand)
- Validation: postSchema (Zod)
C) Dashboard: ν΅κ³, μ°¨νΈ, μ¬μ©μ κ΄λ¦¬
- API Routes: /api/analytics, /api/users
- Pages: /dashboard (λ©μΈ), /dashboard/users (μ¬μ©μ)
- Components: Chart, StatsCard, DataTable
- Store: useDashboardStore (Zustand)
- Validation: userSchema (Zod)
D) E-commerce: name, price, description, images, stock, category
- API Routes: /api/products, /api/cart, /api/orders
- Pages: /products (λͺ©λ‘), /products/[id] (μμΈ), /cart (μ₯λ°κ΅¬λ)
- Components: ProductCard, ProductGrid, Cart
- Store: useCartStore, useProductStore (Zustand)
- Validation: productSchema, cartSchema (Zod)
E) Custom: μ¬μ©μ μ μ νλ
- API Routes: κΈ°λ³Έ CRUD
- Pages: κΈ°λ³Έ List/Detail
- Components: κΈ°λ³Έ CRUD μ»΄ν¬λνΈ
- Store: κΈ°λ³Έ store
- Validation: κΈ°λ³Έ schema
- ShadCN μ€μΉ λ° κ΅¬μ± (Essential μ΄μ):
```bash
npx shadcn@latest init
npx shadcn@latest add button card input form table
```
- μ½λ κ²μ¦ λ° μ€λ₯ μμ :
a. npm run lint μ€ν
b. λ°κ²¬λ μ€λ₯ μμ :
- Import κ²½λ‘: @/ alias μ¬μ© (tsconfig.json μ€μ )
- TypeScript νμ : λͺ¨λ νμ λͺ μ
- ESLint κ·μΉ: μ¬μ©νμ§ μλ λ³μ, import μ κ±°
- Next.js κ·μΉ: metadata, generateStaticParams λ±
- 'use client' μ§μμ΄: useState, useEffect λ± React Hooks μ¬μ© μ νμΌ μ΅μλ¨μ μΆκ°
c. npm run build λλ pnpm build μ€ν
d. λΉλ μ€λ₯ μμ :
- TypeScript νμ μ€λ₯: νμ λΆμΌμΉ, nullable μ²΄ν¬ λλ½ λ±
- λͺ¨λ import μ€λ₯: κ²½λ‘ νμΈ, ν¨ν€μ§ μ€μΉ νμΈ
- Server/Client Component μ€λ₯: μ μ ν 'use client' μ§μμ΄ μΆκ°
- Dynamic import μ€λ₯: server-only μ½λκ° ν΄λΌμ΄μΈνΈμμ μ¬μ©λμ§ μλλ‘ νμΈ
e. μ¬κ²μ¦: lintμ build λͺ¨λ μ±κ³΅ν λκΉμ§ λ°λ³΅
f. λͺ©ν:
- npm run lint κ²°κ³Όκ° "0 errors"
- npm run build λλ pnpm build μ±κ³΅
β CRITICAL: μ΄ λ¨κ³λ νμμ λλ€. lintμ build λͺ¨λ μ±κ³΅ν΄μΌ λ€μ λ¨κ³λ‘ μ§νν μ μμ΅λλ€.
Step 4: μ΅μ’ κ²μ¦ λ° μλ΄
β CRITICAL: μ΄ λ¨κ³λ νλ‘μ νΈ μλ£μ νμ 쑰건μ λλ€. lintμ build λͺ¨λ μ±κ³΅ν΄μΌ ν©λλ€.
- ESLint κ²μ¦:
```bash
npm run lint
```
- β μ±κ³΅ μμ:
```
β No ESLint warnings or errors
```
- β μ€ν¨ μμ (errorκ° μμΌλ©΄ λ°λμ μμ ):
```
Error: 'useState' is defined but never used
Error: Missing return type on function
```
- νλ‘λμ λΉλ κ²μ¦:
```bash
npm run build
```
λλ pnpm μ¬μ© μ:
```bash
pnpm build
```
- β μ±κ³΅ μμ:
```
β Compiled successfully
β Linting and checking validity of types
β Collecting page data
β Generating static pages
```
- β μ€ν¨ μμ (λΉλ μλ¬ λ°μ μ λ°λμ μμ ):
```
Type error: Property 'xyz' does not exist on type 'ABC'
Error: Module not found: Can't resolve '@/...'
```
μ€μ: λΉλκ° μ€ν¨νλ©΄ TypeScript νμ μ€λ₯λ import κ²½λ‘ λ¬Έμ λ₯Ό μμ νκ³ λ€μ λΉλν΄μΌ ν©λλ€.
- κ²μ¦ κ²°κ³Ό μμ½ (lintμ build λͺ¨λ μ±κ³΅ μ):
```
β Next.js 15 νλ‘μ νΈ μμ± μλ£!
β ν¨ν€μ§ μ€μΉ μλ£ (ShadCN, Zustand, Tanstack Query λ±)
β ESLint κ²μ¦ ν΅κ³Ό (0 errors)
β TypeScript λΉλ μ±κ³΅
β νλ‘λμ λΉλ μλ£
```
- νλ‘μ νΈ μ 보 μ 곡:
- ν΄λλͺ : [μ¬μ©μ μ λ ₯κ°] (μ: my-todo-app)
- νλ‘μ νΈλͺ : [μ¬μ©μ μ λ ₯κ°] (μ: todo-app)
- λλ©μΈ: [μ νλ λλ©μΈ] (Todo/Blog/Dashboard/E-commerce/Custom)
- μ νλ μ€ν: [ν리μ λͺ ] (ShadCN, Zustand, Tanstack Query λ±)
- μ£Όμ κΈ°λ₯: [λλ©μΈ] CRUD, API Routes, νμ μμ μ±
- μμ±λ νμΌ: XXκ° TypeScript νμΌ (app, components, lib)
- μ€ν λ°©λ² μλ΄:
```bash
cd [ν΄λλͺ ]
npm run dev
# http://localhost:3000 μμ νμΈ
```
- λ€μ λ¨κ³ μ μ (μ νμ¬ν, λλ©μΈλ³):
- Todo: νλͺ© μΆκ°/μμ /μμ , νν°λ§(μ 체/μ§νμ€/μλ£), μλ£ ν κΈ
- Blog: κΈ μμ±/μμ , λͺ©λ‘/μμΈ νμ΄μ§, κ²μ, νκ·Έ
- Dashboard: λ°μ΄ν° μκ°ν, μ°¨νΈ, μ¬μ©μ κ΄λ¦¬, νν°λ§
- E-commerce: μν λͺ©λ‘/μμΈ, μ₯λ°κ΅¬λ, μ£Όλ¬Έ, μΉ΄ν κ³ λ¦¬
- 곡ν΅: TypeScript νμ μμ μ±, API ν μ€νΈ, λ°°ν¬ (Vercel)
Core Principles
- App Router: Next.js 15 App Router κΈ°λ° κ΅¬μ‘°
- νμ μμ μ±: TypeScript Strict Mode
- μ»΄ν¬λνΈ μ¬μ¬μ©: ShadCN/ui νμ©
- μν κ΄λ¦¬: Zustand (ν΄λΌμ΄μΈνΈ), Tanstack Query (μλ²)
- μ½λ νμ§: ESLint + Prettier
- νΌ κ²μ¦: React Hook Form + Zod
Reference Files
[references/setup-guide.md](references/setup-guide.md) - μμ ν κ°μ΄λ
- κΈ°λ³Έ μ μ (λλ©μΈλ³ CRUD, API Routes, μ»΄ν¬λνΈ)
- μ ν μ΅μ : ShadCN, Zustand, Tanstack Query, Drizzle ORM, Better Auth, Framer Motion
Notes
- λνν μ€ν¬: μ¬μ©μμκ² λλ©μΈκ³Ό ν리μ μ νμ ν΅ν΄ λ§μΆ€ν μ± κ΅¬μ±
- λλ©μΈ μ§μ: Todo, Blog, Dashboard, E-commerce, Custom (μ¬μ©μ μ μ)
- ν리μ μ 곡: Full Stack, Essential, Minimal, Custom
- μ ν κ°λ₯ κΈ°λ₯: ShadCN, Zustand, Tanstack Query, Drizzle ORM, Better Auth, Framer Motion
- κΈ°λ³Έ ν¬ν¨: Next.js 15 (App Router), TypeScript, Tailwind CSS, ESLint
- νλ«νΌ: Web (Vercel μ΅μ ν)
- νμ§ λ³΄μ¦:
- λͺ¨λ νλ‘μ νΈλ npm run lint ν΅κ³Ό νμ
- TypeScript Strict Mode
- νμ μμ μ± λ³΄μ₯
- App Router ν¨ν΄ μ€μ
- λλ©μΈλ³ μ΅μ νλ UI/UX
More from this repository10
Generates structured, customizable slash commands for Claude Code, enabling quick and precise AI interactions tailored to specific project needs.
Generates high-converting landing pages with exceptional design using Next.js 14+, ShadCN UI, and a proven 11-element conversion framework that creates memorable brand experiences.
Automatically documents AI code changes and provides real-time web-based visualization of code modifications.
Analyzes project context to automatically expand simple user requests into detailed, comprehensive requirements for more precise AI interactions.
Generates Instagram-style card news series by creating visually appealing 600x600 cards with user-specified topic, colors, and optional background images.
Removes Gemini logos, watermarks, and AI-generated image markers using precise OpenCV inpainting techniques.
Generates comprehensive, conversion-optimized landing page design and content strategies with actionable recommendations for creating visually appealing and high-performing web pages.
flutter-init skill from bear2u/my-skills
Generates structured, high-quality design prompts for AI image generation by analyzing project context and design requirements.
Orchestrates a dual-AI engineering workflow where Claude Code plans and implements while Codex validates and reviews code iteratively.