Trustworthy Retrieval-Augmented Generation Knowledge Workbench
Verifiable Answers | Precise Citations | Document-Grounded Review
⬇️ Download · 📖 Documentation · 📋 Changelog
TrustRAG is a self-contained, multi-platform RAG knowledge workbench that runs entirely on your device. Upload documents, ask questions, and inspect the evidence behind each AI answer — with every citation traceable to its original source, page, and heading.
- Multi-platform desktop — Windows (.exe installer + portable), macOS, Linux, Android, iOS, Web — all from a single Flutter codebase
- Self-contained desktop mode — Embedded SQLite + Rust backend bundled inside the app; no external database, no server setup
- RAG pipeline — Document-grounded retrieval-augmented generation with configurable LLM and embedding providers
- Citation tracking — Every AI response includes traceable source citations linked to document, chunk, page, and heading
- Citation review — Approve, reject, or flag citations for accuracy with full review history
- Full-text search — FTS5-powered search across all uploaded documents
- Knowledge graph — Entity and relation extraction for cross-document exploration
- Workspace collaboration — Multi-user workspaces with role-based member management
- Server mode — Full-stack deployment with PostgreSQL + pgvector, Redis, MinIO, and Docker Compose
| Platform | Files |
|---|---|
| Windows | .exe installer, portable .zip |
| macOS | .tar.gz (universal) |
| Linux | .tar.gz (x64) |
| Android | .apk |
| iOS | .tar.gz (unsigned) |
| Web | .tar.gz (static files) |
TrustRAG operates in two modes:
Flutter Client (Windows / macOS / Linux / Android / iOS)
└── HTTP/SSE
└── Embedded Rust Backend (Axum)
├── Auth, workspace, document, search, chat, citation, review APIs
├── RAG orchestration and provider registry
└── SQLite + FTS5 (embedded, zero config)
Note: Desktop mode currently supports TXT, Markdown, and HTML documents. For PDF/DOCX parsing, please use Server Mode which includes the Python Document Processor.
Flutter Client (Web / Desktop)
└── HTTP/SSE
└── Rust Backend (Axum)
├── Auth, workspace, document, search, chat, citation, review APIs
├── RAG orchestration and provider registry
├── PostgreSQL + pgvector / pg_trgm
├── Redis
├── MinIO / S3-compatible object storage
└── Python Document Processor (FastAPI)
├── PDF parsing (PyMuPDF)
├── DOCX parsing (python-docx)
├── OCR (Tesseract)
└── Format conversion (Pandoc)
TrustRAG/
├── apps/client/ # Flutter multi-platform client
├── backend/ # Rust Axum backend (dual-mode: postgres/desktop)
├── doc-processor/ # Python FastAPI document processing service
├── infra/ # Docker Compose, Caddy, PostgreSQL init scripts
├── scripts/ # Release notes generator
├── docs/ # Product docs, API docs, roadmap
├── CHANGELOG.md # Release changelog
└── .github/workflows/ # CI/CD: ci.yml, test-build.yml, release.yml
| Layer | Technology |
|---|---|
| Client | Flutter, Dart, Riverpod, go_router, dio |
| Backend | Rust, Axum, tokio, SQLx, JWT, argon2, tracing |
| Document processor | Python, FastAPI, PyMuPDF, python-docx, pytesseract |
| Desktop data | SQLite + FTS5 |
| Server data | PostgreSQL 16, pgvector, pg_trgm, Redis 7, MinIO |
| CI/CD | GitHub Actions (ci + test-build + release) |
- Download the installer for your platform from Releases
- Install and launch TrustRAG
- Create a workspace, upload documents, start asking questions
cp .env.example .env
cd apps/client && flutter pub get && flutter build web --dart-define=API_BASE_URL=/api && cd ../..
cd infra && docker compose up --buildOpen http://localhost to access the web app.
# Backend
cd backend && cargo run
# Flutter client
cd apps/client && flutter run -d chrome --dart-define=API_BASE_URL=http://localhost:8080
# Document processor
cd doc-processor && pip install -r requirements.txt && uvicorn app.main:app --port 8081 --reload- Windows: May show SmartScreen warning on first launch — click More info → Run anyway
- macOS: App is unsigned — right-click and select "Open", or allow in System Settings > Privacy & Security
- Desktop mode: Uses SQLite with FTS5 for search; no external database needed
- Server mode: Requires Docker, PostgreSQL, Redis, and MinIO
Apache License 2.0 — see LICENSE.
- LINUX.DO community
Made by XimilalaXiang