Clipzy is an AI creative app for iOS and Android. You pick a template and a look, add photos or a prompt, and Clipzy generates a finished image or a short video clip without any manual editing.
Generations
The API is Hono on Cloudflare Workers, with Drizzle and PostgreSQL, Better Auth (including Sign in with Apple) and R2 for media through presigned uploads. Each generation runs as its own Cloudflare Workflow: it submits the job to a fal.ai model and waits for fal’s signed webhook instead of polling. Generation requests carry idempotency keys, so a double tap doesn’t start two jobs. Errors are split into retriable and final, a failed generation refunds its coins, and a retry charges again. KV handles rate limiting, and crons clean up behind the workflows.
- Clipzy app to API Worker: generate + idempotency key
- API Worker to Postgres: insert + spend coins
- API Worker to Workflow: start Workflow
- API Worker to Clipzy app: generation pending
- Workflow: enhance the prompt
- Workflow to fal.ai: submit with webhook URL
- Workflow: wait for the event
- fal.ai to API Worker: signed webhook
- API Worker to Workflow: verify, then send event
- Workflow: copy outputs to R2
- Workflow to Postgres: complete (or fail + refund)
- Workflow to Clipzy app: push notification
Templates as data
Templates are rows in the database, not code. Admins create and price them through admin endpoints, a translation workflow localises each one into every app language, and a prompt-enhancement endpoint rewrites the user’s prompt before it reaches the model. Finished work can be published to an explore feed, and template use counts decide what shows first.
Parts: Admin (template APIs), Clipzy app (template gallery), API Worker (Hono · zod-openapi), Translation flow (every app language), Postgres (templates · prices), fal.ai LLM (translation).
- Admin to API Worker (create)
- Clipzy app to API Worker
- API Worker to Translation flow
- API Worker to Postgres
- Translation flow to fal.ai LLM
The app
The Expo app has onboarding, the template gallery, a RevenueCat coin store and paywall with intro offers, AI consent, and push notifications that deep-link to a result when it’s ready. Analytics run on PostHog and Firebase, with Crashlytics for crashes. Store and social videos are rendered from code with Remotion.