A high-performance, serverless edge API that serves text styling effect definitions and Lottie vector animations for the Clypra video editor desktop application.
Served globally across 300+ edge locations on Cloudflare Workers, cached in Cloudflare KV, and backed by public assets on GitHub — keeping running costs at $0/month forever.
- Thin Index Manifests: Drop initial app load times by 99% by serving lightweight asset summaries (IDs, names, tags, and thumbnails) for picking views, shrinking payload size from ~5MB to ~50KB.
- On-Demand Lazy Loading: Heavy-duty assets (full vector stops, fills, outlines, and complete Lottie JSON keyframe data) are fetched dynamically only when selected or applied.
- Client-Side RAM Cache: The desktop client maintains a local cache map to guarantee 0ms latency for timeline refreshes and recurring preset selections.
- Edge-Cached: KV caching ensures raw GitHub fetches are bypassed on subsequent queries, serving requests with sub-10ms response times at scale.
| Endpoint | Method | Cache TTL | Description |
|---|---|---|---|
/health |
GET |
None | Sandbox health check and runtime timestamp |
/effects |
GET |
24 Hours | Master array of all 24 text effect thin summaries |
/effects/:category |
GET |
24 Hours | Array of thin summaries filtered by category |
/effects/:category/:id |
GET |
24 Hours | Heavy vector style configs (fills, strokes, shadows, glows) |
/templates |
GET |
24 Hours | Master array of all 16 template metadata summaries |
/templates/:category |
GET |
24 Hours | Array of templates metadata filtered by category |
/templates/:category/:id |
GET |
6 Hours | Heavy raw Lottie JSON animation keyframe payload |
/audio |
GET |
24 Hours | Master array of approved public audio metadata |
/audio/:category |
GET |
24 Hours | Approved public audio filtered by category |
/audio/:category/:id |
GET |
24 Hours | Single approved audio metadata record |
/search?q=neon |
GET |
None | Global search query matching names, tags, and descriptions |
You can run the entire environment offline on your local machine using Python's static server and Wrangler's Miniflare simulation.
If you add or modify text effects/templates in your desktop codebase, recompile the JSON manifests inside /data:
npm run extract- Start the local asset server in the background (serves local JSON assets on port
8080):python3 -m http.server 8080 --directory data
- Start Wrangler Dev Server (routes worker requests locally on port
8787):npm run dev
- Verify Health Check:
curl http://localhost:8787/health
To push the database and Hono Worker live globally:
Ensure your repository is set to Public so that Cloudflare's servers can read raw files securely from raw.githubusercontent.com.
git add .
git commit -m "Configure: compile high-scale thin manifests"
git push origin mainGenerate a production KV store in your Cloudflare account:
npx wrangler kv:namespace create "EFFECTS_KV"Copy the generated ID and replace the placeholder inside wrangler.toml:
[[kv_namespaces]]
binding = "EFFECTS_KV"
id = "YOUR_NEW_KV_NAMESPACE_ID"Upgraded to Wrangler v4 with 0 security vulnerabilities. Deploy instantly using:
npm run deployOutput: https://clypra-worker-api.abdulkabirmusa.com
Licensed under the MIT License.