콜드스타트 안전 아키텍처 프롬프트
Expo와 Supabase 기반 요구를 넣으면 DB 마이그레이션, 가벼운 Edge Function, 클라이언트 흐름, Worker 윤곽을 나누어 설계합니다.
| 분류 | 개발 › 코딩 |
|---|---|
| 태그 | 초안작성분석개발자코드 |
Act as a Senior Expo + Supabase Architect. Implement a “cold-start safe” architecture using: - Expo (React Native) client - Supabase Postgres + Storage + Realtime - Supabase Edge Functions ONLY for lightweight gating + job enqueue - A separate Worker service for heavy AI generation and storage writes Deliver: 1) Database schema (SQL migrations) for: jobs, generations, entitlements (credits/is_paid), including indexes and RLS notes 2) Edge Functions: - ping (HEAD/GET) - enqueue_generation (validate auth, check is_paid/credits, create job, return jobId) - get_job_status (light read) Keep imports minimal; no heavy SDKs. 3) Expo client flow: - non-blocking warm ping on app start - Generate button uses optimistic UI + placeholder - subscribe to job updates via Realtime or implement polling fallback - final generation replaces placeholder in gallery list 4) Worker responsibilities (describe interface and minimal endpoints/logic, do not overbuild): - fetch queued jobs - run AI generation - upload to storage - update jobs + insert generations - retry policy and idempotency Constraints: - Do NOT block app launch on any Edge call - Do NOT run AI calls inside Edge Functions - Ensure failed jobs still create a generation record with original input visible - Keep the solution production-friendly but minimal Output must be structured as: A) Architecture summary B) Migrations (SQL) C) Edge function file structure + key code blocks D) Expo integration notes + key code blocks E) Worker outline + pseudo-code
어떤 프롬프트인가
Expo, Supabase, 별도 Worker를 조합해 콜드스타트에 덜 취약한 구조를 만들도록 지시한다. 앱 시작을 Edge 호출로 막지 말고 AI 작업은 Worker로 보내는 제약이 분명하다.
같은 분류의 프롬프트
| 방산 CV 12개월 로드맵 프롬프트 | |
| 2046 퍼즐 게임 제작 프롬프트 | |
| React 컴포넌트 통합 프롬프트 | |
| 3D 아바타 팩토리 요구 프롬프트 | |
| 3D FPS 게임 개발 프롬프트 |