chore: initial scaffolding — Vite + React 19 + Tailwind 4

- 5 pages: Landing, AnalysisStart (MVP 핵심 — 채널 핸들 직접 입력 폼),
  AnalysisLoading (상태 폴링), Report, MarketingPlan
- useAnalysis (POST + 2초 폴링) + useReport (API-only, DEMO_REPORTS 제거)
- 23 report components + types + transform utils (프로토타입에서 이식)
- Tailwind 4 @theme: Pretendard + brand palette (primary-900, accent)
- axios apiClient with X-API-Key interceptor
- Vite proxy /api → localhost:8000 (백엔드 연동)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Opus 4.6 committed 2026-04-17 10:38:42 +09:00
commit 535daa3625
48 files changed
+5755

No files matched your search

+77
View File
@@ -0,0 +1,77 @@
# PORTING_FROM_PROTOTYPE
프로토타입 [`INFINITH/`](../../INFINITH/) → `infinith-web` 이식 현황 + 추가 작업 가이드.
## 이미 이식된 파일
✅ **Types** (그대로 복사):
- `src/types/report.ts`
- `src/types/plan.ts`
- `src/types/studio.ts`
✅ **Lib utilities** (그대로 복사):
- `src/lib/transformReport.ts`
- `src/lib/transformPlan.ts`
✅ **Report components** (23개 파일, 그대로 복사):
- `src/components/report/ChannelOverview.tsx`
- `src/components/report/ClinicSnapshot.tsx`
- `src/components/report/FacebookAudit.tsx`
- `src/components/report/InstagramAudit.tsx`
- `src/components/report/KPIDashboard.tsx`
- `src/components/report/OtherChannels.tsx`
- `src/components/report/ProblemDiagnosis.tsx`
- `src/components/report/ReportHeader.tsx`
- `src/components/report/ReportNav.tsx`
- `src/components/report/RoadmapTimeline.tsx`
- `src/components/report/TransformationProposal.tsx`
- `src/components/report/YouTubeAudit.tsx`
- `src/components/report/sections/*`
- `src/components/report/ui/*`
## 아직 이식 필요 — import 에러 가능성 체크
이식한 컴포넌트들이 프로토타입 특정 경로에 의존하면 첫 빌드 때 에러 발생:
### Checklist (D1 프런트 담당)
- [ ] `npm install` → `npm run dev` → 브라우저 404 대신 500 나오면 에러 메시지 확인
- [ ] 모든 `import '@/...'` 경로가 vite alias 와 일치하는지 검증 (`vite.config.ts` 설정됨)
- [ ] 프로토타입에서만 쓰던 헬퍼가 있으면 이 목록에 추가하고 같이 복사:
- `src/lib/normalizeHandles.ts` (있다면)
- `src/lib/calendarExport.ts` (Plan 페이지에서만 필요)
- `src/hooks/useExportPDF.ts` (PDF 내보내기 — 영업 데모에서만 필요시)
- [ ] Tailwind 4 신택스 — 프로토타입의 `@theme` 값은 `index.css` 에 이미 이식됨
- [ ] 폰트 (Pretendard) — `index.html` 에 CDN 링크 삽입 완료
## 이식 하지 않은 것 — 의도적 제외
- ❌ `src/data/mockReport_*.ts` — MVP 는 API-only. 하드코딩 mock 제거
- ❌ `src/hooks/useReport.ts` 의 `DEMO_REPORTS` 매핑 — API-only 로 재작성됨
- ❌ 스튜디오 페이지 (`src/pages/ContentStudio*.tsx`) — post-MVP
- ❌ 채널 연결 페이지 — post-MVP
- ❌ 성과/배포 페이지 — post-MVP
## 후속 작업 (D5 이후)
- [ ] `ReportPage.tsx` 에 이식한 report 컴포넌트들을 실제 조합 (현재 JSON pre 덤프)
- [ ] `MarketingPlanPage.tsx` 구현 (`useMarketingPlan` 훅 + `transformPlan` 활용)
- [ ] `ScreenshotContext` 가 필요하면 추가 이식
- [ ] PDF 내보내기 필요시 `useExportPDF` 이식
## 재복사 스크립트
필요시 프로토타입 업데이트 pull-in 용:
```bash
# 프로토타입 루트에서
PROTO=/Users/haewonkam/Claude/Agentic\ Marketing/INFINITH
WEB=/Users/haewonkam/Claude/Agentic\ Marketing/infinith-web
cp "$PROTO/src/types/"*.ts "$WEB/src/types/"
cp "$PROTO/src/lib/transformReport.ts" "$WEB/src/lib/"
cp "$PROTO/src/lib/transformPlan.ts" "$WEB/src/lib/"
cp -R "$PROTO/src/components/report/." "$WEB/src/components/report/"
```
**주의:** 프로토타입과 MVP 가 분기한 이후로는 덮어쓰기 금지. `git diff` 확인 후 선별 병합.