Go to file
Haewon Kam 36d2f1cf49 feat: archive Firecrawl screenshots to Supabase Storage (permanent URLs)
## 문제
Firecrawl이 반환하는 스크린샷 URL은 GCS Signed URL로 7일 후 만료.
리포트에 저장된 이미지 URL이 일주일 후 전부 깨짐 (403 Access Denied).

## 해결
collect-channel-data의 Vision 단계에 아카이빙 스텝 추가.
캡처 직후 base64(이미 메모리에 있음)를 Supabase Storage에 영구 업로드.

### 처리 흐름 (변경 후)
1. captureAllScreenshots() → GCS URL + base64 반환 (기존)
2. [신규] archiveTasks: base64 → Supabase Storage 업로드 (병렬)
   - 경로: screenshots/{reportId}/{screenshotId}.png
   - 성공 시 ss.url을 영구 Supabase URL로 in-place 교체
   - 실패 시 non-fatal — GCS URL fallback으로 Vision 분석 계속 진행
3. runVisionAnalysis() — base64 여전히 메모리에 있어 정상 실행 (기존)
4. channelData.screenshots 저장 시 영구 URL 사용 (자동)
   - archived: true/false 플래그 추가 (모니터링용)

### 비용/성능
- 추가 API 호출 없음 (base64 이미 캡처 시 다운로드됨)
- 업로드: ~1-3초/장 (병렬), 5MB limit, PNG/JPEG/WebP 허용
- 버킷: public (URL만 있으면 열람) + 서비스 역할만 업로드 가능

## 마이그레이션
supabase/migrations/20260407_screenshots_storage.sql
- screenshots 버킷 생성 (public, 5MB limit)
- RLS: public read / service_role write
- delete_old_screenshots() 함수: 90일 이상 된 파일 정리 (pg_cron 연동 가능)

## 타입
ScreenshotResult.archived?: boolean 필드 추가 (영구 vs GCS fallback 구분)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 09:51:31 +09:00
.claude feat: add API Dashboard + filled icons + pipeline improvements 2026-04-06 14:59:31 +09:00
.vscode feat: add API Dashboard + filled icons + pipeline improvements 2026-04-06 14:59:31 +09:00
data/clinic-registry feat: clinic registry DB + pipeline audit P0 fixes 2026-04-07 09:33:25 +09:00
doc docs: update DB V3 checklist — Phase 1-4 implemented 2026-04-05 00:54:52 +09:00
docs feat: clinic registry DB + pipeline audit P0 fixes 2026-04-07 09:33:25 +09:00
public/assets/clients/view-clinic/screenshots feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
reference feat: clinic registry DB + pipeline audit P0 fixes 2026-04-07 09:33:25 +09:00
scripts feat: clinic registry DB + pipeline audit P0 fixes 2026-04-07 09:33:25 +09:00
src feat: clinic registry DB + pipeline audit P0 fixes 2026-04-07 09:33:25 +09:00
supabase feat: archive Firecrawl screenshots to Supabase Storage (permanent URLs) 2026-04-07 09:51:31 +09:00
.env.example feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
.gitignore feat: add API Dashboard + filled icons + pipeline improvements 2026-04-06 14:59:31 +09:00
.vercelignore feat: add API Dashboard + filled icons + pipeline improvements 2026-04-06 14:59:31 +09:00
CLAUDE.md feat: 데이터 검증 페이지 + 병원 통합 프로필 데모 + 문서 정리 2026-03-30 15:57:53 +09:00
Medical Marketing Intelligence Report Prompt_01.28.2026.md feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
PRD.md feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
README.md feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
extracted_marketing_text.md feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
index.html feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
metadata.json feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
package-lock.json feat: real API integration + YouTube Data API v3 + progressive loading 2026-04-02 10:57:14 +09:00
package.json feat: real API integration + YouTube Data API v3 + progressive loading 2026-04-02 10:57:14 +09:00
tsconfig.json feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
vercel.json feat: Hero section copy & design refinement 2026-03-29 15:23:43 +09:00
vite.config.ts feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00
뷰성형외과_Marketing_Intelligence_Report.md feat: INFINITH Marketing Platform — Phase 1 MVP 2026-03-24 16:48:11 +09:00

README.md

GHBanner

Run and deploy your AI Studio app

This contains everything you need to run your app locally.

View your app in AI Studio: https://ai.studio/apps/d446f5f5-e089-404a-93ce-32a72f2f5108

Run Locally

Prerequisites: Node.js

  1. Install dependencies: npm install
  2. Set the GEMINI_API_KEY in .env.local to your Gemini API key
  3. Run the app: npm run dev