Readur

A self-hosted document management system that OCRs, indexes, and makes every PDF, scan, and Office file instantly searchable.

794stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
81/100Excellent
Development Activity100
Maintenance100
Community44
Maturity40
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture82
Code Quality88
Innovation68
Learning Curve75

Readur is a self-hosted document management system built with a Rust (Axum) backend and a React/TypeScript frontend, designed to make scanned paperwork and digital files as searchable as a modern inbox. Documents dropped in through the web UI, a watched folder, WebDAV, or S3-compatible storage are automatically OCR’d with Tesseract, indexed into PostgreSQL full-text search, and made available through simple, phrase, fuzzy, and boolean search modes.

Beyond OCR, Readur handles the operational side of running a document store: JWT-based auth with optional OIDC/SSO, role-based access control, hierarchical color-coded labels, multi-language OCR with automatic language detection, and health monitoring for every configured sync source. A background queue processes OCR jobs and folder/WebDAV/S3 syncs without blocking uploads, and a WebSocket layer streams live progress back to the UI.

The whole stack ships as a single Docker Compose deployment — Rust binary, PostgreSQL, and the built React frontend — with Prometheus metrics, Swagger UI, and a Helm chart available for teams that want it running in Kubernetes instead.

What You Get

  • Automatic OCR text extraction via Tesseract, with multi-language detection running across a document set simultaneously
  • PostgreSQL full-text search with simple, phrase, fuzzy, and boolean query modes
  • Multi-source ingestion from drag-and-drop upload, watched local folders, WebDAV, and S3-compatible storage
  • JWT authentication with bcrypt hashing plus OIDC/SSO for centralized identity
  • Hierarchical, color-coded labels for organizing documents beyond folder structure
  • Built-in Swagger UI and Prometheus metrics for operating the service in production

Common Use Cases

  • Digitizing paper mail and receipts scanned into a network scanner’s watch folder
  • Centralizing scattered PDFs and Office docs from a NAS or S3 bucket into one searchable index
  • Small teams needing shared, role-based access to internal documents without a SaaS subscription
  • Self-hosters replacing a cloud drive’s OCR search with a private, on-prem equivalent
  • Home users archiving warranties, manuals, and tax documents with full-text retrieval

Under The Hood

Architecture Readur is deliberately built and documented as a single-instance monolith rather than a horizontally-scaled service: the Axum web server, business logic, and background workers (OCR queue, file watcher, source scheduler) all run inside one process sharing state through an Arc<AppState>. Routes (src/routes/*.rs) stay thin HTTP handlers that delegate into domain services (src/services/* — file, OCR retry, WebDAV, S3, local-folder), which in turn call per-domain data-access modules (src/db/* — documents, users, sources, webdav, settings). Uploaded or synced files flow into a database-backed OCR queue (src/ocr/queue.rs) that the background worker drains independently of the request path, with progress streamed back to the frontend over WebSockets. Cargo feature flags (ocr, s3) conditionally compile out the Tesseract and AWS SDK dependencies, so a build can be assembled without either.

Tech Stack The backend is Rust on Tokio, using Axum 0.8 for HTTP/WebSocket routing, sqlx against PostgreSQL, jsonwebtoken plus bcrypt for local auth and the oauth2 crate for OIDC/SSO, aws-sdk-s3 for S3-compatible storage, the tesseract crate for OCR, and utoipa/utoipa-swagger-ui for a generated OpenAPI/Swagger interface. The CLI is built on clap, exposing serve and reset-admin-password subcommands. The frontend is React 19 with TypeScript, Material-UI v7 components, react-router-dom, react-hook-form, and i18next for localization, built with Vite. Deployment is a multi-stage Dockerfile bundling the compiled binary with the built frontend, a docker-compose stack including Postgres, and a Helm chart for Kubernetes.

Code Quality The repository carries an extensive test suite — well over a hundred backend integration and unit test files plus frontend Vitest and Playwright end-to-end suites — backed by separate CI workflows for unit, integration, e2e, WebDAV stress tests, and CodeQL static analysis on every push. Integration tests spin up real PostgreSQL instances via testcontainers rather than mocking the database, using shared TestContext/TestAuthHelper fixtures. Error handling is structured rather than ad hoc: each domain has its own error module under src/errors/, built on thiserror and unified behind an AppError trait that carries HTTP status, user-facing message, error code, category, and severity into a dedicated error-monitoring subsystem.

What Makes It Unique Compared to established self-hosted document-OCR tools built on heavier frameworks, Readur’s Rust/Axum foundation gives it a lighter runtime footprint and a queue-driven, database-backed background job system with no separate message-broker dependency. Its per-source error classifiers (distinct handling for S3, local-folder, and WebDAV failure modes) and health-tracking give unusually granular operational visibility for a tool in this space. Multi-language OCR that auto-detects and processes several languages against the same document set, rather than a single fixed OCR language, is also a differentiator most comparable projects don’t offer out of the box — though the core OCR-plus-full-text-search-plus-tagging concept itself follows an established pattern rather than inventing a new one.

Self-Hosting

Licensing Model MIT licensed — all features available in self-hosted deployments with no restrictions or license keys required.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search