A WORM document archive app for the Frappe Framework
docarchive files business documents such as invoices, contracts and bank statements in a Frappe site. It is meant to copy each one, unchanged, into write-once (WORM) object storage for its retention period.
This version has the document model, the locks, the storage configuration, the upload API, the nightly archive run to Object Lock storage, legal holds, the deletion of expired documents, the archiving of e-mails and other correspondence, exports, the audit log and monitoring. Archiving is off until a System Manager enables it in Archive Settings. Until then, nothing leaves the site.
docarchive is a technical tool. It does not make you compliant with GoBD, the GDPR or any other law or standard, and it gives no legal or tax advice. Retention periods, procedures and documentation are your responsibility. Check them with your tax advisor or auditor.
Archiving and WORM
- Object Lock per document: every file is written once, with its own mode (GOVERNANCE or COMPLIANCE) and retain-until date, to one or more storage targets.
- Checksums: SHA-256 at upload, checked again when archiving, after each write and on export.
- Retention per document type and own company, optionally from the contract end.
- Retention extension, automatic for contracts and by hand, never shorter.
- Nightly archive run and Archive now with retain-until date and lock mode shown before confirming.
Legal hold and deletion
- Legal hold at archiving or later, released only by Archive Admins.
- Deletion of expired documents with a deletion log, and early deletion for GOVERNANCE copies.
Documents
- Attachments: annexes, e-invoice XML and proofs of service, archived and locked with the main file.
- E-invoices: XRechnung and ZUGFeRD data read into the document.
- Counterparty panel, triage of documents with missing fields, and an upload API.
Correspondence
- E-mail capture of the original
.emlper account, off, manual or automatic, incoming and outgoing (rebuilt by Frappe or from the Sent folder via mailsync). - Archiving and discarding mails from the Communication, with counterparty from its links; letters and faxes as uploads.
- Viewer for archived mails, threads and gaps, and closing gaps with an
.emlupload.
Export
- Export as ZIP packages with manifest, checksums and an offline viewer.
Audit and monitoring
- Audit log of archive events, each entry stored under Object Lock and compared with the database every night.
- Monitoring and completeness: bell notifications for failed, overdue and incomplete archiving, and a completeness report.
Integration
- Roles and permissions: Document Manager, Archive Admin, Document Integration, and host roles.
- Host app hooks for assignment, counterparties, file access and e-invoice extractors, and commands for runs and checks.
- Tools for AI agents: list, read and assign open documents through the mcpserver app, without archiving.
From the demo data of bench --site <site> docarchive-demo (see Commands).
- How it works: documents, attachments, checksums, Object Lock, retention, locking, roles
- Storage targets and an example with Hetzner Object Storage
- Archiving: nightly run, object keys, retention and its extension, archive now
- Legal hold and deletion
- Export with offline viewer
- Audit log and monitoring
- Correspondence: e-mail capture, viewer, threads
- E-invoices
- Host apps: hooks, documents panel, triage, dashboard helpers
- Upload API
- AI agents (MCP)
- Commands, including demo data
- Development: tests
bench get-app https://github.com/EffizienzAgent/s3storage --branch version-16
bench get-app https://github.com/EffizienzAgent/docarchive --branch version-16
bench --site <site> install-app docarchivedocarchive requires the s3storage app (v0.3.0 or later) for its S3 client and for storing large export files. s3storage keeps files on local disk until you configure its own bucket.
Compatibility: Frappe v16. The version-16 branch always points to the latest release; tagged releases
and the changelog are on the releases page.
Need help setting this up or integrating it into your Frappe stack? Write to oss@effizienzagent.de (English or German). German-speaking SMEs: see mittelstandshub.de.
MIT













