// the find
mckaywrigley/ai-code-translator
Use AI to translate code from one language to another.
A Next.js app that wraps an LLM call in a UI to translate code snippets from one language to another — pick source and target language, paste code, get a translation back. Built by McKay Wrigley (same author as chatbot-ui), it's really a reference implementation for 'prompt + UI' apps rather than a serious translation tool.
The whole thing is maybe a dozen files — pages/api/translate.ts, a handful of components, no state management library, no backend. Easy to read end to end in ten minutes and fork for your own prompt-wrapper project. Ships a Dockerfile and docker-compose.yml so you're not fighting local setup. BYO API key pattern (APIKeyInput.tsx) means no server-side key management or usage billing to worry about.
Dead since December 2023 — two years with no commits, and the model landscape (and probably the OpenAI SDK calls it makes) has moved on since. No tests at all, so you can't tell if pages/api/translate.ts still works against current API versions without running it yourself. 'Translation' here means pasting code through an LLM with no validation that the output compiles or preserves semantics — fine for quick snippet conversion, risky if anyone mistakes this for a real transpiler. No streaming cancellation, no handling for large files or rate limits, and the README has zero documentation on the actual prompt or how language detection works.