commit 3c5eb87784ee59843efcb1c04d15c32ac313bc7e Author: NEW_GIL_HOME\hyeon Date: Mon Mar 2 19:42:50 2026 +0900 feat: initialize Next.js v15 starter kit with Korean support Set up Next.js v15 starter kit with App Router architecture including: - TailwindCSS v4 with CSS-based config and OKLCH color system - shadcn/ui components (New York style) with Lucide icons - next-themes for light/dark/system theme toggle (Korean labels) - Layout components: navbar, footer, theme-toggle - Import aliases and TypeScript configuration Co-Authored-By: Claude Sonnet 4.6 diff --git a/.claude/commands/commit.md b/.claude/commands/commit.md new file mode 100644 index 0000000..c550e27 --- /dev/null +++ b/.claude/commands/commit.md @@ -0,0 +1 @@ +현재 변경사항을 분석하고 커밋을 생성해주세요: diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..11cdfbe --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,10 @@ +{ + "permissions": { + "allow": [ + "WebFetch", + "Bash" + ], + "deny": [], + "ask": [] + } +} \ No newline at end of file diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..1ce6fc4 --- /dev/null +++ b/.env.example @@ -0,0 +1,18 @@ +# Next.js 환경변수 예제 파일 +# 이 파일을 .env.local로 복사한 후 실제 값을 입력하세요 + +# 애플리케이션 설정 +NEXT_PUBLIC_APP_NAME="Next.js Starter Kit" +NEXT_PUBLIC_APP_DESCRIPTION="Next.js v15, TypeScript, TailwindCSS v4, shadcn/ui로 구성된 스타터 킷" + +# 데이터베이스 (예제) +# DATABASE_URL="postgresql://username:password@localhost:5432/mydb" + +# 인증 (예제) +# NEXTAUTH_SECRET="your-secret-key" +# NEXTAUTH_URL="http://localhost:3000" + +# API 키 (예제) +# OPENAI_API_KEY="your-openai-api-key" +# STRIPE_SECRET_KEY="your-stripe-secret-key" +# STRIPE_PUBLISHABLE_KEY="your-stripe-publishable-key" \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7b8da95 --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files (can opt-in for committing if needed) +.env* +!.env.example + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..fdd334d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,83 @@ +# CLAUDE.md + +이 파일은 이 레포지토리에서 Claude Code (claude.ai/code)가 작업할 때 필요한 지침을 제공합니다. + +## 개발 명령어 + +```bash +# Turbopack을 사용한 개발 서버 실행 +npm run dev + +# Turbopack을 사용한 프로덕션 빌드 +npm run build + +# 프로덕션 서버 실행 +npm run start + +# 린트 검사 +npm run lint + +# TypeScript 타입 체크 +npx tsc --noEmit + +# shadcn/ui 컴포넌트 추가 +npx shadcn@latest add [component-name] +``` + +## 아키텍처 개요 + +이 프로젝트는 한국어를 지원하는 **Next.js v15 스타터 킷**으로, App Router 아키텍처를 사용하여 구축되었습니다. 주요 특징: + +### TailwindCSS v4 설정 +- **tailwind.config 파일 없음** - CSS 기반 설정 사용 +- `app/globals.css`에 `@theme inline` 블록으로 스타일 정의 +- 커스텀 다크 모드 variant: `@custom-variant dark (&:is(.dark *))` +- PostCSS는 `@tailwindcss/postcss` 플러그인만 사용하도록 설정 +- 추가 애니메이션을 위한 `tw-animate-css` 사용 +- 라이트/다크 테마 모두에 OKLCH 값을 사용하는 색상 시스템 + +### 컴포넌트 아키텍처 +- **shadcn/ui 컴포넌트**: `components/ui/`에 위치 (New York 스타일, RSC 활성화, Lucide 아이콘) +- **레이아웃 컴포넌트**: `components/layout/`에 위치 (navbar, footer, theme-toggle) +- **프로바이더**: `components/providers/`에 위치 (테마 프로바이더 래퍼) +- **유틸리티 함수**: `lib/utils.ts`에 위치 (클래스 병합을 위한 cn 함수) +- **컴포넌트 설정**: 커스텀 별칭이 포함된 `components.json`을 통해 관리 + +### 테마 시스템 +- 시스템 감지가 활성화된 `next-themes` 사용 +- `attribute="class"` 및 `defaultTheme="system"`으로 설정된 ThemeProvider +- 한국어 라벨(라이트, 다크, 시스템)로 라이트/다크/시스템 옵션을 제공하는 테마 토글 컴포넌트 +- 테마 지속성을 위해 루트 레이아웃에 `suppressHydrationWarning` 포함 + +### 레이아웃 구조 +- 루트 레이아웃(`app/layout.tsx`)이 모든 페이지를 ThemeProvider로 감쌈 +- 고정된 navbar와 footer, 메인 콘텐츠는 flex-1 컨테이너에 배치 +- HTML에 한국어 설정(`lang="ko"`) +- CSS 변수를 사용하는 Geist 폰트(sans 및 mono) + +### 스타일링 패턴 +- 일관된 중앙 정렬을 위해 모든 컨테이너에 `mx-auto max-w-screen-2xl px-4` 사용 +- OKLCH 색상 값으로 라이트/다크 모드 간 더 나은 지각적 균일성 제공 +- `cn()` 유틸리티로 클래스 조합하는 shadcn/ui 패턴을 따르는 컴포넌트 +- Border radius 시스템: 기본값 `10px`로 `--radius-sm`부터 `--radius-xl`까지 + +## 환경 설정 + +환경변수를 위해 `.env.example`을 `.env.local`로 복사하세요. 스타터 킷에는 일반적인 서비스(데이터베이스, 인증, API)에 대한 샘플 설정이 포함되어 있습니다. + +## Import 별칭 + +- `@/components` → `./components` +- `@/lib` → `./lib` +- `@/app` → `./app` +- `@/ui` → `./components/ui` +- `@/hooks` → `./hooks` +- `@/` → `./` (루트) + +## 한국어 지원 + +이 프로젝트는 한국어를 위해 설정되었습니다: +- HTML lang 속성을 "ko"로 설정 +- 한국어 라벨(라이트, 다크, 시스템)이 포함된 테마 토글 +- 한국어 설명이 포함된 환경변수 +- 한국어로 작성된 README 및 문서 \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6087769 --- /dev/null +++ b/README.md @@ -0,0 +1,127 @@ +# Next.js Starter Kit + +현대적인 웹 개발을 위한 완전한 스타터 킷입니다. + +## ✨ 기술 스택 + +- **[Next.js v15](https://nextjs.org)** - React 기반 풀스택 프레임워크 +- **[TypeScript](https://www.typescriptlang.org)** - 타입 안전성을 위한 언어 +- **[TailwindCSS v4](https://tailwindcss.com)** - 유틸리티 기반 CSS 프레임워크 +- **[shadcn/ui](https://ui.shadcn.com)** - 재사용 가능한 UI 컴포넌트 +- **[Lucide React](https://lucide.dev)** - 아름다운 아이콘 라이브러리 +- **[next-themes](https://github.com/pacocoursey/next-themes)** - 다크모드 지원 + +## 🚀 빠른 시작 + +### 1. 의존성 설치 + +```bash +npm install +# 또는 +yarn install +# 또는 +pnpm install +``` + +### 2. 환경변수 설정 + +```bash +cp .env.example .env.local +``` + +`.env.local` 파일을 편집하여 필요한 환경변수를 설정하세요. + +### 3. 개발 서버 실행 + +```bash +npm run dev +# 또는 +yarn dev +# 또는 +pnpm dev +``` + +[http://localhost:3000](http://localhost:3000)에서 결과를 확인하세요. + +## 📁 프로젝트 구조 + +``` +├── app/ # Next.js 앱 라우터 +│ ├── globals.css # 전역 스타일 +│ ├── layout.tsx # 루트 레이아웃 +│ └── page.tsx # 홈페이지 +├── components/ # React 컴포넌트 +│ ├── ui/ # shadcn/ui 컴포넌트 +│ ├── layout/ # 레이아웃 컴포넌트 +│ └── providers/ # Context 프로바이더 +├── lib/ # 유틸리티 함수 +└── public/ # 정적 파일 +``` + +## 🎨 UI 컴포넌트 + +이 프로젝트는 shadcn/ui를 사용합니다. 새로운 컴포넌트를 추가하려면: + +```bash +npx shadcn@latest add [component-name] +``` + +사용 가능한 컴포넌트: +- Button, Card, Input, Label +- Navigation Menu, Dropdown Menu +- Badge 등 + +## 🌙 다크모드 + +다크모드가 기본적으로 설정되어 있습니다: +- 시스템 테마 자동 감지 +- 라이트/다크/시스템 모드 전환 +- 테마 상태 유지 + +## 📝 스크립트 + +- `npm run dev` - 개발 서버 실행 +- `npm run build` - 프로덕션 빌드 +- `npm run start` - 프로덕션 서버 실행 +- `npm run lint` - ESLint 실행 + +## 🔧 사용자 정의 + +### 테마 색상 변경 + +`app/globals.css`에서 CSS 변수를 수정하여 테마를 사용자 정의할 수 있습니다. + +### 컴포넌트 추가 + +`components/` 디렉토리에 새로운 컴포넌트를 추가하세요. shadcn/ui 컴포넌트는 `components/ui/`에 자동으로 설치됩니다. + +## 🚀 배포 + +### Vercel (권장) + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new) + +### 기타 플랫폼 + +- **Netlify**: `npm run build && npm run export` +- **Docker**: Dockerfile 포함 +- **정적 호스팅**: `npm run build && npm run export` + +## 📚 학습 자료 + +- [Next.js 문서](https://nextjs.org/docs) +- [TailwindCSS 문서](https://tailwindcss.com/docs) +- [shadcn/ui 문서](https://ui.shadcn.com) +- [TypeScript 문서](https://www.typescriptlang.org/docs) + +## 🤝 기여하기 + +1. 이 저장소를 포크합니다 +2. 기능 브랜치를 생성합니다 (`git checkout -b feature/amazing-feature`) +3. 변경사항을 커밋합니다 (`git commit -m '멋진 기능 추가'`) +4. 브랜치에 푸시합니다 (`git push origin feature/amazing-feature`) +5. Pull Request를 생성합니다 + +## 📄 라이선스 + +MIT 라이선스 하에 배포됩니다. 자세한 내용은 `LICENSE` 파일을 참조하세요. diff --git a/app/favicon.ico b/app/favicon.ico new file mode 100644 index 0000000..718d6fe Binary files /dev/null and b/app/favicon.ico differ diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 0000000..dc98be7 --- /dev/null +++ b/app/globals.css @@ -0,0 +1,122 @@ +@import "tailwindcss"; +@import "tw-animate-css"; + +@custom-variant dark (&:is(.dark *)); + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --font-sans: var(--font-geist-sans); + --font-mono: var(--font-geist-mono); + --color-sidebar-ring: var(--sidebar-ring); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar: var(--sidebar); + --color-chart-5: var(--chart-5); + --color-chart-4: var(--chart-4); + --color-chart-3: var(--chart-3); + --color-chart-2: var(--chart-2); + --color-chart-1: var(--chart-1); + --color-ring: var(--ring); + --color-input: var(--input); + --color-border: var(--border); + --color-destructive: var(--destructive); + --color-accent-foreground: var(--accent-foreground); + --color-accent: var(--accent); + --color-muted-foreground: var(--muted-foreground); + --color-muted: var(--muted); + --color-secondary-foreground: var(--secondary-foreground); + --color-secondary: var(--secondary); + --color-primary-foreground: var(--primary-foreground); + --color-primary: var(--primary); + --color-popover-foreground: var(--popover-foreground); + --color-popover: var(--popover); + --color-card-foreground: var(--card-foreground); + --color-card: var(--card); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); +} + +:root { + --radius: 0.625rem; + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); + --card: oklch(1 0 0); + --card-foreground: oklch(0.145 0 0); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.145 0 0); + --primary: oklch(0.205 0 0); + --primary-foreground: oklch(0.985 0 0); + --secondary: oklch(0.97 0 0); + --secondary-foreground: oklch(0.205 0 0); + --muted: oklch(0.97 0 0); + --muted-foreground: oklch(0.556 0 0); + --accent: oklch(0.97 0 0); + --accent-foreground: oklch(0.205 0 0); + --destructive: oklch(0.577 0.245 27.325); + --border: oklch(0.922 0 0); + --input: oklch(0.922 0 0); + --ring: oklch(0.708 0 0); + --chart-1: oklch(0.646 0.222 41.116); + --chart-2: oklch(0.6 0.118 184.704); + --chart-3: oklch(0.398 0.07 227.392); + --chart-4: oklch(0.828 0.189 84.429); + --chart-5: oklch(0.769 0.188 70.08); + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.205 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.205 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.922 0 0); + --primary-foreground: oklch(0.205 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.269 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.269 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.704 0.191 22.216); + --border: oklch(1 0 0 / 10%); + --input: oklch(1 0 0 / 15%); + --ring: oklch(0.556 0 0); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.556 0 0); +} + +@layer base { + * { + @apply border-border outline-ring/50; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..4ff1d87 --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,46 @@ +import type { Metadata } from "next"; +import { Geist, Geist_Mono } from "next/font/google"; +import "./globals.css"; +import { ThemeProvider } from "@/components/providers/theme-provider"; +import { Navbar } from "@/components/layout/navbar"; +import { Footer } from "@/components/layout/footer"; + +const geistSans = Geist({ + variable: "--font-geist-sans", + subsets: ["latin"], +}); + +const geistMono = Geist_Mono({ + variable: "--font-geist-mono", + subsets: ["latin"], +}); + +export const metadata: Metadata = { + title: "Next.js Starter Kit", + description: "Next.js v15, TypeScript, TailwindCSS v4, shadcn/ui로 구성된 스타터 킷입니다.", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + + +
{children}
+