{"id":47666101,"url":"https://github.com/swadhinbiswas/opengrammar","last_synced_at":"2026-04-02T11:57:50.961Z","repository":{"id":341075947,"uuid":"1162436511","full_name":"swadhinbiswas/opengrammar","owner":"swadhinbiswas","description":"A Opensource and self hosted alternative of Grammarly","archived":false,"fork":false,"pushed_at":"2026-03-28T07:46:16.000Z","size":1203,"stargazers_count":83,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-28T08:32:26.241Z","etag":null,"topics":["alternative","chrome","extension","extensions","grammerly","opensource-projects"],"latest_commit_sha":null,"homepage":"http://opengrammer.eu.cc/","language":"TypeScript","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/swadhinbiswas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-20T09:05:04.000Z","updated_at":"2026-03-28T07:32:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/swadhinbiswas/opengrammar","commit_stats":null,"previous_names":["swadhinbiswas/opengrammar"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/swadhinbiswas/opengrammar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swadhinbiswas%2Fopengrammar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swadhinbiswas%2Fopengrammar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swadhinbiswas%2Fopengrammar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swadhinbiswas%2Fopengrammar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swadhinbiswas","download_url":"https://codeload.github.com/swadhinbiswas/opengrammar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swadhinbiswas%2Fopengrammar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["alternative","chrome","extension","extensions","grammerly","opensource-projects"],"created_at":"2026-04-02T11:57:50.314Z","updated_at":"2026-04-02T11:57:50.950Z","avatar_url":"https://github.com/swadhinbiswas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"logo.svg\" alt=\"OpenGrammar Logo\" width=\"120\" height=\"120\"\u003e\n  \n  # 🪶 OpenGrammar 2.0\n\n  **Your privacy-first, open-source writing assistant.**  \n  *The completely free, zero-compromise Grammarly alternative you can host yourself.*\n\n  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n  [![NPM Package](https://img.shields.io/npm/v/opengrammar-server)](https://www.npmjs.com/package/opengrammar-server)\n  [![Docker Pulls](https://img.shields.io/docker/pulls/swdhinbiswas/opengrammar-backend)](https://hub.docker.com/r/swdhinbiswas/opengrammar-backend)\n  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\n  🌐 **[Official Website](https://opengrammer.eu.cc)** | 📖 **[Documentation Site](https://opengrammer.eu.cc/docs)**\n\u003c/div\u003e\n\n---\n\nWriting clearly matters. But achieving perfect grammar shouldn't mean sacrificing your privacy or paying a premium monthly subscription to a tech giant. \n\n**OpenGrammar** is a powerful intelligent writing assistant built to match the premium writing tools you already know, but with one massive difference: **You own your data, and it runs completely for free.**\n\n## 🌟 Why OpenGrammar?\n\n1. **The Zero-Cost Foundation:** Out of the box, our core engine runs 100% locally in your browser. With a massive 156,000-word offline dictionary, it instantly catches misspellings, passive voice, and weak phrasing without ever pinging a server.\n2. **Bring Your Own Brain (BYOK):** Want deep, context-aware AI corrections? Just plug in your own API key (OpenAI, Groq, Together, OpenRouter, or local models via Ollama). You pay fractions of a cent exclusively for what you use.\n3. **Paranoid-Level Privacy:** We don't have a database. We don't want your data. Your API key never leaves your browser storage. Text processed through the AI is immediately deleted via stateless edge functions.\n4. **Deploy It Yourself:** You own the entire pipeline. Host our lightweight backend instantly via Docker, NPM, Cloudflare, Vercel, or Netlify.\n\n---\n\n## 🚀 Live Production Endpoints\n\nDon't want to host the backend yourself? OpenGrammar comes with incredibly fast, globally-distributed public edge deployments that you can connect your browser extension to instantly:\n\n- ☁️ **Cloudflare Workers:** [`https://cf.opengrammer.eu.cc/`](https://cf.opengrammer.eu.cc/)\n- △ **Vercel Edge:** [`https://vercel.opengrammer.eu.cc/`](https://vercel.opengrammer.eu.cc/)\n- 🟩 **Netlify Functions:** [`https://nl.opengrammer.eu.cc/`](https://nl.opengrammer.eu.cc/)\n\n---\n\n## 🛠️ Usage \u0026 Installation Environments\n\nOur backend is natively multi-platform. Choose the environment that best fits your workflow.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e📦 1. NPM / Mobile / Node Environments (Recommended for easy local use)\u003c/b\u003e\u003c/summary\u003e\n\nRun the OpenGrammar server on any machine with Node.js. You can effortlessly run this on an old laptop, a Raspberry Pi, or even an Android phone using **Termux**!\n\n```bash\n# Run instantly without installing\nnpx opengrammar-server\n\n# Or install globally for persistent usage\nnpm i -g opengrammar-server\n\n# Start the server on port 8787\nopengrammar-server --port 8787\n```\n\n**📱 Android (Termux) Setup:**\n1. Install Termux.\n2. Run `pkg update \u0026\u0026 pkg install nodejs`.\n3. Run `npx opengrammar-server`. Your phone is now a local grammar API!\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🐳 2. Docker Setup\u003c/b\u003e\u003c/summary\u003e\n\nWe maintain a highly optimized, multi-architecture Docker image. This is the recommended route for standard server environments or local homelabs.\n\n```bash\n# Pull the production image straight from Docker Hub\ndocker pull swdhinbiswas/opengrammar-backend:latest\n\n# Run the container locally (exposes port 8787)\ndocker run -d -p 8787:8787 --name opengrammar swdhinbiswas/opengrammar-backend:latest\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🧩 3. Browser Extension (For End Users)\u003c/b\u003e\u003c/summary\u003e\n\n1. Download the latest release from the `opengrammar/extension/dist` build.\n2. Open Chrome/Brave/Edge and navigate to `chrome://extensions/`.\n3. Enable **Developer Mode**.\n4. Click **Load unpacked** and select the extension folder.\n5. Click the OpenGrammar feather icon in your toolbar, input your custom AI API keys, and optionally link the Server URL to one of our **Live Production Endpoints** above!\n\u003c/details\u003e\n\n---\n\n## 🔌 API Reference \u0026 Environment Variables\n\nIf you are hosting OpenGrammar yourself via Docker or NPM, you have full access to its modular REST API endpoints.\n\n### Environment Variables (.env)\nCreate a `.env` file in your runtime directory to configure the AI routing logic.\n\n| Variable | Description |\n|----------|-------------|\n| `PORT` | Server port (default: `8787`) |\n| `GROQ_API_KEY` | Groq API key for ultra-fast AI grammar rewriting |\n| `OPENAI_API_KEY` | OpenAI API key for premium AI models |\n\n### Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET`  | `/`            | Status dashboard \u0026 Engine Version |\n| `GET`  | `/health`      | Server health check |\n| `POST` | `/analyze`     | Advanced grammar analysis |\n| `POST` | `/autocomplete`| AI Context-aware text completion |\n| `GET`  | `/providers`   | Returns configured AI providers |\n\n**Example Request:**\n```bash\ncurl -X POST http://localhost:8787/analyze \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Me and him went to store yesterday.\"}'\n```\n\n---\n\n## ✨ Application Features\n\n- **The Dual-Engine Architecture:** A blazing fast local (offline) RegEx + Dictionary matching engine, paired securely with a configurable LLM router framework for tone rewriting and smart context adjustments.\n- **Deduplication Logic:** The AI is fully synchronized with the local spellchecker. It never wastes expensive AI tokens re-checking typos already caught locally.\n- **Smart Context Awareness:** Automatically detects if you are writing a casual tweet, a technical document, or a formal business email, scaling its strictness appropriately.\n- **Dynamic Writing Score:** Evaluates your text dynamically (0-100) based on Correctness, Readability, Engagement, and Sentence Delivery.\n- **Flawless Integrations:** Securely injects into rich-text editors including Gmail, GoogleDocs, Notion, and Reddit.\n\n---\n\n## 🤝 Contributing\n\n**We need your help to unseat the monopolies and make OpenGrammar the definitive open-source writing assistant.**\n\nWhether you are a TypeScript developer wanting to optimize Vercel Edge latency, or a language nerd looking to build out our offline Regex `GRAMMAR_RULES.md`—we want you! \n\n- Read our [CONTRIBUTING.md](./CONTRIBUTING.md) guide to get started locally.\n- Check our `ROADMAP.md` to see what features we are currently building.\n- Found a bug? Open an Issue. Have an idea? Start a thread in our Discussions tab.\n\n## 📄 License\n\nThis project is proudly open-source under the **Apache 2.0 License**. See the `LICENSE` file for details. Let's build the future of writing together.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswadhinbiswas%2Fopengrammar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswadhinbiswas%2Fopengrammar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswadhinbiswas%2Fopengrammar/lists"}