Phase 1: 프로젝트 초기화
새 프로젝트 시작 시 환경 설정 관련 명령어:
01-project-init.md|06-template.md
1-1. 새 프로젝트 전체 초기화
프로젝트 초기화해줘.
생성할 것:
1. CLAUDE.md (프로젝트 루트)
2. docs/ 폴더 구조
- docs/commands/ (명령어 모음)
- docs/rules/ (_index.md, git.md, coding.md, file-management.md, resource-requests.md, image-files.md)
- docs/status/current.md, history/
- docs/handover/README.md, archive/
- docs/logs/YYYY-MM.md
- docs/locks/README.md
3. public/images/ 폴더 구조 (icons, og, hero, ui, content)
4. .gitignore (.env, .env.local, nul, node_modules 등)
5. .env.example
1-2. 기존 프로젝트에 체계만 추가
이 프로젝트에 docs 관리 체계 추가해줘.
기존 파일은 건드리지 말고, docs/ 폴더 구조만 만들어줘.
기존 public/images/ 있으면 그 구조 유지해줘.
1-3. 템플릿 + 인증 한번에 적용
프로젝트 초기화 + Supabase 인증 템플릿 적용해줘.
1. 기본 초기화 (docs, CLAUDE.md, .gitignore 등)
2. ~/dev-templates/auth/supabase/ → src/lib/auth/ 복사
3. ~/dev-templates/auth/components/ → src/components/auth/ 복사
4. ~/dev-templates/ui/ → src/components/ui/ 복사
5. ~/dev-templates/api/fetcher.ts → src/lib/api/ 복사
1-4. Supabase 인증만 추가 (기존 프로젝트)
~/dev-templates/auth/supabase/에서 인증 코드 복사해서 적용해줘.
복사할 파일:
- client.ts → src/lib/auth/client.ts
- server.ts → src/lib/auth/server.ts
- middleware.ts → src/lib/auth/middleware.ts
- actions.ts → src/lib/auth/actions.ts
~/dev-templates/auth/components/에서:
- SignUpForm.tsx → src/components/auth/SignUpForm.tsx
- LoginForm.tsx → src/components/auth/LoginForm.tsx
적용 후 import 경로 프로젝트에 맞게 수정해줘.
1-5. 공통 UI 컴포넌트 추가
~/dev-templates/ui/에서 공통 컴포넌트 복사해줘.
- Button.tsx → src/components/ui/Button.tsx
- Input.tsx → src/components/ui/Input.tsx
적용 후 import 경로 확인해줘.
1-6. API fetcher 추가
~/dev-templates/api/fetcher.ts → src/lib/api/fetcher.ts 복사해줘.
사용법도 간단히 알려줘.
1-7. API 키 설정 요청
Supabase API 키가 필요해.
요청 형식으로 알려줘.
Claude Code가 출력하는 형식:
🔑 인증 정보 필요
서비스: Supabase
필요한 값: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY
설정 위치: .env.local
사용자 조치:
1. Supabase 대시보드 접속 (https://supabase.com/dashboard)
2. 프로젝트 선택 → Settings → API
3. Project URL과 anon key 복사
4. .env.local에 아래 형식으로 추가:
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJxxx...
완료되면 알려주세요.
📁 초기화 후 생성되는 구조
my-project/
├── CLAUDE.md ← 프로젝트 규칙
├── docs/
│ ├── commands/ ← 명령어 모음 (12개)
│ ├── rules/ ← 상세 규칙 (5개)
│ ├── status/current.md ← 현재 상태
│ ├── handover/ ← 인수인계서
│ ├── logs/ ← 작업 로그
│ └── locks/ ← 파일 잠금
├── public/images/
│ ├── icons/ ← 파비콘, 아이콘
│ ├── og/ ← OG 이미지
│ ├── hero/ ← 히어로 배경
│ ├── ui/ ← UI 이미지
│ └── content/ ← 콘텐츠 이미지
├── .gitignore
├── .env.example
└── src/
├── lib/auth/ ← (인증 템플릿 적용 시)
├── components/auth/ ← (인증 템플릿 적용 시)
└── components/ui/ ← (UI 템플릿 적용 시)