Problem
Browser-based translators strip context — you highlight a word, get a dictionary entry, and lose the nuance of how it was used in the sentence. Language learners and professionals working across languages need translations that account for surrounding context, register, and grammar. Existing tools also lock you into one provider with no way to bring your own keys.
Approach
Built a three-app monorepo: a Chrome extension (WXT + MV3) that captures selection context via Unicode-aware sentence expansion, a Fastify API that orchestrates DeepL-first/LLM-fallback translation with structured enrichment, and a Next.js dashboard for vocabulary review with SM-2 spaced repetition. The BYOK model lets users plug in Gemini, OpenAI, Anthropic, or Mistral keys — the API resolves the provider per-request. Supabase handles auth with a session bridge between extension and web app.
Outcome
Fully deployed: Railway API, Vercel dashboard, Chrome extension in daily personal use. The shared-package pattern paid off immediately — types, i18n, and utilities stay in sync across all three apps. The DeepL-first/LLM-fallback architecture was the right call: DeepL is fast and cheap for translation itself, LLMs handle the enrichment that makes the tool useful for learning.
Next project
Routr →