From 4270b5413a3faad41d16e398a87d6af41f3fee08 Mon Sep 17 00:00:00 2001 From: hyeonggil <> Date: Sun, 15 Mar 2026 15:03:12 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EC=A0=9D=ED=8A=B8=20=ED=99=98=EA=B2=BD=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CLAUDE.md 추가: Claude Code용 프로젝트 가이드 문서 - .gitignore 업데이트: Nuxt 프로젝트 표준 항목으로 개선 - .github/workflows/ci.yml 추가: lint + typecheck 자동화 - .mcp.json 추가: context7, playwright 등 MCP 서버 설정 --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++ .gitignore | 28 +++++++++++++++---- .mcp.json | 30 +++++++++++++++++++++ CLAUDE.md | 58 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 145 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .mcp.json create mode 100644 CLAUDE.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..58d9ce9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: ci + +on: push + +jobs: + ci: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [22] + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Install node + uses: actions/setup-node@v6 + with: + node-version: ${{ matrix.node }} + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Lint + run: pnpm run lint + + - name: Typecheck + run: pnpm run typecheck diff --git a/.gitignore b/.gitignore index 513433c..4a7f73a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,24 @@ -lotto_log.json -lotto_auto.log -launchd.log -__pycache__/ -*.pyc +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + +# Logs +logs +*.log + +# Misc .DS_Store +.fleet +.idea + +# Local env files +.env +.env.* +!.env.example diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 0000000..24985bc --- /dev/null +++ b/.mcp.json @@ -0,0 +1,30 @@ +{ + "mcpServers": { + "context7": { + "type": "http", + "url": "https://mcp.context7.com/mcp" + }, + "playwright": { + "type": "stdio", + "command": "cmd", + "args": ["/c", "npx", "@playwright/mcp@latest"], + "env": {} + }, + "sequential-thinking": { + "type": "stdio", + "command": "cmd", + "args": [ + "/c", + "npx", + "-y", + "@modelcontextprotocol/server-sequential-thinking" + ], + "env": {} + }, + "shadcn": { + "type": "stdio", + "command": "cmd", + "args": ["/c", "npx", "shadcn@latest", "mcp"] + } + } +} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..961f8bb --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,58 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## 프로젝트 개요 + +캠핑 장비 관리 앱 — 구매 이력, 중고 판매 관리, AI 캠핑 어시스턴트 기능을 제공한다. + +## 주요 명령어 + +```bash +pnpm dev # 개발 서버 실행 (http://localhost:3000) +pnpm build # 프로덕션 빌드 +pnpm preview # 프로덕션 빌드 미리보기 +pnpm lint # ESLint 실행 +pnpm typecheck # TypeScript 타입 체크 +``` + +## 기술 스택 (프로젝트 특정) + +- **UI**: `@nuxt/ui` v4 (글로벌 CLAUDE.md의 shadcn-vue 대신 Nuxt UI 사용) +- **인증/DB**: Supabase (`@nuxtjs/supabase`) — magic link + Google OAuth +- **AI**: Anthropic Claude Sonnet 4.6 (`@anthropic-ai/sdk`) — streaming 방식 +- **아이콘**: Lucide + Simple Icons (Iconify) +- **검증**: Zod + +## 아키텍처 + +### 데이터 흐름 + +- **인증**: `@nuxtjs/supabase` 모듈이 자동으로 세션을 관리. `app/middleware/auth.ts`가 미인증 사용자를 `/login`으로 리다이렉트. +- **DB 접근**: 컴포저블(`useAiChat`, `usePurchases`, `useUsedSales`)에서 `useSupabaseClient()`로 직접 Supabase 쿼리. +- **AI 채팅**: 클라이언트 → `POST /api/ai/chat` → 서버에서 Anthropic SDK로 스트리밍 응답. + +### 주요 타입 + +- `app/types/purchase.ts`: `EquipmentCategory`, `Purchase`, `PurchaseInsert` +- `app/types/used-sale.ts`: `SaleStatus`, `SalePlatform`, `UsedSale`, `UsedSaleInsert` +- `app/types/ai.ts`: `AiConversation`, `AiMessage` + +### 환경 변수 + +- `ANTHROPIC_API_KEY` — `runtimeConfig.anthropicApiKey`로 서버에서만 접근 (server-side only) +- Supabase 설정은 `@nuxtjs/supabase` 모듈이 `SUPABASE_URL`, `SUPABASE_KEY` 환경변수를 자동으로 읽음 + +### DB 스키마 + +`supabase-schema.sql` 참조. Supabase 프로젝트에 직접 적용 필요. + +### UI 테마 + +- Primary 컬러: `green` (커스텀 팔레트 정의됨, `app/assets/css/main.css`) +- Neutral: `slate` +- 설정 위치: `app/app.config.ts` + +## CI + +`.github/workflows/ci.yml` — push 시 lint + typecheck 자동 실행 (Node 22, pnpm).