2026-01-30 23:14:06 +01:00
# TextDB
2026-03-14 00:35:14 +01:00
TextDB is a **non-destructive** , completely offline, local-first text editor with built-in Markdown preview and local AI writing tools. Its core promise is simple: your edits never overwrite your history. Every manual save is immutable and append-only, and autosaves are kept as a separate draft layer. With a local Ollama model (recommended: `ministral:3b` ), it can convert plain text to Markdown, proofread, summarize, translate, rewrite, change style, or run a custom instruction against a whole text or a selected passage. No accounts, no telemetry, no remote fonts, and no outside network calls.
2026-01-30 23:14:06 +01:00
## Features
2026-02-01 03:18:06 +01:00
- Non-destructive editing: immutable manual saves + safe autosaved drafts.
- Version history panel with quick restore.
2026-03-14 00:35:14 +01:00
- Markdown preview mode with split view, printable output, clickable links, and automatic raw URL detection.
- Local AI tools via Ollama for Markdown conversion, proofreading, summarizing, translation, rewriting, style changes, and custom prompts.
- AI edits can run on the whole text or just the selected part, and results are written back as drafts.
- In-document search with Cmd/Ctrl+F, result highlighting, and next / previous navigation.
- Live document stats in the footer: characters, words, sentences, and estimated tokens.
2026-02-01 03:19:27 +01:00
- Sort your texts in nested folders with expandable tree; move items around via right-click.
2026-03-14 00:35:14 +01:00
- Open/import text files from the file picker or system “Open With”; export to `.txt` , export the database, or print / `.pdf` .
- Settings for theme, text size, line numbers, split view, Ollama connection, and editable AI prompt templates.
2026-01-30 23:14:06 +01:00
## Use cases
- **Non-destructive notepad**: jot ideas without fear of losing earlier thoughts.
- **Safe editor for authors**: keep every revision and compare or roll back at any time.
- **Research notes**: maintain evolving notes with an audit trail of changes.
- **Sensitive drafts**: keep local-only writing with immutable history and zero cloud sync.
- **Prompt or snippet library**: store and iterate on reusable text safely.
2026-03-14 00:35:14 +01:00
- **Offline writing assistant**: run local AI edits without sending text to external services.
2026-01-30 23:14:06 +01:00
## Tech stack
- Tauri v2
- React + Vite + TypeScript
- SQLite via `@tauri-apps/plugin-sql`
## Install & run
1) Install dependencies:
```
npm install
```
2) Start the app:
```
npm run tauri dev
```
2026-03-14 00:35:14 +01:00
For local AI tools, install Ollama: `https://ollama.com`
2026-02-01 05:25:08 +01:00
2026-01-30 23:14:06 +01:00
## Autosave + versioning behavior
- Typing triggers a debounced autosave (~600ms) that writes to the draft record.
- Manual saves (Cmd/Ctrl+S or the button) append a new version and clear any draft.
2026-03-14 00:35:14 +01:00
- AI edits preserve the current text state first when needed, then write the AI result back as a new draft.
2026-01-30 23:14:06 +01:00
- Autosave only overwrites the single draft row; manual versions are never overwritten.
- History shows all manual versions plus the current draft (if any).
## Local storage
- SQLite is loaded via `Database.load("sqlite:text.db")` .
- The database file is stored in the Tauri app data directory.
- The app is fully offline by design: no telemetry, no external fonts, no CDNs.
2026-03-14 00:35:14 +01:00
- UI settings (theme, text size, line numbers, split view, sidebar + folder collapse state, last selected text, and AI prompt templates) are stored in localStorage.