{"id":50757505,"url":"https://github.com/mahmud-r-farhan/smart-reply","last_synced_at":"2026-06-11T06:31:36.573Z","repository":{"id":321652723,"uuid":"859482424","full_name":"mahmud-r-farhan/smart-reply","owner":"mahmud-r-farhan","description":"AI-powered Smart Reply, Enhance \u0026 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!","archived":false,"fork":false,"pushed_at":"2026-02-18T15:42:00.000Z","size":1369,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-18T19:13:07.311Z","etag":null,"topics":["ai-powered-tools","chrome-extension","reply","smart-reply","text-enhancement","translates"],"latest_commit_sha":null,"homepage":"https://smart-reply-delta.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mahmud-r-farhan.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-18T18:28:52.000Z","updated_at":"2026-02-18T15:42:42.000Z","dependencies_parsed_at":"2025-10-30T20:37:22.287Z","dependency_job_id":null,"html_url":"https://github.com/mahmud-r-farhan/smart-reply","commit_stats":null,"previous_names":["mahmud-r-farhan/smart-reply"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mahmud-r-farhan/smart-reply","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fsmart-reply","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fsmart-reply/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fsmart-reply/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fsmart-reply/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahmud-r-farhan","download_url":"https://codeload.github.com/mahmud-r-farhan/smart-reply/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmud-r-farhan%2Fsmart-reply/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34186385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-powered-tools","chrome-extension","reply","smart-reply","text-enhancement","translates"],"created_at":"2026-06-11T06:31:36.503Z","updated_at":"2026-06-11T06:31:36.568Z","avatar_url":"https://github.com/mahmud-r-farhan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Reply, Enhance \u0026 Translate\n\n\u003e AI-powered assistant to generate context-aware replies, enhance your writing, and translate text — directly from your browser, web app, or mobile device.\n\n[![Live Demo](https://img.shields.io/badge/Live%20Demo-smart--reply--delta.vercel.app-blue?style=flat-square)](https://smart-reply-delta.vercel.app)\n[![Stars](https://img.shields.io/github/stars/mahmud-r-farhan/smart-reply?style=flat-square)](https://github.com/mahmud-r-farhan/smart-reply/stargazers)\n\n\n[![897.webp](https://i.postimg.cc/Dwb20cKP/897.webp)](https://postimg.cc/gxm9B8jx)\n\n---\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Architecture](#architecture)\n- [Tech Stack](#tech-stack)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Clone the Repository](#clone-the-repository)\n  - [Backend Setup](#backend-setup)\n  - [Browser Extension Setup](#browser-extension-setup)\n  - [Web Frontend Setup](#web-frontend-setup)\n  - [Flutter Mobile App Setup](#flutter-mobile-app-setup)\n- [API Reference](#api-reference)\n- [Caching System](#caching-system)\n- [Deployment](#deployment)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Overview\n\n**Smart Reply, Enhance \u0026 Translate** is a full-stack AI tool suite built to boost productivity for anyone who works with text. Whether you're a support agent handling repetitive messages, a freelancer drafting professional emails, or someone who needs quick translations, this project provides a seamless experience across multiple platforms.\n\nThe suite consists of three client interfaces — a **browser extension** (Chrome/Firefox), a **React web application**, and a **Flutter mobile app** — all powered by a shared **Node.js backend** that communicates with state-of-the-art LLMs via [OpenRouter](https://openrouter.ai).\n\n**Three core modes:**\n\n| Mode | What it does |\n|---|---|\n| **Smart Reply** | Generates up to 4 context-aware reply suggestions for any message |\n| **Smart Enhance** | Improves your text across grammar, clarity, conciseness, and structure |\n| **Smart Translate** | Translates text into your target language with 4 style variations |\n\n---\n\n## Features\n\n- **4 AI suggestions per request** across all three modes (Reply, Enhance, Translate)\n- **6 response formats** — Professional, Friendly, Casual, Formal, Flirty, Romantic — with tooltip descriptions\n- **Multi-language translation** — English, Spanish, French, German, Chinese, Arabic, Bengali, and more\n- **Multiple free LLM models** — automatically selects the best model per operation type\n- **LLM-agnostic** — compatible with any OpenRouter-supported model (free or paid)\n- **Custom API key support** — bring your own key for full privacy and control\n- **SHA256-based intelligent caching** — prevents duplicate API calls, 5-minute TTL\n- **Docker support** — spin up the backend with a single command\n- **Browser Extension (Chrome/Firefox)** — insert text directly into any field, keyboard shortcut `Ctrl+Shift+T`, context menu integration, auto-detect selected text\n- **Web App** — animated UI with Framer Motion, auto-resizing textarea, keyboard shortcuts (`Ctrl/Cmd + Enter`), responsive and accessible\n- **Mobile App (Flutter)** — native Android support, optimized for on-the-go usage\n\n---\n\n## Architecture\n\n```\nsmart-reply/\n├── backend/              # Node.js + Express API server\n├── extension/            # Browser extension (Chrome/Firefox, Manifest V3)\n├── frontend/             # React web application\n└── smart_reply_app/      # Flutter mobile application\n```\n\nAll clients communicate with the same backend via three REST endpoints. The backend handles LLM selection, prompt construction, caching, and response formatting.\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|---|---|\n| Backend | Node.js, Express |\n| Web Frontend | React, Zustand, Tailwind CSS, Framer Motion, Lucide React |\n| Browser Extension | Manifest V3, Vanilla JS, HTML, CSS |\n| Mobile App | Flutter, Provider, Google Fonts |\n| AI Integration | OpenRouter API |\n| Containerization | Docker |\n| Deployment | Vercel (frontend), Render / Railway / Fly.io (backend) |\n\n---\n\n## Getting Started\n\n### Prerequisites\n\nBefore you begin, make sure you have the following installed:\n\n- [Node.js](https://nodejs.org/) v18 or higher\n- [npm](https://www.npmjs.com/) v9 or higher\n- [Flutter SDK](https://flutter.dev/docs/get-started/install) (only for mobile)\n- [Docker](https://www.docker.com/) (optional, for containerized backend)\n- An [OpenRouter](https://openrouter.ai) API key\n\n---\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/mahmud-r-farhan/smart-reply.git\ncd smart-reply\n```\n\n---\n\n### Backend Setup\n\nThe backend is a single Express server that serves all three clients. You only need to set it up once.\n\n**Option A — Local Setup**\n\n1. Navigate to the backend directory:\n\n```bash\ncd backend\n```\n\n2. Create a `.env` file:\n\n```env\nOPENROUTER_API_KEY=your_openrouter_api_key\nPORT=5006\n```\n\n3. Install dependencies and start the server:\n\n```bash\nnpm install\nnpm start\n```\n\nThe backend will be running at `http://localhost:5006`.\n\n**Option B — Docker Setup**\n\n```bash\ndocker build -t smart-reply-backend ./backend\ndocker run -d -p 5006:5006 --env OPENROUTER_API_KEY=your_openrouter_api_key smart-reply-backend\n```\n\nVerify it's running by visiting `http://localhost:5006/health`.\n\n---\n\n### Browser Extension Setup\n\n**Chrome**\n\n1. Open Chrome and navigate to `chrome://extensions`\n2. Enable **Developer Mode** (toggle in the top-right corner)\n3. Click **Load unpacked** and select the `extension/` folder\n4. The Smart Reply icon will appear in your toolbar\n\n**Firefox**\n\n1. Open Firefox and navigate to `about:debugging#/runtime/this-firefox`\n2. Click **Load Temporary Add-on...**\n3. Select the `manifest.json` file inside the `extension/` folder\n4. The extension will be loaded for the current browser session\n\n**Connect the extension to your backend:**\n\n1. Click the extension icon in the toolbar\n2. Open **Settings**\n3. Paste your backend base URL (e.g., `http://localhost:5006/api`)\n4. Optionally set default source and target languages for quick translation\n5. Click **Save**\n\n---\n\n### Web Frontend Setup\n\n1. Navigate to the frontend directory:\n\n```bash\ncd frontend\n```\n\n2. Create a `.env` file:\n\n```env\nVITE_API_ENDPOINT=http://localhost:5006/api\n```\n\n3. Install dependencies and start the development server:\n\n```bash\nnpm install\nnpm run dev\n```\n\nThe app will be available at `http://localhost:5173`.\n\n---\n\n### Flutter Mobile App Setup\n\n1. Navigate to the mobile app directory:\n\n```bash\ncd smart_reply_app\n```\n\n2. Configure the API endpoint in `lib/utils/constants.dart`:\n\n```dart\n// For Android Emulator (default):\nconst String baseUrl = 'http://10.0.2.2:5006/api';\n\n// For a physical device, replace with your local machine's IP:\nconst String baseUrl = 'http://192.168.1.X:5006/api';\n```\n\n3. Get dependencies and run the app:\n\n```bash\nflutter pub get\nflutter run\n```\n\n---\n\n## API Reference\n\nAll endpoints accept and return JSON. The base URL is configurable (default: `http://localhost:5006`).\n\n---\n\n### `POST /api/suggest-reply`\n\nGenerates up to 4 context-aware reply suggestions for a given message.\n\n**Request body:**\n\n```json\n{\n  \"message\": \"Can we reschedule the meeting?\",\n  \"format\": \"professional\"\n}\n```\n\n**Response:**\n\n```json\n{\n  \"suggestions\": [\n    \"Absolutely, let's find a new time that works for both of us.\",\n    \"Sure, please let me know your availability.\",\n    \"No problem, I can adjust my schedule accordingly.\",\n    \"Of course, happy to reschedule. When would you like to meet?\"\n  ]\n}\n```\n\n---\n\n### `POST /api/enhance-text`\n\nGenerates up to 4 improved variations of your input text.\n\n**Request body:**\n\n```json\n{\n  \"text\": \"We need to reschedul the meeting because of conflict.\",\n  \"format\": \"professional\"\n}\n```\n\n**Response:**\n\n```json\n{\n  \"enhancements\": [\n    \"We need to reschedule the meeting due to a scheduling conflict.\",\n    \"Due to a conflict, let's reschedule the meeting at your earliest convenience.\",\n    \"I apologize, but a conflict has arisen — could we reschedule the meeting?\",\n    \"There's a scheduling conflict; please suggest alternative times for the meeting.\"\n  ]\n}\n```\n\n---\n\n### `POST /api/translate-text`\n\nTranslates the given text into the target language with style variations.\n\n**Request body:**\n\n```json\n{\n  \"text\": \"Hello, how are you?\",\n  \"format\": \"friendly\",\n  \"language\": \"bengali\"\n}\n```\n\n**Response:**\n\n```json\n{\n  \"translations\": [\n    \"হ্যালো, আপনি কেমন আছেন?\",\n    \"হাই, তুমি কেমন আছো?\",\n    \"হেলো, তোমার খবর কী?\",\n    \"হ্যালো, আপনার অবস্থা কেমন?\"\n  ]\n}\n```\n\n---\n\n### `GET /health`\n\nReturns a simple health check response.\n\n**Response:**\n\n```json\n{ \"status\": \"ok\" }\n```\n\n---\n\n**Supported `format` values for all endpoints:**\n\n| Value | Description |\n|---|---|\n| `professional` | Clear, formal, business-appropriate |\n| `friendly` | Warm and approachable |\n| `casual` | Relaxed, everyday language |\n| `formal` | Strict and official tone |\n| `flating` | Flirty compliments with light romantic interest |\n| `romantic` | Affectionate and emotionally warm |\n\n---\n\n## Caching System\n\nAs of v0.4, the backend uses an intelligent SHA256-based caching layer to avoid redundant API calls and reduce latency.\n\n**How it works:**\n\n- A unique cache key is generated from the full prompt and model identifier using SHA256 hashing\n- Cache entries expire automatically after **5 minutes** (TTL)\n- Different prompts always produce different cache keys, eliminating false cache hits\n\n**Example behavior:**\n\n```\nRequest 1: \"Hello\"    → Cache MISS  → Calls OpenRouter → Stores in cache\nRequest 2: \"Hi\"       → Cache MISS  → Calls OpenRouter → Stores in cache\nRequest 1 (repeat)    → Cache HIT   → Returns instantly (no API call)\n```\n\n**Performance improvements in v0.4:**\n\n| Metric | Before | After |\n|---|---|---|\n| Response Size | 100% | ~32% (65–70% reduction) |\n| API Cache Hits | 0% | ~60% |\n| Cache Key Collisions | High | 0% (SHA256 hashing) |\n| React Re-renders | High | Low (40–50% reduction) |\n| Bundle Size | 100% | ~87% (12–15% reduction) |\n| Request Cancellation | ❌ | ✅ Prevents zombie requests |\n| Security Headers | ❌ | ✅ XSS/Clickjacking protection |\n\n---\n\n## Deployment\n\nThe backend can be deployed to any Node.js-compatible cloud platform. Set the `OPENROUTER_API_KEY` environment variable, then update your clients' API endpoint accordingly.\n\n**Recommended platforms:**\n\n- [Render](https://render.com) — free tier available, easy GitHub integration\n- [Railway](https://railway.app) — fast deploys, simple environment management\n- [Fly.io](https://fly.io) — global edge deployment with Docker support\n- Any VPS (Ubuntu + PM2 or Docker)\n\n**Frontend deployment:**\n\nThe React web app deploys seamlessly to [Vercel](https://vercel.com). Set `VITE_API_ENDPOINT` as an environment variable in your Vercel project settings.\n\n---\n\n## Contributing\n\nContributions of all kinds are welcome — bug fixes, new features, documentation improvements, translations, and more.\n\n**How to contribute:**\n\n1. Fork the repository\n2. Create a new branch for your changes:\n   ```bash\n   git checkout -b feature/your-feature-name\n   ```\n3. Make your changes with clear, descriptive commits\n4. Test your changes thoroughly\n5. Open a pull request with a summary of what you've changed and why\n\n**Guidelines:**\n\n- Keep pull requests focused on a single change\n- Write clear commit messages (e.g., `fix: correct cache key collision on empty input`)\n- If you're adding a new feature, consider updating this README accordingly\n- Report bugs or suggest improvements via [GitHub Issues](https://github.com/mahmud-r-farhan/smart-reply/issues)\n\n---\n\n## License\n\nThis project is open source. See the repository for license details.\n\n---\n\nBuilt by [Mahmud Rahman](https://github.com/mahmud-r-farhan) · Powered by [OpenRouter](https://openrouter.ai)\n\n\u003e *\"Automate your responses. Amplify your productivity.\"*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmud-r-farhan%2Fsmart-reply","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmud-r-farhan%2Fsmart-reply","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmud-r-farhan%2Fsmart-reply/lists"}