AI-powered Smart Reply, Enhance & Translate Assistant: Instantly generate smart, context-aware replies, enhance your own text, or translate content for your workflow: messages, emails, chats, and more directly from your browser or web app!
Smart Reply, Enhance & Translate is a comprehensive AI tool suite consisting of a browser extension (Chrome/Firefox), a React-based web application, and a shared backend service. It uses LLMs (via OpenRouter) to suggest replies intelligently based on the context of your communication, improve and refine your own text, or translate text with customizable styles.
It helps boost productivity for anyone who writes repetitive messages, needs quick text improvements, or requires translations as freelancers, support agents, or busy professionals. The browser extension provides on-the-go access directly in your browser, while the web app offers a full-featured interface for deeper interactions.
- 💬 Four AI Reply Suggestions per Message – Get up to 4 context-aware replies instantly for any message in Smart Reply mode (available in both extension and web).
- ✍️ Four AI Text Enhancements – Improve your own text with 4 variations focusing on grammar, clarity, conciseness, structure, and effectiveness in Smart Enhance mode (like Grammarly; available in both extension and web).
- 🌐 Four AI Text Translations – Translate text to multiple languages (e.g., English, Spanish, French, German, Chinese, Arabic, Bengali) with 4 variations in customizable styles in Smart Translate mode (available in both extension and web).
- 🎨 Six Response Formats – Choose from Professional, Friendly, Casual, Formal, Flating (flirty compliments with romantic interest), or Romantic (affectionate and emotionally warm) with tooltips for descriptions (applies to Reply, Enhance, and Translate modes).
- 🔄 Mode Switching – Easily toggle between Smart Reply, Smart Enhance, and Smart Translate in the extension popup or web interface.
- 🤖 Multiple Free LLM Models – Automatically selects optimized models for each operation:
- Suggestions:
xiaomi/mimo-v2-flash:free,tngtech/deepseek-r1t2-chimera:free,openai/gpt-oss-20b:free - Enhancements:
tngtech/deepseek-r1t2-chimera:free,xiaomi/mimo-v2-flash:free,openai/gpt-oss-20b:free - Translations:
openai/gpt-oss-20b:free,xiaomi/mimo-v2-flash:free,tngtech/deepseek-r1t2-chimera:free
- Suggestions:
- ⚙️ LLM Agnostic – Works with any OpenRouter-supported model (free or paid).
- 💾 Intelligent Caching – SHA256-based cache keys prevent duplicate responses for different requests (5-minute TTL).
- 🔐 Custom API Keys – Bring your own API key for privacy & flexibility.
- 🐳 Docker Support – Run the backend instantly using Docker.
- Extension-Specific: Insert suggestions/translations directly into text fields (e.g., emails, chats); auto-detect selected text; keyboard shortcut (Ctrl+Shift+T) and context menu for quick in-page translation using default languages; cross-browser support for Chrome and Firefox.
- Web-Specific: Auto-resizing textarea, animated UI with Framer Motion, developer info panel, keyboard shortcuts (Ctrl/Cmd + Enter), responsive design, and accessibility features.
- Mobile-Specific (Flutter): Native Android support, responsive UI, optimized for on-the-go usage.
- Frontend (Extension): Browser Manifest V3, JavaScript, HTML, CSS
- Frontend (Web): React, Zustand for state management, Framer Motion for animations, Lucide React for icons, Tailwind CSS for styling
- Frontend (Mobile): Flutter with Provider for state management, Google Fonts for typography
- Backend: Node.js + Express
- AI Integration: OpenRouter API
| Metric | Before | After | Improvement |
|---|---|---|---|
| Response Size | 100% | 30-35% | 65-70% reduction |
| API Cache Hits | 0% | ~60% | Significant latency reduction |
| Cache Key Collision | High | 0% | SHA256 hashing eliminates duplicates |
| React Re-renders | High | Low | 40-50% fewer renders |
| Bundle Size | 100% | 85-88% | 12-15% reduction |
| Request Cancellation | ❌ | ✅ | Prevents zombie requests |
| Security Headers | ❌ | ✅ | XSS/Clickjacking protection |
| Input Validation | Basic | Strict | Injection attack prevention |
| Model Optimization | Single | Multiple | Best model per operation |
| Romantic Replies | ❌ | ✅ | New format support |
git clone https://github.com/mahmud-r-farhan/smart-reply.git
cd smart-reply-
Create a
.envfile in the/backenddirectory:OPENROUTER_API_KEY=your_openrouter_api_key PORT=5006
-
Install dependencies and start the server:
cd backend npm install npm start -
The backend runs at:
http://localhost:5006
-
Build and run the Docker container:
docker build -t smart-reply-backend ./backend docker run -d -p 5006:5006 --env OPENROUTER_API_KEY=your_openrouter_api_key smart-reply-backend
-
Verify the backend:
http://localhost:5006
-
Open Chrome and go to:
chrome://extensions -
Enable Developer Mode (top-right corner).
-
Click Load unpacked and select:
smart-reply/extension -
The extension will appear in your toolbar.
-
Open Firefox and go to:
about:debugging#/runtime/this-firefox -
Click Load Temporary Add-on... and select the
manifest.jsonfile in:smart-reply/extension -
The extension will be loaded temporarily (reload on browser restart).
-
Install dependencies:
cd frontend npm install -
Set up environment: Add
VITE_API_ENDPOINTin.envfor the backend API base URL (e.g.,VITE_API_ENDPOINT=http://localhost:5006/api). -
Run locally:
npm run dev
-
Prerequisites:
- Flutter SDK installed
- Android Studio / Android SDK configured
-
Configure API Endpoint:
- For Android Emulators: The app is pre-configured to use
http://10.0.2.2:5006/api - For Physical Devices: Update
baseUrlinlib/utils/constants.dartto your computer's local IP (e.g.,http://192.168.1.X:5006/api)
- For Android Emulators: The app is pre-configured to use
-
Run the app:
cd smart_reply_app flutter pub get flutter run
- For Extension: Click on the extension icon → Settings. Paste your backend base URL (e.g.,
http://localhost:5006/api). Set default source/target languages for quick translations. Save. - For Web: The
.envhandles the connection automatically. - For Mobile: Update the API endpoint in
lib/utils/constants.dartas described in Step 5 above.
Note: The tools automatically append
/suggest-reply,/enhance-text, or/translate-textbased on the selected mode.
-
POST /api/suggest-reply – Generate multiple reply suggestions (Smart Reply mode)
{ "message": "Can we reschedule the meeting?", "format": "professional" }Response:
{ "suggestions": [ "Absolutely, let’s find a new time that works for both of us.", "Sure, please let me know your availability.", "No problem, I can adjust my schedule accordingly.", "Of course, happy to reschedule. When would you like to meet?" ] }Supported Formats:
professional,friendly,casual,formal,flating,romantic -
POST /api/enhance-text – Generate multiple enhanced versions of text (Smart Enhance mode)
{ "text": "We need to reschedul the meeting because of conflict.", "format": "professional" }Response:
{ "enhancements": [ "We need to reschedule the meeting due to a scheduling conflict.", "Due to a conflict, let's reschedule the meeting at your earliest convenience.", "I apologize, but a conflict has arisen—could we reschedule the meeting?", "There's a scheduling conflict; please suggest alternative times for the meeting." ] }Supported Formats:
professional,friendly,casual,formal,flating,romantic -
POST /api/translate-text – Generate multiple translated versions of text (Smart Translate mode)
{ "text": "Hello, how are you?", "format": "friendly", "language": "bengali" }Response:
{ "translations": [ "হ্যালো, আপনি কেমন আছেন?", "হাই, তুমি কেমন আছো?", "হেলো, তোমার খবর কী?", "হ্যালো, আপনার অবস্থা কেমন?" ] }Supported Formats:
professional,friendly,casual,formal,flating,romantic -
GET /health – Health check endpoint returning
{ "status": "ok" }.
Smart Reply now uses an intelligent SHA256-based caching system:
- Cache Key: Full prompt + model hash (prevents collisions)
- TTL: 5 minutes per entry
- Benefits:
- No more duplicate responses for different messages
- Faster subsequent identical requests
- Automatic expiration and cleanup
- Statistics available via cache manager
Example cache behavior:
Request 1: "Hello" → Cache Miss → OpenRouter API → Cached
Request 2: "Hi" → Cache Miss → OpenRouter API → Cached (different prompt!)
Request 1 (repeat): "Hello" → Cache Hit → Instant Response
You can deploy using Render, VPS, Fly.io, or Railway.app.
Set OPENROUTER_API_KEY in environment variables, then share the endpoint with your browser extension or web app.
Contributions are welcome!
- Fork the repo
- Create a feature branch
- Submit a pull request
Keep PRs clean with descriptive commits and tested changes.
Built by Mahmud Rahman Powered by OpenRouter
“Automate your responses. Amplify your productivity.”