A distraction-free writing application with AI-powered assistance, built with Tauri, SvelteKit, and TypeScript.
/ menu| Layer | Technology |
|---|---|
| Desktop Framework | Tauri 2.0 (Rust) |
| Frontend Framework | SvelteKit 2.9 + Svelte 5 |
| Editor | Tiptap 3.18 (ProseMirror-based) |
| Styling | Tailwind CSS 4 |
| UI Components | bits-ui |
| Language | TypeScript 5.6 (strict mode) |
| Package Manager | Bun |
webkit2gtk, libappindicatorbun install
Run the desktop application in development mode:
bun run tauri:dev
Or run just the web frontend (without Tauri):
bun run dev
Build the production application:
bun run tauri:build
Output binaries are located in src-tauri/target/release/bundle/.
zen-writer/
├── src/ # Frontend (SvelteKit)
│ ├── lib/
│ │ ├── components/
│ │ │ ├── editor/ # Editor components
│ │ │ │ ├── ZenEditor.svelte # Main Tiptap editor
│ │ │ │ ├── BubbleMenu.svelte # Selection toolbar
│ │ │ │ └── SlashMenu.svelte # Command palette
│ │ │ └── ui/ # Reusable UI components
│ │ ├── extensions/ # Custom Tiptap extensions
│ │ │ └── ghost-text.ts # AI suggestion extension
│ │ ├── stores/ # State management
│ │ │ └── document.svelte.ts
│ │ └── tauri/ # Tauri IPC wrappers
│ │ └── commands.ts
│ └── routes/
│ └── +page.svelte # Main application
├── src-tauri/ # Backend (Rust)
│ ├── src/
│ │ ├── main.rs # Entry point
│ │ └── lib.rs # Commands & document storage
│ └── tauri.conf.json # Tauri configuration
└── package.json
| Shortcut | Action |
|---|---|
/ |
Open command menu |
Cmd+K |
AI chat with selection |
Tab |
Accept ghost suggestion |
Esc |
Dismiss menu/suggestion |
| Shortcut | Action |
|---|---|
Cmd+B |
Bold |
Cmd+I |
Italic |
Cmd+U |
Underline |
Cmd+Shift+X |
Strikethrough |
Cmd+E |
Inline code |
| Shortcut | Action |
|---|---|
Cmd+S |
Save document |
Cmd+N |
New document |
Cmd+\ |
Toggle AI sidebar |
Cmd+. |
Toggle zen mode |
? |
Show shortcuts |
bun run dev # Start SvelteKit dev server
bun run build # Build static frontend
bun run preview # Preview production build
bun run check # TypeScript type checking
bun run tauri:dev # Run Tauri in development
bun run tauri:build # Build production app
bun run lint # Run linters (oxlint + biome)
bun run lint:fix # Auto-fix lint issues
bun run format # Format code with biome
User Input → Document Store → Tauri Command → Rust Backend → File System
↓
Auto-save (2s debounce)
↓
~/.config/zen-writer/documents/
The Rust backend exposes these commands (currently mock implementations):
complete_text - Ghost text suggestionstransform_text - Rewrite/edit selected textanalyze_document - Document analysis and feedbackUses Svelte 5 runes for reactive state:
// Reactive state
let currentDocument = $state<Document | null>(null);
let documents = $state<Document[]>([]);
// Derived values
const isDirty = $derived(/* ... */);
const saveStatus = $derived(/* ... */);
src-tauri/tauri.conf.json)com.zenwriter.apptsconfig.json)$lib → ./src/libbiome.json)Recommended extensions:
MIT