auto uebersetzung
This commit is contained in:
@@ -1,271 +1,270 @@
|
||||
# Dokumentenmanagement-System
|
||||
# Document Management System
|
||||
|
||||
## 1. Einführung und Ziele
|
||||
## 1. Introduction and Objectives
|
||||
|
||||
Ziel ist die Entwicklung eines schlanken, serverseitig betriebenen Dokumentenmanagement-Systems mit Fokus auf einer zuerst umzusetzenden Schnittstelle statt eines Frontends. Die Nutzung soll initial vollständig über eine programmatische API erfolgen; ein Frontend ist bewusst erst für einen späteren Ausbauschritt vorgesehen.
|
||||
The goal is to develop a lean, server-based document management system focused on implementing an interface first rather than a frontend. Initial usage will be entirely programmatic via an API; a frontend is intentionally scheduled for a later expansion phase.
|
||||
|
||||
Das System soll PDF-Dokumente verarbeiten, deren Inhalte per OCR erfassen, eine Volltextsuche bereitstellen und eine LLM-gestützte inhaltliche Anreicherung ermöglichen. Zusätzlich soll ein automatisierter Dateiimport aus einem überwachten Ordner unterstützt werden.
|
||||
The system shall process PDF documents, capture their contents via OCR, provide full-text search capabilities, and enable LLM-supported content enrichment. Additionally, automated file import from a monitored folder shall be supported.
|
||||
|
||||
Wichtige Qualitätsziele:
|
||||
- Einfache und möglichst schlanke Lösung.
|
||||
- So wenig Frameworks und externe Systeme wie möglich; externe Komponenten nur dort, wo sie klaren Mehrwert liefern.
|
||||
- Testbare Architektur mit konsequenter Unit-Test-Unterstützung.
|
||||
- Nachvollziehbarkeit und Konsistenz von Zustandsänderungen durch Event Sourcing.
|
||||
- Klare, wartbare und erweiterbare Struktur.
|
||||
- einfache Installation, Betrieb und Automatisierung.
|
||||
- zuverlässiger Import und konsistente Verarbeitung
|
||||
- zuverlaessige Suchbarkeit der Dokumente.
|
||||
Key quality objectives:
|
||||
- Simple and lean solution.
|
||||
- Minimal frameworks and external systems; external components only where they provide clear added value.
|
||||
- Testable architecture with comprehensive unit test support.
|
||||
- Traceability and consistency of state changes through Event Sourcing.
|
||||
- Clear, maintainable, and extensible structure.
|
||||
- Simple installation, operation, and automation.
|
||||
- Reliable import and consistent processing.
|
||||
- Reliable searchability of documents.
|
||||
|
||||
## 2. Randbedingungen
|
||||
## 2. Constraints and Boundary Conditions
|
||||
|
||||
- Die Implementierungssprache ist Go.
|
||||
- Die Architektur soll technologisch so offen beschrieben werden, dass keine unnötigen Festlegungen auf konkrete Werkzeuge oder Produkte vorgenommen werden.
|
||||
- Das System soll zunächst ohne Frontend nutzbar sein; der Zugriff erfolgt vorerst über die API.
|
||||
- Automatisierung für Build, Test und Deployment soll über die bestehende Umgebung mit Gitea und Actions berücksichtigt werden.
|
||||
- Die Dokumentation soll sich an der arc42-Struktur orientieren.
|
||||
- Zu allen wesentlichen Architekturbausteinen und Verhaltensweisen sollen Unit-Tests vorgesehen werden.
|
||||
- The implementation language is Go.
|
||||
- The architecture shall be described in a technology-agnostic way to avoid unnecessary constraints on specific tools or products.
|
||||
- The system shall initially be usable without a frontend; access is provided via the API.
|
||||
- Automation for build, test, and deployment shall consider the existing Gitea and Actions environment.
|
||||
- Documentation shall follow the arc42 structure.
|
||||
- Unit tests shall be provided for all essential architectural components and behaviors.
|
||||
|
||||
## 3. Kontextabgrenzung
|
||||
## 3. Context and Scope
|
||||
|
||||
### Fachlicher Kontext
|
||||
### Business Context
|
||||
|
||||
Das System verwaltet eingehende Dokumente, insbesondere PDF-Dateien. Dokumente können aktiv über die API eingebracht oder automatisiert aus einem definierten Import-Ordner übernommen werden.
|
||||
Später soll es auch moeglich sein Dokument per Email an das System zu schicken um sie dann zu importieren.
|
||||
The system manages incoming documents, particularly PDF files. Documents can be actively submitted via the API or automatically ingested from a defined import folder. Later, it shall also be possible to send documents via email to the system for import.
|
||||
|
||||
Nach dem Import werden Dokumente verarbeitet, analysiert, durchsuchbar gemacht und in eine finale Ablagestruktur überführt. Die Verarbeitung umfasst auch die Anreicherung mit zusätzlichen Informationen aus einer LLM-gestützten Analyse.
|
||||
After import, documents are processed, analyzed, made searchable, and transferred to a final storage structure. Processing also includes enrichment with additional information from LLM-supported analysis.
|
||||
|
||||
### Technischer Kontext
|
||||
### Technical Context
|
||||
|
||||
Externe oder angrenzende Systeme und Schnittstellen:
|
||||
- Dateisystem für Import-Ordner, temporäre Verarbeitung und finale Ablagestruktur.
|
||||
- API-Clients zur Nutzung der Systemschnittstelle.
|
||||
- LLM-Anbindung für semantische Analyse, Tagging oder ähnliche inhaltliche Verarbeitung.
|
||||
- OCR-Verarbeitung zur Texterkennung aus Dokumenten.
|
||||
- Automatisierungsumgebung mit Gitea und Actions für Build-, Test- und Deployment-Prozesse.
|
||||
External or adjacent systems and interfaces:
|
||||
- File system for import folder, temporary processing, and final storage structure.
|
||||
- API clients for using the system interface.
|
||||
- LLM integration for semantic analysis, tagging, or similar content processing.
|
||||
- OCR processing for text recognition from documents.
|
||||
- Automation environment with Gitea and Actions for build, test, and deployment processes.
|
||||
|
||||
## 4. Lösungsstrategie
|
||||
## 4. Solution Strategy
|
||||
|
||||
Die Lösung soll schrittweise und mit minimaler Komplexität umgesetzt werden:
|
||||
The solution shall be implemented incrementally and with minimal complexity:
|
||||
|
||||
1. Zuerst wird das Backend mit klarer API umgesetzt.
|
||||
2. Danach werden Import, Parsing, OCR, Suchindexierung und Ereignisverarbeitung integriert.
|
||||
3. Ein Frontend wird bewusst zurückgestellt und erst nach Stabilisierung der Schnittstelle betrachtet.
|
||||
1. First, the backend with a clear API shall be implemented.
|
||||
2. Then import, parsing, OCR, search indexing, and event processing shall be integrated.
|
||||
3. A frontend is intentionally deferred and considered only after stabilization of the interface.
|
||||
|
||||
Leitprinzipien der Lösung:
|
||||
- API-first-Ansatz.
|
||||
- Schlanke, modular geschnittene Komponenten.
|
||||
- Klare Trennung von Domänenlogik, Infrastruktur und Anwendungslogik.
|
||||
- Event Sourcing zur Nachvollziehbarkeit von Änderungen und zur Unterstützung der Datenkonsistenz.
|
||||
- Testbarkeit als architektonische Leitentscheidung, nicht als nachgelagerter Aspekt.
|
||||
- Automatisierter dateibasierter Import als integraler Bestandteil der Lösung.
|
||||
Core principles of the solution:
|
||||
- API-first approach.
|
||||
- Lean, modularly designed components.
|
||||
- Clear separation of domain logic, infrastructure, and application logic.
|
||||
- Event Sourcing for traceability of changes and support of data consistency.
|
||||
- Testability as an architectural guiding principle, not an afterthought.
|
||||
- Automated file-based import as an integral part of the solution.
|
||||
|
||||
## 5. Bausteinsicht
|
||||
## 5. Building Block View
|
||||
|
||||
### 5.1 Überblick über die Hauptbausteine
|
||||
### 5.1 Overview of Main Components
|
||||
|
||||
Das System besteht aus folgenden zentralen Bausteinen:
|
||||
The system consists of the following central building blocks:
|
||||
|
||||
- API-Schicht
|
||||
- Anwendungslogik
|
||||
- Dokumentenverwaltung
|
||||
- Import- und Watcher-Komponente
|
||||
- Verarbeitungs-Pipeline
|
||||
- OCR-Komponente
|
||||
- LLM-Integrationskomponente
|
||||
- Volltextsuch-Komponente
|
||||
- Ereignis- und Konsistenzkomponente
|
||||
- Ablage- und Strukturierungslogik
|
||||
- Testschicht
|
||||
- API Layer
|
||||
- Application Logic
|
||||
- Document Management
|
||||
- Import and Watcher Component
|
||||
- Processing Pipeline
|
||||
- OCR Component
|
||||
- LLM Integration Component
|
||||
- Full-Text Search Component
|
||||
- Event and Consistency Component
|
||||
- Storage and Structuring Logic
|
||||
- Test Layer
|
||||
|
||||
### 5.2 Bausteinbeschreibungen
|
||||
### 5.2 Building Block Descriptions
|
||||
|
||||
#### API-Schicht
|
||||
Stellt die Schnittstelle zur Verfügung, über die Dokumente importiert, gesucht, abgefragt und verwaltet werden können. Da das Frontend zunächst nicht umgesetzt wird, ist die API der primäre Zugangspunkt des Systems.
|
||||
#### API Layer
|
||||
Provides the interface through which documents can be imported, searched, queried, and managed. Since the frontend is not initially implemented, the API is the primary entry point of the system.
|
||||
|
||||
#### Anwendungslogik
|
||||
Koordiniert Anwendungsfälle wie Import, Verarbeitung, Suche, Verschiebung und Abfrage. Diese Schicht kapselt die Ablauflogik und soll unabhängig von Infrastrukturkomponenten testbar sein.
|
||||
#### Application Logic
|
||||
Coordinates use cases such as import, processing, search, relocation, and retrieval. This layer encapsulates workflow logic and shall be independently testable from infrastructure components.
|
||||
|
||||
#### Dokumentenverwaltung
|
||||
Verwaltet Metadaten, Status, Identitäten und den fachlichen Lebenszyklus eines Dokuments. Dazu gehören Zustände wie neu importiert, in Verarbeitung, verarbeitet, abgelegt oder fehlerhaft.
|
||||
#### Document Management
|
||||
Manages metadata, status, identities, and the business lifecycle of a document. This includes states such as newly imported, in processing, processed, archived, or failed.
|
||||
|
||||
#### Import- und Watcher-Komponente
|
||||
Überwacht einen definierten Ordner auf neu abgelegte Dokumente. Sobald dort ein Dokument gespeichert wird, soll die automatische Verarbeitung ausgelöst werden.
|
||||
#### Import and Watcher Component
|
||||
Monitors a defined folder for newly deposited documents. When a document is saved there, automatic processing shall be triggered.
|
||||
|
||||
Zusätzliche Anforderungen:
|
||||
- Dokumente aus dem Import-Ordner werden automatisch erkannt.
|
||||
- Importierte Dateien können einen Zeitstempel im Dateinamen erhalten, der den Importzeitpunkt dokumentiert.
|
||||
- Die automatische Verarbeitung startet ohne manuellen Eingriff.
|
||||
Additional requirements:
|
||||
- Documents from the import folder are automatically detected.
|
||||
- Imported files can receive a timestamp in the filename documenting the import time.
|
||||
- Automatic processing starts without manual intervention.
|
||||
|
||||
#### Verarbeitungs-Pipeline
|
||||
Verantwortet den Gesamtfluss eines Dokuments nach Eingang. Dazu zählen Einlesen, Parsen, OCR, inhaltliche Anreicherung, Suchindexierung, Statusänderungen und finale Ablage.
|
||||
#### Processing Pipeline
|
||||
Responsible for the overall flow of a document after ingestion. This includes reading, parsing, OCR, content enrichment, search indexing, status changes, and final storage.
|
||||
|
||||
#### OCR-Komponente
|
||||
Extrahiert Text aus den importierten PDF-Dokumenten, sofern dieser nicht direkt oder nicht vollständig maschinenlesbar vorliegt. Die OCR-Ergebnisse bilden eine Grundlage für Suche und weitere Analyse.
|
||||
#### OCR Component
|
||||
Extracts text from imported PDF documents where text is not directly or fully machine-readable. OCR results serve as a foundation for search and further analysis.
|
||||
|
||||
#### LLM-Integrationskomponente
|
||||
Ermöglicht die inhaltliche Analyse von Dokumenten durch ein LLM. Ziel ist insbesondere die semantische Anreicherung, etwa durch Tagging, Klassifikation, Strukturierung oder ähnliche Zusatzinformationen.
|
||||
#### LLM Integration Component
|
||||
Enables content analysis of documents through an LLM. The goal is particularly semantic enrichment, such as through tagging, classification, structuring, or similar additional information.
|
||||
|
||||
#### Volltextsuch-Komponente
|
||||
Stellt eine Volltextsuche über die verarbeiteten Dokumentinhalte bereit. Grundlage hierfür sind die extrahierten und gegebenenfalls per OCR gewonnenen Textinhalte sowie relevante Metadaten.
|
||||
#### Full-Text Search Component
|
||||
Provides full-text search over processed document contents. This is based on extracted and potentially OCR-derived text content as well as relevant metadata.
|
||||
|
||||
#### Ereignis- und Konsistenzkomponente
|
||||
Setzt Event Sourcing fachlich um. Relevante Zustandsänderungen von Dokumenten werden als Ereignisse festgehalten, damit Änderungen nachvollziehbar bleiben und der Zustand konsistent rekonstruiert werden kann.
|
||||
#### Event and Consistency Component
|
||||
Implements Event Sourcing at the business level. Relevant state changes in documents are recorded as events so that changes remain traceable and state can be consistently reconstructed.
|
||||
|
||||
Wichtige Anforderungen:
|
||||
- Keine Festlegung auf konkrete Technologien in dieser Dokumentation.
|
||||
- Ereignisse sollen fachlich verständlich formuliert werden.
|
||||
- Die Ereignisfolge soll Auditierbarkeit und Wiederherstellbarkeit unterstützen.
|
||||
Important requirements:
|
||||
- No commitment to specific technologies in this documentation.
|
||||
- Events shall be expressed in business-understandable terms.
|
||||
- The sequence of events shall support auditability and recoverability.
|
||||
|
||||
#### Ablage- und Strukturierungslogik
|
||||
Verarbeitete Dokumente werden aus dem Import-Kontext in die finale Ablagestruktur überführt. Dabei sind folgende Anforderungen zu berücksichtigen:
|
||||
#### Storage and Structuring Logic
|
||||
Processed documents are transferred from the import context to the final storage structure. The following requirements shall be considered:
|
||||
|
||||
- Verarbeitete Dokumente sollen nicht im Import-Ordner verbleiben.
|
||||
- Verarbeitete Dokumente sollen in einen verarbeiteten Zielbereich überführt werden.
|
||||
- Die finale Ordnerstruktur soll die tatsächliche Ablage widerspiegeln.
|
||||
- Importierte beziehungsweise verarbeitete Dateien sollen in Jahresordner verschoben werden.
|
||||
- Der Dateiname kann um einen Zeitstempel des Imports ergänzt werden.
|
||||
- Processed documents shall not remain in the import folder.
|
||||
- Processed documents shall be transferred to a processed target area.
|
||||
- The final folder structure shall reflect actual storage.
|
||||
- Imported and processed files shall be moved to year-based folders.
|
||||
- The filename can be supplemented with an import timestamp.
|
||||
|
||||
#### Testschicht
|
||||
Alle relevanten Schichten und Bausteine sollen durch Unit-Tests abgesichert werden. Die Architektur ist so zu gestalten, dass fachliche Logik isoliert testbar bleibt und Infrastrukturabhängigkeiten austauschbar oder kapselbar sind.
|
||||
#### Test Layer
|
||||
All relevant layers and components shall be secured through unit tests. The architecture shall be designed so that business logic remains independently testable and infrastructure dependencies are interchangeable or encapsulated.
|
||||
|
||||
## 6. Laufzeitsicht
|
||||
## 6. Runtime View
|
||||
|
||||
### 6.1 Import über überwachten Ordner
|
||||
### 6.1 Import via Monitored Folder
|
||||
|
||||
1. Ein Dokument wird im definierten Import-Ordner gespeichert.
|
||||
2. Die Watcher-Komponente erkennt das neue Dokument.
|
||||
3. Das System übernimmt das Dokument in die Verarbeitung.
|
||||
4. Es wird geparst und bei Bedarf per OCR textuell erschlossen.
|
||||
5. Das LLM reichert das Dokument semantisch an.
|
||||
6. Die Inhalte werden für die Volltextsuche indexiert.
|
||||
7. Fachlich relevante Schritte werden als Ereignisse erfasst.
|
||||
8. Das Dokument wird in die finale Ablagestruktur verschoben.
|
||||
9. Die Datei wird in einen Jahresordner einsortiert.
|
||||
10. Optional erhält der Dateiname einen Zeitstempel des Imports.
|
||||
1. A document is saved in the defined import folder.
|
||||
2. The watcher component detects the new document.
|
||||
3. The system takes over the document for processing.
|
||||
4. It is parsed and, if necessary, made textually accessible via OCR.
|
||||
5. The LLM enriches the document semantically.
|
||||
6. Contents are indexed for full-text search.
|
||||
7. Business-relevant steps are captured as events.
|
||||
8. The document is moved to the final storage structure.
|
||||
9. The file is sorted into a year-based folder.
|
||||
10. Optionally, the filename receives an import timestamp.
|
||||
|
||||
### 6.2 Import über API
|
||||
### 6.2 Import via API
|
||||
|
||||
1. Ein Client übergibt ein Dokument über die API.
|
||||
2. Das System legt das Dokument an und startet die Verarbeitung.
|
||||
3. Danach folgt derselbe Verarbeitungsfluss wie beim dateibasierten Import.
|
||||
4. Das Dokument wird abschließend suchbar gemacht und final abgelegt.
|
||||
1. A client submits a document via the API.
|
||||
2. The system creates the document and starts processing.
|
||||
3. Subsequently, the same processing flow as file-based import is followed.
|
||||
4. The document is finally made searchable and archived.
|
||||
|
||||
### 6.3 Suche
|
||||
### 6.3 Search
|
||||
|
||||
1. Ein Client sendet eine Suchanfrage an die API.
|
||||
2. Die Volltextsuche durchsucht indizierte Dokumentinhalte und relevante Metadaten.
|
||||
3. Das System liefert passende Treffer zurück.
|
||||
1. A client sends a search query to the API.
|
||||
2. Full-text search queries indexed document contents and relevant metadata.
|
||||
3. The system returns matching results.
|
||||
|
||||
### 6.4 Nachvollziehbarkeit von Zustandsänderungen
|
||||
### 6.4 Traceability of State Changes
|
||||
|
||||
1. Jede wesentliche Aktion auf einem Dokument erzeugt ein fachliches Ereignis.
|
||||
2. Diese Ereignisse bilden die Grundlage für Nachvollziehbarkeit und Konsistenz.
|
||||
3. Der Status eines Dokuments kann aus den aufgezeichneten Ereignissen abgeleitet oder rekonstruiert werden.
|
||||
1. Each significant action on a document generates a business event.
|
||||
2. These events form the foundation for traceability and consistency.
|
||||
3. The status of a document can be derived or reconstructed from recorded events.
|
||||
|
||||
## 7. Verteilungssicht
|
||||
## 7. Deployment View
|
||||
|
||||
Das System ist für den Betrieb auf einem persönlichen oder dedizierten Server vorgesehen. Es soll mit möglichst wenig externen Abhängigkeiten auskommen und in einer einfachen Betriebsumgebung deploybar sein.
|
||||
The system is intended for operation on a personal or dedicated server. It shall require minimal external dependencies and be deployable in a simple operating environment.
|
||||
|
||||
Wesentliche Deploymentsicht:
|
||||
- Backend-Service zur Bereitstellung der API und Orchestrierung der Verarbeitung.
|
||||
- Zugriff auf Dateisystembereiche für Import, Verarbeitung und finale Ablage.
|
||||
- Einbindung der benötigten Komponenten für OCR, Suche und LLM-Nutzung.
|
||||
- Build-, Test- und Deployment-Automatisierung über Gitea und Actions.
|
||||
Essential deployment view:
|
||||
- Backend service for providing the API and orchestrating processing.
|
||||
- Access to file system areas for import, processing, and final storage.
|
||||
- Integration of required components for OCR, search, and LLM usage.
|
||||
- Build, test, and deployment automation via Gitea and Actions.
|
||||
|
||||
## 8. Querschnittliche Konzepte
|
||||
## 8. Cross-Cutting Concepts
|
||||
|
||||
### 8.1 Testbarkeit
|
||||
### 8.1 Testability
|
||||
|
||||
Testbarkeit ist ein zentrales Architekturprinzip. Die Architektur soll so geschnitten werden, dass fachliche Kernlogik unabhängig von Infrastruktur getestet werden kann.
|
||||
Testability is a central architectural principle. The architecture shall be designed so that core business logic can be tested independently of infrastructure.
|
||||
|
||||
Anforderungen:
|
||||
- Unit-Tests für alle wesentlichen Module.
|
||||
- Klare Schnittstellen zwischen Fachlogik und Infrastruktur.
|
||||
- Gute Mock- oder Stub-Fähigkeit für externe Abhängigkeiten.
|
||||
- Reproduzierbare Tests für Import, Verarbeitung, Suchindexierung und Ereignisverarbeitung.
|
||||
Requirements:
|
||||
- Unit tests for all essential modules.
|
||||
- Clear interfaces between business logic and infrastructure.
|
||||
- Good mocking or stubbing capability for external dependencies.
|
||||
- Reproducible tests for import, processing, search indexing, and event processing.
|
||||
|
||||
### 8.2 Ereignisorientierung und Konsistenz
|
||||
### 8.2 Event-Orientation and Consistency
|
||||
|
||||
Die Konsistenz fachlicher Zustände soll über ein Event-Sourcing-Konzept unterstützt werden. Änderungen an Dokumenten werden nicht nur als aktueller Zustand betrachtet, sondern auch als nachvollziehbare Abfolge fachlicher Ereignisse.
|
||||
Business state consistency shall be supported through an Event Sourcing concept. Changes to documents are considered not only as current state but also as a traceable sequence of business events.
|
||||
|
||||
### 8.3 Dateiimport und Dateilebenszyklus
|
||||
### 8.3 File Import and Document Lifecycle
|
||||
|
||||
Dokumente können aktiv importiert oder passiv über einen überwachten Ordner aufgenommen werden. Nach erfolgreicher Verarbeitung sollen sie geordnet in die finale Ordnerstruktur verschoben werden.
|
||||
Documents can be actively imported or passively ingested from a monitored folder. After successful processing, they shall be orderly transferred to the final folder structure.
|
||||
|
||||
Regeln:
|
||||
- Automatische Verarbeitung beim Speichern im Import-Ordner.
|
||||
- Kennzeichnung oder Umbenennung mit Importzeitpunkt möglich.
|
||||
- Strukturierung nach Jahren in der Zielablage.
|
||||
Rules:
|
||||
- Automatic processing when saved to the import folder.
|
||||
- Marking or renaming with import timestamp is possible.
|
||||
- Organization by year in the target storage.
|
||||
|
||||
### 8.4 Suchkonzept
|
||||
### 8.4 Search Concept
|
||||
|
||||
Die Volltextsuche ist ein fester Bestandteil des Systems. Sie soll die Auffindbarkeit über Dokumentinhalte sicherstellen und sowohl direkt lesbare als auch per OCR erschlossene Inhalte berücksichtigen.
|
||||
Full-text search is an integral part of the system. It shall ensure discoverability through document contents and consider both directly readable and OCR-derived contents.
|
||||
|
||||
### 8.5 LLM-gestützte Anreicherung
|
||||
### 8.5 LLM-Supported Enrichment
|
||||
|
||||
Die LLM-Integration dient der semantischen Verarbeitung von Dokumenten. Dazu können Tagging, inhaltliche Strukturierung, Klassifikation oder ähnliche Formen der Anreicherung gehören.
|
||||
LLM integration serves semantic processing of documents. This can include tagging, content structuring, classification, or similar forms of enrichment.
|
||||
|
||||
### 8.6 API-first
|
||||
### 8.6 API-First
|
||||
|
||||
Die Roadmap sieht vor, zunächst ausschließlich die Schnittstelle produktiv nutzbar zu machen. Ein Frontend wird bewusst zurückgestellt, damit die Kernfunktionen unabhängig und stabil aufgebaut werden können.
|
||||
The roadmap provides for initially making the interface exclusively operationally usable. A frontend is intentionally deferred so that core functionality can be built independently and stably.
|
||||
|
||||
### 8.7 Dokumentation
|
||||
### 8.7 Documentation
|
||||
|
||||
Die Architektur- und Systemdokumentation soll in einer arc42-orientierten Form gepflegt werden. Die Dokumentation soll die wesentlichen Entscheidungen, Bausteine, Abläufe, Risiken und Qualitätsanforderungen nachvollziehbar abbilden.
|
||||
Architecture and system documentation shall be maintained in an arc42-oriented form. The documentation shall clearly depict essential decisions, components, processes, risks, and quality requirements.
|
||||
|
||||
## 9. Architekturentscheidungen
|
||||
## 9. Architectural Decisions
|
||||
|
||||
- Das System wird zunächst als Backend- bzw. API-zentrierte Lösung umgesetzt.
|
||||
- Ein Frontend ist Teil einer späteren Ausbaustufe und nicht Bestandteil der ersten Roadmap.
|
||||
- Die Lösung soll bewusst einfach gehalten werden.
|
||||
- Frameworks und externe Systeme sollen nur zurückhaltend eingesetzt werden.
|
||||
- Event Sourcing wird als fachliches Konzept zur Nachvollziehbarkeit und Konsistenz berücksichtigt.
|
||||
- Technologische Festlegungen für Event-Sourcing-Mechanismen werden in dieser Dokumentation bewusst vermieden.
|
||||
- Die Architektur wird konsequent auf Testbarkeit ausgelegt.
|
||||
- Unit-Tests sind kein Optionalbestandteil, sondern verbindlicher Bestandteil der Umsetzung.
|
||||
- Volltextsuche ist ein verpflichtender Bestandteil des Systems.
|
||||
- Ein automatischer Import über einen überwachten Ordner ist ein verpflichtender Bestandteil des Systems.
|
||||
- Verarbeitete Dokumente werden in eine finale, strukturierte Zielablage überführt.
|
||||
- Die finale Ablage berücksichtigt Jahresordner und optional Import-Zeitstempel in Dateinamen.
|
||||
- Für Automatisierung im Entwicklungs- und Deployment-Prozess wird die vorhandene Gitea-/Actions-Umgebung berücksichtigt.
|
||||
- The system is initially implemented as a backend and API-centric solution.
|
||||
- A frontend is part of a later expansion phase and not part of the initial roadmap.
|
||||
- The solution shall intentionally be kept simple.
|
||||
- Frameworks and external systems shall be used sparingly.
|
||||
- Event Sourcing is considered as a business concept for traceability and consistency.
|
||||
- Technological commitments to Event Sourcing mechanisms are intentionally avoided in this documentation.
|
||||
- The architecture is consistently designed for testability.
|
||||
- Unit tests are not optional but a binding part of the implementation.
|
||||
- Full-text search is a mandatory component of the system.
|
||||
- Automatic import from a monitored folder is a mandatory component of the system.
|
||||
- Processed documents are transferred to a final, structured target storage.
|
||||
- Final storage considers year-based folders and optionally import timestamps in filenames.
|
||||
- Automation in development and deployment processes shall consider the existing Gitea/Actions environment.
|
||||
|
||||
## 10. Qualitätsanforderungen
|
||||
## 10. Quality Requirements
|
||||
|
||||
Wesentliche Qualitätsanforderungen sind:
|
||||
Essential quality requirements are:
|
||||
|
||||
- Einfachheit: Das System soll mit minimaler unnötiger Komplexität entworfen werden.
|
||||
- Wartbarkeit: Die Bausteine sollen klar getrennt und verständlich aufgebaut sein.
|
||||
- Testbarkeit: Jede wesentliche Funktionalität soll unit-testbar sein.
|
||||
- Nachvollziehbarkeit: Dokumentänderungen und Statusübergänge sollen über Ereignisse nachvollziehbar bleiben.
|
||||
- Konsistenz: Zustände und Übergänge sollen robust und rekonstruierbar sein.
|
||||
- Automatisierbarkeit: Import, Verarbeitung, Test und Deployment sollen automatisierbar sein.
|
||||
- Erweiterbarkeit: Ein späteres Frontend soll auf der vorhandenen API und Architektur aufsetzen können.
|
||||
- Suchbarkeit: Dokumentinhalte sollen zuverlässig per Volltextsuche auffindbar sein.
|
||||
- Zuverlässigkeit: Automatische Ordnerüberwachung und Verarbeitung sollen stabil funktionieren.
|
||||
- Simplicity: The system shall be designed with minimal unnecessary complexity.
|
||||
- Maintainability: Components shall be clearly separated and understandably structured.
|
||||
- Testability: Every essential function shall be unit-testable.
|
||||
- Traceability: Document changes and state transitions shall remain traceable through events.
|
||||
- Consistency: States and transitions shall be robust and reconstructible.
|
||||
- Automatability: Import, processing, testing, and deployment shall be automatable.
|
||||
- Extensibility: A later frontend shall be able to build on the existing API and architecture.
|
||||
- Searchability: Document contents shall be reliably discoverable via full-text search.
|
||||
- Reliability: Automatic folder monitoring and processing shall function stably.
|
||||
|
||||
## 11. Risiken und technische Schulden
|
||||
## 11. Risks and Technical Debt
|
||||
|
||||
Mögliche Risiken:
|
||||
- Event Sourcing erhöht die fachliche und technische Komplexität, wenn es zu breit oder zu früh umgesetzt wird.
|
||||
- OCR-Qualität kann je nach Dokumentenqualität schwanken.
|
||||
- LLM-gestützte Anreicherung kann variierende Ergebnisse liefern und muss fachlich eingeordnet werden.
|
||||
- Automatische Dateiüberwachung und Verschiebung erfordern robuste Fehlerbehandlung, um Doppeleinträge oder inkonsistente Zustände zu vermeiden.
|
||||
- Ohne frühzeitige Tests steigt das Risiko, dass Dateiverarbeitung, Suchindexierung und Ereignisabläufe schwer wartbar werden.
|
||||
Possible risks:
|
||||
- Event Sourcing increases business and technical complexity if implemented too broadly or too early.
|
||||
- OCR quality can vary depending on document quality.
|
||||
- LLM-supported enrichment can yield varying results and must be understood in business context.
|
||||
- Automatic file monitoring and relocation require robust error handling to avoid duplicates or inconsistent states.
|
||||
- Without early testing, the risk increases that file processing, search indexing, and event flows become difficult to maintain.
|
||||
|
||||
Offene Punkte, die später zu konkretisieren sind:
|
||||
- Genaues Ereignismodell.
|
||||
- Exaktes Metadatenmodell.
|
||||
- Fehlerbehandlungsstrategie bei partiell fehlgeschlagener Verarbeitung.
|
||||
- Detailregeln der finalen Ordnerstruktur.
|
||||
- Such- und Ranking-Verhalten der Volltextsuche.
|
||||
Open items to be clarified later:
|
||||
- Exact event model.
|
||||
- Precise metadata model.
|
||||
- Error handling strategy for partially failed processing.
|
||||
- Detailed rules for the final folder structure.
|
||||
- Search and ranking behavior of full-text search.
|
||||
|
||||
## 12. Glossar
|
||||
## 12. Glossary
|
||||
|
||||
- API: Programmierschnittstelle zur Nutzung der Systemfunktionen.
|
||||
- OCR: Texterkennung aus Dokumenten oder Bildinhalten.
|
||||
- LLM: Sprachmodell zur semantischen Verarbeitung und Anreicherung von Dokumentinhalten.
|
||||
- Event Sourcing: Fachliches Konzept, bei dem Zustandsänderungen als Ereignisse festgehalten werden.
|
||||
- Volltextsuche: Suche über die vollständigen textuellen Inhalte von Dokumenten.
|
||||
- Import-Ordner: Überwachter Ordner, aus dem Dokumente automatisch übernommen werden.
|
||||
- Jahresordner: Zielordnerstruktur, in der verarbeitete Dokumente nach Jahren abgelegt werden.
|
||||
- Finale Ablagestruktur: Endgültige strukturierte Speicherung verarbeiteter Dokumente.
|
||||
- API: Application Programming Interface for using system functions.
|
||||
- OCR: Optical Character Recognition; text recognition from documents or image contents.
|
||||
- LLM: Large Language Model for semantic processing and enrichment of document contents.
|
||||
- Event Sourcing: Business concept in which state changes are recorded as events.
|
||||
- Full-Text Search: Search across the complete textual contents of documents.
|
||||
- Import Folder: Monitored folder from which documents are automatically ingested.
|
||||
- Year Folder: Target folder structure where processed documents are stored by year.
|
||||
- Final Storage Structure: Final structured storage of processed documents.
|
||||
Reference in New Issue
Block a user