Kaomoji.moe now runs on Cloudflare Workers
I haven't worked on https://kaomoji.moe in 5 years... that's a long time. It used to cost me $0.02/mo to run on Google Cloud Run, mostly because there's been basically zero growth in the last couple years. I think that's mainly due to the cold-boot problem Cloud Run has. It just doesn't respond fast enough with low traffic so when people use it for the first time they get errors.
Today I've migrated everything across to Cloudflare Workers with the help of AI. It's retained basically everything I wrote 5-6 years ago as it was, but with modern alternatives and complete test coverage. Hopefully all the security holes plugged too (that I know of). Surprisingly it didn't actually find any outside the dependency issues it had, good job Jack from 5 years ago.
What changed?
- Hosting: Google Cloud Run -> Cloudflare Workers & Pages
- Tooling: eslint, prettier, TypeScript v4.x, custom types -> oxc (fmt/lint), TypeScript v7.x, zod v4
- Backend: Next.js v10.x API routes -> Bun API server with Hono v4.x
- Database: Google Cloud Firestore -> Cloudflare D1 (Serverless SQLite)
- Frontend: Next.js v10.x pages router -> Vite built React SPA
- Classifier: Basic/broken NLP classifier (it kinda worked) -> Synonym first lookup, classifier fallback, better defaults for unknowns
Is it better?
It should respond instantly now given Cloudflare Workers extremely low latency. I plan to add a couple quality of life features to this, and possibly look at integrating an OpenAPI or MCP server for agents, but that could be a ways off. For now it should be much more responsive even if you don't use it all that much.
I now don't ask for donations either, I got a couple over the years but it felt kinda wrong for me to ask for it. Instead now all the Ko-fi donation references take you to the Bush Heritage Australia donation page instead, they need it more than I do.