Hi HN!
I built Audarma, an open-source React library that adds LLM-powered translation to any app with just a few lines of code.
Live demo: https://audarma.pages.dev (bonus: Latin, Klingon, Quenya, and Dothraki)
Key features:
• Smart caching - translates once, stores in localStorage/DB, instant on revisit
• View-level batching - translates entire pages in one API call
• Content-aware - only re-translates when English source changes
• Adapter pattern - works with any LLM (OpenAI, Anthropic, Cerebras) and any database
The demo uses Cerebras (free tier) to translate live Hacker News headlines into 10 languages including fantasy languages.
Tech stack: React hooks, Next.js App Router, Cloudflare Pages + KV
This is v0.1.0 (alpha) - would love feedback on the API design and use cases you'd want to support.
GitHub: https://github.com/audarma/audarma
npm: npm install audarma