OpenWriter
π A modern, open-source document editor built with Tauri, React & TypeScript
OpenWriter is a powerful, cross-platform desktop document editor that combines the speed of native applications with modern web technologies. Create, edit, and export documents with AI-powered writing assistance.
β¨ Features
- π Rich Text Editing - Full-featured editor powered by CKEditor 5 with formatting, lists, tables, and more
- π Multiple Format Support - Import/Export DOCX, PDF, and HTML files
- π Paged View - Realistic document preview with page layouts
- π€ AI Writing Assistant - Rewrite, summarize, and continue writing with Groq AI
- π¨ Modern UI - Clean, responsive interface with dark/light themes
- π₯οΈ Cross-Platform - Runs natively on Windows, macOS, aβ¦
OpenWriter
π A modern, open-source document editor built with Tauri, React & TypeScript
OpenWriter is a powerful, cross-platform desktop document editor that combines the speed of native applications with modern web technologies. Create, edit, and export documents with AI-powered writing assistance.
β¨ Features
- π Rich Text Editing - Full-featured editor powered by CKEditor 5 with formatting, lists, tables, and more
- π Multiple Format Support - Import/Export DOCX, PDF, and HTML files
- π Paged View - Realistic document preview with page layouts
- π€ AI Writing Assistant - Rewrite, summarize, and continue writing with Groq AI
- π¨ Modern UI - Clean, responsive interface with dark/light themes
- π₯οΈ Cross-Platform - Runs natively on Windows, macOS, and Linux
- β‘ Lightning Fast - Native performance with Tauriβs Rust backend
- π Privacy First - Your documents stay on your machine
π οΈ Tech Stack
| Layer | Technology |
|---|---|
| Frontend | React 19, TypeScript, Vite, Tailwind CSS 4 |
| Editor | CKEditor 5 |
| Backend | Tauri 2, Rust |
| Document Processing | docx, mammoth, jsPDF, html2canvas |
| AI Integration | Groq API (Llama models) |
π Prerequisites
Before you begin, ensure you have the following installed on your system:
Required Software
| Software | Version | Installation Link |
|---|---|---|
| Node.js | v18.0+ | Download Node.js |
| npm | v9.0+ | Comes with Node.js |
| Rust | Latest stable | Install Rust |
| Git | Any recent | Download Git |
Platform-Specific Requirements
πͺ Windows
Visual Studio Build Tools 2019+
- Download from Visual Studio Downloads
- During installation, select "Desktop development with C++"
WebView2 Runtime
- Usually pre-installed on Windows 10/11
- If needed: Download WebView2 π macOS
- Xcode Command Line Tools
xcode-select --install
π§ Linux (Ubuntu/Debian)
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
π Installation & Setup
Step 1: Clone the Repository
git clone https://github.com/RKG765/OpenWriter.git
cd OpenWriter
Step 2: Install Node.js Dependencies
npm install
This will install all frontend dependencies including:
- React & React DOM
- CKEditor 5
- Tauri plugins (dialog, fs, opener)
- Document processing libraries (docx, mammoth, jsPDF)
- Development tools (Vite, TypeScript, Tailwind CSS)
Step 3: Install Rust Dependencies
The Rust dependencies will be automatically installed when you first run or build the app. However, you can pre-install them:
cd src-tauri
cargo fetch
cd ..
Step 4: Verify Installation
# Check Node.js
node --version # Should be v18.0.0 or higher
# Check npm
npm --version # Should be v9.0.0 or higher
# Check Rust
rustc --version # Should show latest stable version
# Check Cargo
cargo --version
βΆοΈ Running the Application
Development Mode (Recommended for Development)
npm run tauri dev
This command will:
- Start the Vite development server with hot-reload
- Compile the Rust backend
- Launch the OpenWriter application
Note: The first run may take several minutes as Rust compiles all dependencies.
Frontend Only (For UI Development)
npm run dev
Opens the app in your browser at http://localhost:1420 (without Tauri backend features).
Production Build
npm run tauri build
The compiled installers will be available in:
src-tauri/target/release/bundle/
βββ msi/ # Windows installer
βββ dmg/ # macOS installer
βββ deb/ # Debian/Ubuntu package
βββ AppImage/ # Linux AppImage
βοΈ Environment Variables & Configuration
API Key Setup (For AI Features)
OpenWriter uses Groq API for AI writing assistance. The API key is configured within the app:
Get a Free API Key:
- Visit console.groq.com
- Create a free account
- Generate an API key
Configure in OpenWriter:
- Open the application
- Click the βοΈ settings icon in the AI Sidebar
- Enter your Groq API key
- Click Save Key
Note: The API key is stored securely in your browserβs localStorage and never leaves your device except when making API calls.
Optional Environment Variables
Create a .env file in the root directory for development customization:
# Development server port (default: 1420)
VITE_DEV_SERVER_PORT=1420
# Enable debug logging
VITE_DEBUG=true
Tauri Configuration
Main configuration is in src-tauri/tauri.conf.json:
{
"productName": "OpenWriter",
"version": "0.1.0",
"identifier": "com.openwriter.app"
}
π Project Structure
OpenWriter/
βββ src/ # React frontend
β βββ components/
β β βββ Editor.tsx # Main CKEditor wrapper
β β βββ Toolbar.tsx # Document toolbar & actions
β β βββ PagedView.tsx # Page layout preview
β β βββ StatusBar.tsx # Bottom status bar
β β βββ AISidebar.tsx # AI writing assistant
β βββ hooks/ # Custom React hooks
β βββ services/ # API & utility services
β βββ App.tsx # Main application component
β βββ App.css # Global styles
β βββ main.tsx # Entry point
β
βββ src-tauri/ # Rust backend
β βββ src/
β β βββ lib.rs # Library entry
β β βββ main.rs # Application entry
β βββ capabilities/ # Tauri security permissions
β βββ icons/ # App icons
β βββ Cargo.toml # Rust dependencies
β βββ tauri.conf.json # Tauri configuration
β
βββ public/ # Static assets
βββ package.json # Node.js dependencies
βββ vite.config.ts # Vite configuration
βββ tailwind.config.js # Tailwind CSS config
βββ tsconfig.json # TypeScript config
βββ .gitignore # Git ignore rules
π¦ Available Scripts
| Command | Description |
|---|---|
npm run dev | Start frontend dev server only |
npm run build | Build frontend for production |
npm run preview | Preview production build |
npm run tauri dev | Run full app in development mode |
npm run tauri build | Build native application installers |
πΊοΈ Roadmap & Future Scope
π― Version 0.2.0 (Planned)
- Cloud Sync - Google Drive / OneDrive integration
- Real-time Collaboration - Multiple users editing simultaneously
- Custom Templates - Document templates for various use cases
- Spell Check - Built-in spell checking and grammar suggestions
π― Version 0.3.0 (Planned)
- Plugin System - Extensible architecture for community plugins
- Markdown Support - Native markdown editing and preview
- Version History - Track document changes over time
- Comments & Annotations - Collaborative review features
π― Version 1.0.0 (Vision)
- Mobile Apps - iOS and Android companion apps
- End-to-End Encryption - Secure document storage
- Offline AI - Local AI models for privacy-focused users
- Advanced Export - ePub, LaTeX, and more formats
- Accessibility - Full WCAG 2.1 compliance
- Localization - Multi-language support
π‘ Feature Requests
Have an idea? Open a feature request!
π οΈ What You Can Implement (Contributor Ideas)
Looking to contribute? Here are features you can pick up and implement:
π’ Beginner Friendly (Good First Issues)
| Feature | Description | Tech Stack |
|---|---|---|
| Dark/Light Theme Toggle | Add UI toggle for theme switching | React, CSS |
| Word Count Display | Real-time word/character count in status bar | React |
| Keyboard Shortcuts Help | Modal showing all available shortcuts | React, HTML |
| Recent Files List | Show recently opened documents | React, localStorage |
| Print Document | Add print functionality | Browser API |
| Auto-Save Indicator | Visual feedback when document is saved | React |
π‘ Intermediate
| Feature | Description | Tech Stack |
|---|---|---|
| Find & Replace | Search and replace text within document | CKEditor API, React |
| Custom Fonts | Allow users to add/use custom fonts | CSS, React |
| Table of Contents | Auto-generate TOC from headings | CKEditor, React |
| Document Statistics | Reading time, paragraph count, etc. | React |
| Zoom Controls | Zoom in/out on document view | CSS, React |
| Spell Check Integration | Integrate browser spell check or external API | CKEditor, API |
| Image Resize Handles | Allow resizing images in editor | CKEditor plugins |
| Export to Markdown | Convert document to .md format | Turndown.js |
π΄ Advanced
| Feature | Description | Tech Stack |
|---|---|---|
| Plugin System | Architecture for loading community plugins | React, TypeScript |
| Collaborative Editing | Real-time multi-user editing | WebSocket, CRDT |
| Version History | Track and restore document versions | IndexedDB, React |
| Cloud Sync | Google Drive / OneDrive integration | OAuth, REST APIs |
| Offline AI Models | Run AI locally using ONNX/Ollama | Rust, WASM |
| Custom Templates | Template creation and management system | React, File system |
| Accessibility Audit | WCAG 2.1 compliance improvements | ARIA, Semantic HTML |
π How to Pick a Feature
- Comment on an issue expressing your interest
- Fork the repo and create a feature branch
- Implement with tests if applicable
- Open a PR with screenshots/demos
- Iterate based on feedback
π€ Contributing
We welcome contributions from everyone! Hereβs how you can help:
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/OpenWriter.git
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes
- Commit with a descriptive message:
git commit -m "feat: add amazing feature"
- Push to your branch:
git push origin feature/amazing-feature
- Open a Pull Request
Contribution Ideas
- π Bug Fixes - Check open issues
- π Documentation - Improve docs, add examples
- π Translations - Help translate the app
- π¨ UI/UX - Design improvements
- β‘ Performance - Optimize code and reduce bundle size
π Known Issues
- PDF export may have minor styling differences from editor view
- Large documents (100+ pages) may experience slight performance slowdown
- Some complex DOCX formatting may not import perfectly
π License
This project is licensed under a Custom Non-Commercial License - see the LICENSE file for details.
In summary:
- β Free for personal & educational use
- β Contributions welcome
- β οΈ Attribution required
- β Commercial use requires permission from @RKG765
π¬ Support & Community
- π Bug Reports: Open an Issue
- π‘ Feature Requests: Start a Discussion
- π§ Email: Contact Maintainer
π Acknowledgments
- Tauri - Lightweight, secure desktop framework
- CKEditor 5 - Professional rich text editor
- React - UI component library
- Groq - Fast AI inference
- All our amazing contributors!
β Star this repo if you find it useful! β
Made with β€οΈ by RKG765 and the open-source community