🔧 chore: 프로젝트 환경 설정 초기화
- CLAUDE.md 추가: Claude Code용 프로젝트 가이드 문서 - .gitignore 업데이트: Nuxt 프로젝트 표준 항목으로 개선 - .github/workflows/ci.yml 추가: lint + typecheck 자동화 - .mcp.json 추가: context7, playwright 등 MCP 서버 설정
This commit is contained in:
34
.github/workflows/ci.yml
vendored
Normal file
34
.github/workflows/ci.yml
vendored
Normal file
@@ -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
|
||||
28
.gitignore
vendored
28
.gitignore
vendored
@@ -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
|
||||
|
||||
30
.mcp.json
Normal file
30
.mcp.json
Normal file
@@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
58
CLAUDE.md
Normal file
58
CLAUDE.md
Normal file
@@ -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).
|
||||
Reference in New Issue
Block a user