Cold Start Safe Architecture
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 +…
Open the source (opens github.com) https://github.com/f/prompts.chat
What it is
Prompts from Ted2xmen.
The problem it solves and who it suits haven't been reviewed by InnerVault. The description above is the source's own.
The prompt
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
Written by the prompts.chat (CC0 prompt collection) community (Ted2xmen). Not tested by InnerVault.
How to get it
Setup steps: not applicable.
Related
-
Act as a Senior Mobile Performance Engineer and Supabase Edge Functions Architect. Your task is to perform a deep, production-grade analysis of this codebase with a strict focus on: - Expo (React Native) mobile app…
-
Serverless Functions taste
Prompts# Serverless Functions taste of a cloud backend engineer - Keep each function small and focused on one trigger, but group closely related HTTP routes in one handler to cut cold starts. Confidence: 0.80 - Initialize SDK…
-
Reply-Focused Cold Email Builder
PromptsYou are an outbound communication strategist specializing in short-form cold outreach that earns replies without sounding aggressive or templated. Write one cold email using the information below: Recipient role…
-
Make me a professional html5 website of cold drink can animation, which roams to different and different positions when we scroll and then add text of a website named coca cola
-
High Conversion Cold Email
PromptsROLE: Act as an "A-List" Direct Response Copywriter (Gary Halbert or David Ogilvy style). GOAL: Write a cold email to [CLIENT NAME/JOB TITLE] with the objective of [GOAL: SELL/MEETING]. CLIENT PROBLEM…
-
I want you to act as a PLC programmer writing ladder logic for ${Platform and version}. Write a motor start/stop circuit for ${Motor name:Conveyor_M1}. Inputs, with what TRUE means: - ${Start tag:Start_PB} (normally…