Design a GxP Document Repository With Lifecycles and Audit Trails
Last updated: November 29, 2026
Quick Overview
Design a multi-tenant cloud service where life sciences companies store controlled documents, route them through configurable review and approval lifecycles with electronic signatures, and produce a tamper-evident audit trail suitable for 21 CFR Part 11 inspections.
Veeva Systems
November 29, 20260
0
0 solved
Design a multi-tenant cloud service where life sciences companies store controlled documents, route them through configurable review and approval lifecycles with electronic signatures, and produce a tamper-evident audit trail suitable for 21 CFR Part 11 inspections.
This is the heart of the Vault platform: QualityDocs, RIM and eTMF all rely on documents, renditions, lifecycles, signatures and audit trails that regulators inspect. The interviewer is checking whether the candidate treats auditability and configuration-driven behavior as first-class requirements rather than add-ons, and makes sound multi-tenant storage choices.
What the Interviewer Expects
- Captures regulatory requirements: immutable audit trail, e-signature meaning and identity, version citation
- Separates metadata (relational) from binary content and renditions (object storage)
- Models lifecycles and workflows as tenant configuration interpreted by a state machine engine
- Makes state change, version bump, signature and audit entry one atomic transaction
- Addresses tenant isolation, search indexing and rendition generation as async pipelines
- Discusses release management and validation for customers on a fixed release cadence
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you prove to an inspector that the audit trail was not altered?
- A customer has 40 million documents in one vault; what changes in indexing and permission checks?
- How would you support a configuration change to a lifecycle while documents are mid-workflow?
- How would you implement legal hold and retention-based destruction together?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: upload and version documents (minor drafts, major approved versions), configurable lifecycles per document type, workflows that assign review and approval tasks, e-signatures that record s...
High-Level Design
- API layer authenticates the user, resolves vault id, enforces rate limits.
- Metadata service on a relational database, partitioned by tenant (schema or shard per vault). Tables: documents, versions...