본문 바로가기
코딩 · 개발무료 · 원문 전체 공개원문 · prompts.chat

Expo+Supabase 콜드 스타트 대응

Expo와 Supabase 환경에서 엣지 함수와 워커를 분리해 콜드 스타트 영향을 최소화합니다.

원제 · Cold Start Safe Architecture

분야
코딩 · 개발
추천 툴
어느 AI든(공통)
형식 기준 추천
실행 결과
아직 없음
빈칸
없음
그대로 붙여 넣어 쓰는 프롬프트
원문
영어 · 약 240단어
제목 · 설명 한국어 번역
개선안
없음
이용 조건
CC0 · 자유 이용
prompts.chat 공개 모음
쓰인 기법
—
프롬프트 원문

출처에 올라온 그대로

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

출처 · prompts.chat 공개 프롬프트 모음 · 작성 Tugrul Erdem — CC0(저작권 포기)로 공개된 원문을 그대로 싣습니다. 한국어 제목 · 설명은 AI 번역입니다.
내용이 틀렸거나 권리 문제가 있나요?

같은 분야 프롬프트코딩 · 개발

더 보기 ›