Private, offline-first intelligent writing, translation & content intelligence studio powered by local on-device AI.
Features β’ Supported Models β’ Architecture β’ Getting Started β’ Build & Packaging β’ Tech Stack β’ License
AI Grammar Studio is a modern desktop writing environment designed from the ground up for absolute privacy and zero data leakage. Unlike traditional writing tools that transmit your sensitive keystrokes, corporate memos, or creative drafts to cloud servers, AI Grammar Studio executes 100% of its spell check, grammar correction, style enhancement, multi-lingual neural translation, AI content detection, plagiarism auditing, and syntactic parsing locally on your machine.
Whether running on a discrete GPU with Microsoft DirectML acceleration or an ultra-low-power CPU, AI Grammar Studio delivers private, low-latency, and unconstrained writing intelligence.
- Quick-Start Launcher Strip: Interactive instant-action banner to jump straight into the Grammar Editor or paste text from the clipboard with 1-click.
- Structured Workflow Grids: Clean separation into Writing & Language Studios (Grammar & Style Editor, Creative Writing, Neural Translation) and Linguistics, Auditing & Preferences (Deep Linguistic Analysis, AI & Plagiarism Detector, Models & Hardware).
- Live System Telemetry & Health Bar: Real-time indicators displaying 100% on-device privacy status, active grammar engine (dynamically resolved to the active model name or heuristic rules), compute backend (
AMD DirectML,NVIDIA CUDA,Intel DirectML, orCPU), and App Info shortcuts.
- Instant Heuristic Engine: Sub-millisecond rule-based spelling correction (NSpell + Hunspell), readability scoring (Flesch-Kincaid), clichΓ© detection, passive voice warnings, homophone & preposition alignment, double negative & comma splice fixes, and persistent custom user dictionaries.
- Deep Neural Engine: Local Seq2Seq neural models running directly on your CPU or GPU via ONNX Runtime to perform context-aware grammatical restructuring and stylistic polishing.
- 200+ Global Languages: Powered by Meta's NLLB-200 Distilled (600M Q4 Quantized) (
Xenova/nllb-200-distilled-600M), enabling high-fidelity multilingual translation completely offline with zero external API calls or subscription keys. - Dual-Pane Split Workbench: Source and target workbenches featuring live character/word counters, sample text loader, keyboard shortcuts (
Ctrl + Enter/Cmd + Enter), and fast copy actions. - Searchable Language Selector: Quick-pick pills for top languages (English, Spanish, French, German, Hindi) plus a searchable dropdown supporting 35+ major languages with localized native names.
- 1-Click Editor Integration: Seamlessly transfer translated text directly into the main Grammar Studio workspace via the "Open in Editor" action.
- Dynamic AI Status Pill: Reactive indicator displaying
β‘ Local AI Onlineorβ Local AI Offlinewith dedicated model management in Settings.
- Statistical NLP AI Detection: Evaluates word entropy, average perplexity, and sentence/document-level burstiness index (sentence length variation) with 100% offline privacy.
- Local Neural Classifier Ensemble: Integrates quantized neural classification models (including ModernBERT RAID AI Detector, TMR AI Text Detector, and RoBERTa OpenAI Detector) for hybrid ensemble scoring that detects text generated by GPT-4o, Claude 3.5, Gemini, and Llama 3.
- Dual-Mode Plagiarism Scanner:
- 100% Offline Mode: Detects internal structural self-duplication and includes a Local Reference Document Comparator using N-Gram Containment Measurement to cross-verify text against local files (
.txt,.md,.docx). - Online Web Mode (Toggleable): Extracts semantic n-gram shingles to scan public search indexes and the Wikipedia Open Search API with in-memory LRU caching, deduplication, and lightweight payload guards.
- 100% Offline Mode: Detects internal structural self-duplication and includes a Local Reference Document Comparator using N-Gram Containment Measurement to cross-verify text against local files (
- Interactive Sentence Heatmap: Visual color-coded highlighting (
Human,Mixed,Likely AI,Heavy AI) with click-to-inspect sentence inspection cards. - Enterprise Audit Report Generator: Official Certificate of Originality & AI Content Verification Report featuring verification IDs, document timestamps, visual score dials, and 1-click PDF Export (via Electron native
printToPDF()), HTML Export, JSON clipboard export, and direct printing.
- Multi-Style Tone Rewriting: Dynamically adapt text across 7 distinct writing modes:
Academicβ’Professionalβ’Casualβ’Conciseβ’Creativeβ’Confidentβ’Friendly
- Streaming Local LLM Generation: Real-time token streaming powered by modern open-weights instruction models (Qwen 3, Gemma 3, Llama 3.2, Qwen 2.5) with
<think>reasoning support.
- Voice Transformation: Automated conversion between Active Voice and Passive Voice with agentless passive handling and stative verb validation.
- Narration Conversion: Intelligent transformation between Direct Speech and Indirect Speech with pronoun backshifting, modal shifts, and exclamatory assertions.
- Degrees of Comparison: Transform adjectives seamlessly across Positive, Comparative, and Superlative degrees.
- Clause Breakdown: Classify sentences into Main clauses, Subordinate clauses, and Relative clauses.
- Tense & Timeline Mapping: Detect grammatical tense formulas and position verb phrases chronologically.
- Parts of Speech (POS): Color-coded tokenized syntax breakdown visualizer.
- Native WMI/CIM Hardware Queries: Directly queries physical GPU hardware in the Electron main process to capture GPU model names, dedicated VRAM capacity (e.g.
Radeon RX 570 Series (4 GB VRAM)), and driver information. - Virtual Display Adapter Filtering: Automatically ignores software and virtual adapters (e.g., Parsec, RDP, Basic Display).
- Intelligent Compute Backend Selection: Glassmorphic hardware banner in Settings displaying detected GPU chips, dedicated VRAM badges, vendor acceleration tags (
AMD DirectML,NVIDIA CUDA,Intel DirectML), and safe fallback confirmation modals.
- Frameless Custom Themed TitleBar: Native window dragging, dynamic page breadcrumbs with Lucide icons, live engine status indicator (
β‘ Local AI Ready/β¨ Fast Heuristic Engine), custom window controls, and quick theme toggle (Dark#05070d& Light#f8f9fa). - Multi-Metric Bottom Status Bar: Live word count, character count, estimated reading time, suggestion count badge, and glowing model status light.
- Custom Glassmorphic Modals: High-fidelity confirmation dialogs for model deletion, downloads, and fallback notices.
All models run 100% locally on your device through @xenova/transformers and onnxruntime-node with Q4/int8 quantization for low RAM/VRAM footprint:
| Category | Model Name | Hugging Face Repository | Parameters | Size | Specialty |
|---|---|---|---|---|---|
| Grammar | Gec-T5 Small | JonaWhisper/jonawhisper-gec-t5-small-onnx |
80M | ~120 MB | Ultra-fast, lightweight grammar correction |
| Grammar | Flan-T5 Base | onnx-community/t5-base-grammar-correction-ONNX |
250M | ~350 MB | Purpose-built grammar refinement |
| Grammar | Flan-T5 Large | Xenova/LaMini-Flan-T5-783M |
783M | ~850 MB | Deep instruction-following & structural edits |
| Grammar | CoEdIT Large | imrahamed/coedit-large-webgpu-onnx |
783M | ~3.2 GB | Grammarly's state-of-the-art text-editing model |
| Creative | Qwen 3 | onnx-community/Qwen3-0.6B-ONNX |
0.6B | ~877 MB | Fast creative generation & <think> reasoning |
| Creative | Gemma 3 | onnx-community/gemma-3-1b-it-ONNX |
1.0B | ~860 MB | Google's compact instruction-tuned model |
| Creative | Llama 3.2 | onnx-community/Llama-3.2-1B-Instruct-ONNX |
1.2B | ~1.6 GB | Meta's high-reasoning writing assistant |
| Creative | Qwen 2.5 | onnx-community/Qwen2.5-1.5B-Instruct |
1.5B | ~900 MB | Coherent text generation & tone rewriting |
| Creative | Qwen 3 | onnx-community/Qwen3-1.7B-ONNX |
1.7B | ~1.4 GB | Advanced creative writing & <think> reasoning |
| Detector | ModernBERT RAID AI Detector | onnx-community/modernbert-ai-detection-raid-mage-ONNX |
149M | ~144 MB | SOTA detection for GPT-4o, Claude 3.5, Gemini, Llama 3 |
| Detector | TMR AI Text Detector | onnx-community/tmr-ai-text-detector-ONNX |
125M | ~125 MB | Neural AI text classifier |
| Detector | RoBERTa OpenAI Detector | onnx-community/roberta-base-openai-detector-ONNX |
125M | ~125 MB | Fine-tuned OpenAI classifier |
| Translation | Meta NLLB-200 | Xenova/nllb-200-distilled-600M |
600M | ~875 MB | 100% offline translation across 200+ global languages |
graph TD
UI[Renderer Process - React 19 + Vite] -->|IPC Invocation| Main[Electron Main Process]
Main -->|Instant Checks| Quick[QuickGrammarEngine - Heuristics, NSpell, Style Rules]
Main -->|Plagiarism & NLP Checks| Detector[DetectorEngine - Perplexity, Burstiness, Online Shingles]
Main -->|Hardware Query| Hardware[Hardware Detection - WMI / CIM GPU & DirectML]
Main -->|Post Message| Worker[Dedicated AI Worker Thread]
Worker -->|ONNX Runtime / DirectML| Models[Local ONNX Model Cache]
Worker -->|Stream Chunks| Main
Main -->|IPC Events| UI
Main -->|Export PDF / HTML| Report[Audit Report Generator]
Main -->|Storage| LocalData[(Local Settings & Dictionary Store)]
- Node.js: v18.0.0 or higher
- npm: v9.0.0 or higher
- OS: Windows 10/11 (x64)
-
Clone the repository:
git clone https://github.com/sayandey021/AI-Grammar-Studio.git cd AI-Grammar-Studio -
Install dependencies:
npm install
-
Start in Development Mode:
npm run dev
This starts the Vite React development server with Hot Module Replacement (HMR), compiles the TypeScript main process, and launches the Electron desktop shell.
AI Grammar Studio includes automated Windows build scripts located in the scripts/ directory:
| Script | Command | Description |
|---|---|---|
scripts/build_all.bat |
npm run build:all |
Compiles frontend/backend and creates both .EXE and .MSIX in dist/. |
scripts/build_exe.bat |
npm run build:exe |
Generates a standalone NSIS Windows Installer (.exe). |
scripts/build_msix.bat |
npm run build:msix |
Generates a signed Windows Store Package (.msix / .appx). |
scripts/change_version.bat |
npm run set-version |
Interactively updates version numbers across package.json and manifests. |
scripts/generate-icons.ps1 |
β | PowerShell script to generate all AppX / MSIX tile logo asset scales. |
βββ .github/ # GitHub Actions CI, issue templates & PR guidelines
βββ assets/ # Application icons & visual branding assets
βββ build/ # AppX / MSIX packaging resources and tile logos
βββ scripts/
β βββ build_all.bat # Unified build script (.EXE + .MSIX)
β βββ build_exe.bat # Standalone Windows NSIS installer builder
β βββ build_msix.bat # Microsoft Store package builder
β βββ change_version.bat # Interactive version management script
β βββ generate-icons.ps1 # PowerShell script to generate AppX store logo variants
β βββ set-version.js # Automated semantic version updater
βββ src/
β βββ main/ # Electron Main Process
β β βββ detector/ # Plagiarism & AI detection engine (NLP, entropy, shingling)
β β β βββ detectorEngine.ts
β β β βββ detectorEngine.test.ts
β β βββ grammar/ # Rule-based quick grammar, style & linguistic engines
β β β βββ rules/ # Narration, voice, degree, dictionary, typography rules
β β β βββ AIGrammarEngine.ts
β β β βββ QuickGrammarEngine.ts
β β β βββ QuickGrammarEngine.test.ts
β β βββ models/ # ONNX model manager & direct HTTPS download coordinator
β β β βββ ModelManager.ts
β β βββ aiWorker.ts # Isolated background worker thread for AI inference
β β βββ index.ts # Main process entry, IPC handlers, WMI GPU query, window lifecycle
β β βββ preload.ts # Secure contextBridge IPC bridge
β β βββ storage.ts # Persistent JSON storage for user settings & custom dictionaries
β βββ renderer/ # React 19 Frontend (Vite)
β βββ src/
β β βββ components/ # Reusable UI components (Sidebar, TitleBar, ConfirmModal, ReportModal)
β β βββ pages/ # Studio pages (Dashboard, Editor, Prompt, Translation, Detector, Analysis, Settings, About)
β β βββ styles/ # Design system, glassmorphism tokens & custom CSS themes
β β βββ App.tsx # Root layout & studio view routing
β β βββ main.tsx # React DOM entry point
β βββ index.html # HTML shell
βββ .gitignore # Git ignore patterns
βββ CHANGELOG.md # Detailed release history & migration notes
βββ CONTRIBUTING.md # Contribution guidelines & development conventions
βββ LICENSE # GPL-3.0 Open Source License
βββ package.json # Project configuration & build target definitions
βββ tsconfig.json # Renderer TypeScript configuration
βββ tsconfig.node.json # Main process TypeScript configuration
βββ vite.config.ts # Vite bundler configuration
βββ vitest.config.ts # Unit test configuration
| Domain | Technology | Description |
|---|---|---|
| Desktop Shell | Electron 43 | Cross-platform Chromium & Node.js desktop framework |
| Frontend Framework | React 19 | Component architecture & modern state management |
| Language | TypeScript 7 | Strict type safety across main and renderer processes |
| Bundler & Tooling | Vite 8 | Lightning-fast HMR and optimized production bundling |
| Local AI Engine | @xenova/transformers | Local ONNX pipeline execution for Seq2Seq, LLMs, and classifiers |
| GPU Acceleration | Microsoft DirectML (NAPI v6) | Cross-vendor GPU acceleration for AMD, NVIDIA, and Intel hardware |
| Translation Engine | Meta NLLB-200 Distilled | 100% offline multilingual translation across 200+ languages |
| AI Detection & Audit | ModernBERT RAID + NLP Metrics | Quantized neural classifiers & entropy/perplexity statistical metrics |
| Natural Language Heuristics | Compromise, NSpell, Write-Good | Sub-millisecond spelling, style, and syntactic parsing |
| Icons | Lucide React | Clean, consistent vector iconography |
| Test Runner | Vitest 4 | Fast unit testing for grammar and detector engines |
| Packager | electron-builder 26 | NSIS standalone installer and signed AppX / MSIX packaging |
Run comprehensive unit tests covering the grammar rule engine and AI/plagiarism detector via Vitest:
npm testContributions, bug reports, and feature suggestions are welcome! Please check out CONTRIBUTING.md for local development workflows and guidelines.
This project is licensed under the GNU General Public License v3.0.