LingoContext is a Chrome extension for language learners that turns selected text on any webpage into a context-aware study card: translation, adaptive explanation, grammar notes, pronunciation, and vocabulary capture in one flow.
It combines AI analysis, fast local Japanese helpers, and a review dashboard so learners can move from βwhat does this mean?β to βwhy does it mean that here?β without leaving the page.
- π Context-aware analysis: Understands selected text using the surrounding sentence and page context instead of translating in isolation.
- π§ Adaptive explanations: Produces richer grammar and word-by-word explanations for shorter selections, while handling longer passages more naturally.
- β‘ Streaming responses: Uses server-sent events for responsive AI analysis flows.
- π€ Multi-provider AI: Supports user-selectable Gemini and DeepSeek analysis providers, with a provider-agnostic backend architecture.
- π Quick definitions: Fetches lightweight definitions for selected terms before the full analysis finishes.
- π Japanese study support: Generates local furigana for Japanese text and filters ruby annotations down to Kanji where appropriate.
- π Better pronunciation: Uses Edge TTS for high-quality audio with browser TTS fallback, plus optional auto-play.
- π§ Smart caching: Caches AI analysis, quick definitions, and TTS audio to reduce repeated latency and token usage.
- πͺ Refined in-page popup: Draggable, pinnable, resizable popup UI with contained scrolling and updated cursor-trigger animations.
- π Vocabulary dashboard: Review saved words, search your collection, inspect usage, and manage preferences.
- π Internationalization: Ships with English, Japanese, Simplified Chinese, and Traditional Chinese locales.
- π Google authentication: Syncs user data and preferences across sessions.
- π³ Docker-ready backend: Includes a containerized Node.js + MySQL stack for local or self-hosted deployment.
- Extension: Vanilla JavaScript, Chrome Extension Manifest V3
- Styling: Tailwind CSS
- Backend: Node.js, Express 5, Server-Sent Events
- Database: MySQL
- AI: Gemini and DeepSeek, behind a pluggable provider layer
- Speech: Edge TTS with Web Speech API fallback
- Japanese processing:
kuromoji - Deployment: Docker Compose and Vercel-compatible server configuration
- Node.js 18+
- Docker and Docker Compose
- Google Cloud Console project for OAuth
- At least one AI provider key:
GEMINI_API_KEY- or
DEEPSEEK_API_KEY
# Install root dependencies
npm install
# Install server dependencies
cd server && npm install && cd ..Create server/.env from the example file and fill in the values you need:
AI_PROVIDER=gemini
AI_MAX_OUTPUT_TOKENS=2048
GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-2.5-flash
DEEPSEEK_API_KEY=your_deepseek_api_key
DEEPSEEK_MODEL=deepseek-v4-flash
PORT=3303
DATABASE_URL=mysql://user:password@mysql:3306/LingoContext
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
SESSION_SECRET=your_random_session_secretOptional provider-related settings such as OpenRouter, Codex-compatible routing, Gemini explicit cache settings, CORS origins, and extension IDs are documented in server/.env.example.
The extension uses CONFIG.BACKEND_URL as its API endpoint. For local development, point it at:
http://localhost:3303/apiFor local development, override BACKEND_URL in chrome.storage.local or use a temporary local build. The checked-in extension defaults to the hosted backend so store builds are safe by default.
docker-compose up --build- Start MySQL locally, or run only the MySQL service:
docker-compose up mysql -d
- Start the backend:
cd server node index.js - Build extension styles:
npm run build:css # or npm run watch:css
- Open
chrome://extensions/ - Enable Developer mode
- Click Load unpacked
- Select the project root folder
- Sign in from the popup with Google.
- Select text on any webpage to reveal the custom cursor trigger.
- Analyze the selection to receive translation, grammar/explanation, furigana when relevant, and quick definitions.
- Listen with the speaker control, optionally using auto-play pronunciation.
- Save useful terms to your vocabulary list.
- Review them later in the dashboard, where you can also change target language and AI provider preferences.
npm run packageCreates the Chrome Web Store-ready lingocontext-production.zip in the repository root.
npm run build:prodCreates lingocontext-production.zip with production configuration applied.
- Bump the version in
manifest.jsonandpackage.json - Test selection flow, popup behavior, dashboard, sign-in, TTS, and provider switching
- Prepare a privacy policy page
- Prepare store screenshots
- Fill in the listing copy and metadata
storage: saves user preferencestts: enables browser text-to-speech fallback- Host access to the configured backend API
.
βββ manifest.json # Chrome extension manifest
βββ content.js # In-page selection flow and popup UI
βββ background.js # Background worker, streaming bridge, TTS routing
βββ popup.html / popup.js # Login and quick actions
βββ dashboard.html / dashboard.js
β # Vocabulary dashboard and user preferences
βββ icons/ # Extension icons and cursor assets
βββ _locales/ # Translation files
βββ server/ # Express backend
β βββ routes/ # Analyze, TTS, furigana, dictionary, auth routes
β βββ services/ # AI, caching, TTS, furigana, normalization logic
β βββ schema.sql # Database schema
βββ docker-compose.yml # Local stack orchestration
MIT License.