"Type your words. Translated, they shall be."
A Star Wars-themed translator that converts any text into Yoda's iconic speech pattern. Powered by Llama 4 Scout via Cloudflare Workers AI β no external API keys needed.
π Live demo: yoda-translate.pages.dev
- π€ AI-powered Yoda speech translation using Llama 4 Scout
- β‘ Serverless backend via Cloudflare Workers
- π‘οΈ Per-IP rate limiting with Cloudflare KV
- π Recent translations history (session-based)
- π Animated starfield background
- π One-click copy to clipboard
- π± Fully responsive design
Browser (Cloudflare Pages)
β
β POST / { text }
βΌ
Cloudflare Worker βββ KV (rate limiting)
β
β env.AI.run(llama-4-scout-17b-16e-instruct)
βΌ
Cloudflare Workers AI
- Go to workers.cloudflare.com and create a new Worker
- Paste the contents of
worker.js - Add bindings under Settings β Bindings:
- Workers AI β variable name:
AI - KV Namespace β variable name:
RATE_LIMIT(create namespace first under Storage & Databases β Workers KV)
- Workers AI β variable name:
- Deploy
- Update
WORKER_URLinindex.htmlto your Worker URL - Go to Workers & Pages β Create β Pages
- Upload
index.htmldirectly - Deploy
| File | Description |
|---|---|
index.html |
Frontend β single-file UI with starfield, input, and output |
worker.js |
Cloudflare Worker β rate limiting + Workers AI call |
wrangler.toml |
Wrangler config β for Git-connected auto-deploys |
20 requests per IP per minute, enforced via Cloudflare KV. Resets automatically every 60 seconds.
- Frontend: Vanilla HTML/CSS/JS, hosted on Cloudflare Pages
- Backend: Cloudflare Workers (serverless)
- AI: Llama 4 Scout (17B) via Cloudflare Workers AI
- Storage: Cloudflare KV (rate limiting)
MIT
May the Force be with you. β¨