Design an Automated Achievement Certificate System
Issue one durable certificate for an eligible achievement, deliver a reproducible document, and keep verification truthful after revocation.
Problem statement
For this exercise, assume an organization issues achievement certificates, not TLS certificates.
An authenticated issuer submits a final achievement record containing a stable issuer-scoped achievement ID, recipient ID and display name, program ID, completion time and an eligibility result from a trusted upstream process.
The system checks that the program and pinned template version exist and that the record is eligible, then automatically creates one certificate per issuer/achievement. Recipient verification and the upstream eligibility decision already exist; this service does not infer qualifications or medical licensing.
A certificate has an immutable issuer, achievement, recipient, program, completion time and template version. Identical retries return the same certificate; changing any of those values under the same achievement ID conflicts. Generation is asynchronous.
The recipient and the issuing organization can inspect pending, ready, failed or revoked status and download a ready PDF. A render failure can be retried under the same certificate identity.
The issuer can revoke a certificate in any state; revocation is permanent, cannot be undone by a late worker, and is retained in the audit history. Corrected achievements require a new upstream achievement ID and explicit revocation of the old certificate.
Each PDF contains an unguessable verification identifier. Anyone possessing that identifier can check the issuer, program, completion time and current status, but the public response exposes no recipient name, account identifier or download link and offers no directory or search.
A verification read beginning after a successful revocation acknowledgement must not return valid. A PDF is not itself proof of current validity. Revocation prevents new download grants; a grant already issued may remain usable for at most five minutes, and downloaded copies cannot be recalled.
Only a ready, non-revoked certificate can receive a new grant.
Design intake, durable issuance state, document rendering and storage, recipient notification, authenticated downloads, public verification, revocation and operator retry. Templates are reviewed immutable inputs rather than an editor you must build.
Notifications are best-effort and may be delayed or duplicated; they never determine certificate validity. Automatic expiry, billing, credential federation, digital-signature standards, upstream qualification checks and public recipient discovery are outside scope.
What to build
- An authenticated issuer submits an eligible final achievement and receives the same certificate identity for identical retries or a conflict for changed content.
- Recipients and issuers inspect generation status and download ready certificates; operators retry failed generation without creating another certificate.
- Anyone with an unguessable verification identifier can check a minimal current-validity projection without accessing recipient details or PDF bytes.
- Issuers permanently revoke pending, ready or failed certificates, prevent new download grants, and inspect a durable history that stale workers cannot overwrite.
At scale
- For this exercise, assume 10,000 new certificates per day with bursts of 100 issuance requests per second, two million currently active certificates and 2,000 public verification reads per second.
- For this exercise, PDFs are at most 1 MB and a healthy render takes about two seconds. Make 95% of accepted certificates ready within one minute under provisioned normal load; expose backlog or failures explicitly rather than falsely reporting ready.
- For this exercise, target 300 ms p95 for healthy intake, status, verification and revocation APIs. Preserve the post-acknowledgement revocation guarantee even when that requires returning unavailable instead of stale valid.
- For this exercise, retain certificate identity, immutable document inputs, successful PDF bytes and lifecycle audit for seven years. A single-zone failure must not lose acknowledged issuance or revocation; download grants expire in at most five minutes.