Paperless-ngx is a production-grade, self-hosted document management system. It ingests physical and digital documents through a consume folder, REST API uploads, and IMAP email fetching, then runs OCR via Tesseract/ocrmypdf, extracts text through a pluggable parser registry, generates archive PDFs and thumbnails, and stores structured metadata (tags, correspondents, document types, custom fields). Documents are indexed in Tantivy and exposed through a Django REST API consumed by an Angular SPA that provides search, editing, bulk operations, permissions, workflows, sharing, and an admin interface. Background processing is handled by Celery/Redis with real-time status pushed over WebSockets. The system also includes optional AI/LLM classification, RAG chat over the document index, and a workflow engine that reacts to consumption and document lifecycle events with actions like assignment, emailing, webhooks, and trash moves. Though primarily an application, it contains a substantial search-engine subsystem and an optional LLM/embedding pipeline, giving it a mild hybrid character.
Swift Paperless is a native iOS client for Paperless-ngx, a self-hosted document management system. The app provides a rich SwiftUI interface for browsing, filtering, viewing, editing, and sharing documents stored on a remote Paperless-ngx server. It supports offline-first caching via GRDB (SQLite), multi-server connections, OIDC login with PKCE and TOTP, mTLS client certificates, deep links, and a share extension for importing documents from other apps. The architecture is modular, with separate Swift packages for networking (ApiRepository, wire types), data models (FilterState, SyncPlan), persistence (GRDB migrations, records, observation), and shared UI components. The app uses a repository pattern with a caching decorator (CachingRepository) that provides offline reads, delta sync with watermarks, and write-through cache consistency. A sync engine orchestrates per-server synchronization phases (elements, reconcile, fill) with progress reporting and throttle support. Key features include a customizable filter bar with saved views, custom field filtering with logical operators, a PDF viewer with text search, document scanning via VisionKit, barcode ASN extraction, and a tip jar for donations. The codebase is well-tested with unit tests for networking, persistence, data models, and concurrency patterns. CI/CD pipelines build and deploy to TestFlight, and localization is managed via Crowdin across 8 languages.