Document Management

Create and maintain scripts to categorise and label scanned documents.

Project

The project aims to modernize and rebuild an automated Document Rule Processing System integrated with a self-hosted document management system (Paperless-ngx). Its primary goal is to categorize, tag, and label scanned documents using automated rules and local AI agents.

Goal:

  • Digital Sovereignty & Cost Efficiency: The overarching goal (conceptualized under the umbrella framework S.H.O.D.A.N.) is to transition away from expensive, commercial, cloud-based AI ecosystems (like OpenAI or Claude) to local, vendor-agnostic infrastructure. The project uses the Model Context Protocol (MCP) to handle document categorization locally (such as using gemma models) to retain full control over data.

Elaboration

Iteration 1
  • Decoupling and Modernization (ADR 001): The project migrates a legacy, file-system-bound Python/Node.js setup into a robust, event-driven (Webhook) system. The intention is to decouple the Rule Editor from the Document Management System (DMS) while introducing a Buffered Stateful Model. This means updates are processed in-memory and committed in a single bulk API transaction to maintain system stability.

  • Safety and Validation via "Dry Runs": A strict multi-stage rule deployment lifecycle is enforced. Before any automated sorting or tagging rule goes live, it must undergo a mandatory DryRun phase to catch false positives and mitigate the risk of accidentally corrupting metadata or deleting tags.

  • Unified Technology Ecosystem (ADR 002): To maximize development velocity and minimize context-switching errors, the goal includes standardizing on a uniform TypeScript-based stack. This includes a React and TypeScript frontend (Rule Editor), a Node.js/NestJS backend (Rule Processor), and a shared internal NPM layer to govern data models.

Links: