Design a system for managing a document archive with search, retention periods, and legally compliant destruction.
Asked at
AI answer
Architecture and storage
The API and archive interface manage documents, metadata, permissions, retention policies, and destruction requests. Metadata and the operations log are stored in a relational database; file versions are stored in encrypted, versioned object storage. Text extraction, antivirus scanning, and indexing run asynchronously through a queue; the search index can be rebuilt from primary data.
Search and retention periods
Support full-text search and filters by type, owner, date, category, and status. Index only permitted metadata and text; enforce access checks both during search and when returning a document. Each record has a retention category, start date, period, basis, and applicable holds (legal hold). Policies are versioned; the destruction date calculation is transparent and audited. Automatic destruction is suspended while a legal hold is in effect.
Legally significant destruction
Process: identify candidates → check retention periods and holds → obtain approval from authorized personnel → destroy the file and its copies/versions and remove it from the index → confirm the result. The operation must be idempotent and leave an immutable audit record containing the document identifier, basis, policy, time, executor, and result, but no unnecessary document content. Account for replicas, caches, and backups: define a documented procedure for deletion or backup expiration, and prevent already destroyed objects from being restored.
Restrict access by roles and attributes, encrypt data and backups, and audit reads and changes. Monitor indexing errors, overdue destruction tasks, and deletion latency; test recovery, access permissions, and the complete destruction lifecycle.
Also asked at Andersen
- Which company did you work for and what projects did you handle?
- How do you work with Linux at the system administration level?
- What databases do you have experience working with?
- How is a container built and run from a Dockerfile?
- How did you deploy the Kubernetes cluster and how did you manage it? What tools did you use for rollout?
Similar questions
- Design an internal company knowledge-sharing platform with search, permissions, and document expiration.
- Design a system for managing the contract lifecycle: versions, signatures, renewals, terminations, and a legally significant audit trail.
- Design a library management system covering checkouts, reservations, lost items, fines, and synchronization across branches.
- Design a multilingual search service for regulatory documents with citations, version control, and access control by department.
- Design a procurement management system for a large company with approvals, limits, and auditing.