
Template details
ShrimpReel
Open-source Cloudflare SaaS template that turns one photo into a viral AI video, with one site per trending keyword.
About this template
ShrimpReel is an open-source SaaS template for building "one photo to an AI video" sites on Cloudflare Workers, created by 浅水虾 (qianshuixia), designed to be cloned once per trending keyword.
What is ShrimpReel?
ShrimpReel is a full-stack template for a photo-to-video SaaS product: visitors upload one photo, pick a style and length, and receive an AI-generated video that follows a viral trend. It runs entirely on Cloudflare (Workers, D1, R2, KV, Queues, Rate Limiting, Cron Triggers) with TanStack Start (React 19) and Tailwind 4 on the frontend and Hono for the API. The stated workflow is one repository per trending keyword, tracking the template as an upstream remote so payment and security fixes merge into every site.
Key Features
- Cloudflare-native stack — SSR front end plus a Hono API handling
/api/*,/media/*,sitemap.xml,robots.txtandllms.txt, with D1, R2, KV, Queues, rate limiting and cron triggers. - Credit and billing system — Google sign-in with One Tap, credit packs, monthly and yearly subscriptions, a credit ledger with per-grant expiry, partial and full refunds that claw back credits, and printable order pages.
- Payment providers — Waffo Pancake or Dodo Payments as Merchants of Record, or Stripe where you handle sales tax yourself;
mockfor local dev. - Video generation — fal.ai queue API by default, optional yir.ai router or NanoAPI, with a generation queue, dead-letter queue and automatic credits returned on failure.
- Try-before-sign-in drafts — the chosen photo, style and length persist in IndexedDB for 24 hours through sign-in and checkout; a QR code lets phones push photos to a desktop session via R2.
- Admin console — overview with provider cost and gross margin, users, orders, generations, takedowns, payment events, emails, audit log, redeem codes, referral leaderboard and runtime settings.
- Compliance tooling — AI-generated labels, an optional XMP machine-readable label, a
/verifypage, 7-day photo and 30-day video retention, and a 48-hour takedown queue that removes every video made from the same source photo. - SEO and growth — SSR canonical/hreflang/JSON-LD, sitemap linting via
npm run seo:check, UTM first- and last-touch attribution, a conversion funnel, GA4 behind a consent banner, and public share pages for videos.
Who is it for?
Indie SaaS operators: ship a niche photo-to-video site per trending keyword by changing site.ts, copy and media rather than rebuilding payments and auth. Solo developers on Cloudflare: use the included D1 migrations, R2 lifecycle rules and secret-sync script to go from clone to deploy without adding other infrastructure. Agencies running trend sites: manage several keyword domains from one template and merge upstream fixes with the included sync-upstream skill.
What can you do with ShrimpReel?
- Launch a holiday or dance trend site: configure a keyword, styles and demo media, then sell credit packs and subscriptions for AI clips made from a user's photo.
- Delegate the build to an AI agent: the bundled
new-hot-siteskill writes a site brief, runs the scaffolder, sets pricing, rewrites bilingual copy and runs typecheck, tests, build andseo:check. - Review production health from the admin panel: run connection tests against R2, KV, email, payment and video providers, and switch maintenance mode, checkout pause or a daily generation cap without a deploy.
How does ShrimpReel work?
A user uploads a photo, picks a style and duration, and submits a generation after signing in and buying credits; the job enters a Cloudflare Queue and is sent to the configured video provider. Uploaded photos are stored in R2 and deleted after 7 days, generated videos after 30 days, and any failure triggers an automatic credit refund. A cron every 5 minutes polls stuck jobs and fails them after 45 minutes.
Pros and cons
- Bilingual English/Chinese copy is code-split per locale, but code comments, ROADMAP and
docs/files are currently in Chinese. - The template itself is not deployed; the full flow is verified locally with unit tests and Playwright e2e, and the showcase site Christmas Dance AI runs it in production.
- Requires a modern npm (11.19 or newer) and Cloudflare resources created per site before deploying.














