Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Prescription Eyewear Ordering Platform

Let customers choose compatible frames and lenses, submit prescription details safely, and track a correctly manufactured eyewear order.

Problem statement

A retailer is launching prescription glasses. Customers choose an eligible frame and provide a prescription so the correct lenses can be installed.

For this exercise, assume the existing catalog and checkout already sell ordinary products; this design adds prescription capture, lens compatibility and pricing, order-line validation, manufacturing handoff, and status tracking.

A prescription may be entered manually or attached as a document, must pass format and eligibility checks, and remains sensitive customer data. A submitted eyewear line pins the frame, lens choices, prescription version, price, and manufacturing instructions.

A partner laboratory may accept, reject, or report an outcome-unknown handoff, and later reports production and quality-control states. Design the customer journey, durable state, APIs, architecture, security boundary, partner integration, recovery, and observability.

Eye examinations, clinical diagnosis, insurance adjudication, warehouse fulfillment after completed manufacturing, and the retailer's general checkout are outside scope.

What to build

  1. Show prescription-eligible frames and lens choices, and reject incompatible combinations before purchase.
  2. Capture a versioned prescription by structured entry or document attachment and expose actionable validation outcomes.
  3. Create one immutable, idempotent eyewear order line that pins the prescription and manufacturing specification.
  4. Transfer accepted work to a laboratory exactly once logically, reconcile uncertain outcomes, and ingest ordered status updates.
  5. Let customers and operators track production and resolve a rejected or failed specification without corrupting history.

At scale

  • For this exercise, assume 20 million eligible frame variants, 300,000 daily eyewear configuration sessions, and 40,000 submitted eyewear order lines per day.
  • For this exercise, assume prescription documents are at most 15 MB, customer configuration reads target p95 under 300 ms, and an accepted order must never be manufactured from a different prescription version.
  • For this exercise, assume three laboratory partners with independent APIs, regional outages, duplicate callbacks, and callbacks that may arrive out of order for up to seven days.