Skip to content

    Frontend System Design

    Front-End Capstone: Brief, Requirements and Rubric

    Scope a front-end capstone on the ShopStream checkout: requirements, testable acceptance criteria, the evidence reviewers ask for, and a scoring rubric.

    By Published 13 min read

    • frontend-system-design
    • capstone
    • requirements
    • acceptance-criteria
    Share

    Standard lessonintermediateFrontend System Design

    Before this: The Front-End Architect Interview Framework, Architecture Decision Records and Documentation

    What you'll learn: By the end of this lesson you will be able to cut a front end down to a capstone you can finish, write requirements as acceptance criteria that a test can fail, say which criteria a laptop test can prove and which need a deployed build, list the evidence a reviewer will ask for, and score your own work against a rubric before anyone else does.

    A driving test works because the examiner holds a checklist. "Drive well" cannot be marked; "stops at the line", "checks the mirror before signalling" and "keeps to the limit" can. A candidate who has seen the checklist practises the right things, and a failed item points at exactly what to fix.

    A capstone brief is that checklist. Earlier lessons each taught one idea. A capstone asks you to use several together on one small front end, and to show evidence that they work. This lesson is the brief. The two that follow, front-end capstone architecture and design document, and front-end capstone build, audit and review, cover the design and the evidence. The previous lesson taught the decision records that are one of the deliverables here; the interview-framework lesson is not linked yet.

    Verified on 2026-12-02 against RFC 9110, RFC 9457, web.dev on Core Web Vitals and INP, WCAG 2.2, the Gherkin reference and a design-doc article. No code was run. Thresholds marked illustrative are this course's choices, not industry standards.

    The core idea

    A capstone is one slice of one front end plus a written definition of done. The size is limited on purpose. The definition of done is a list of acceptance criteria, each one a statement a test or an audit can prove wrong, with its threshold fixed before the run.

    Three illustrations run through the lesson:

    • Minimal example: one vague wish ("checkout must feel fast and be accessible") rewritten as criteria that can fail.
    • Realistic example: the ShopStream checkout front end, with its scope, requirements and criteria.
    • Failure example: a brief with no non-goals that grows until nothing is finished.

    What the capstone is

    The capstone builds on ShopStream, the course's grocery marketplace, an educational reference design and not a real company. The back-end capstone brief built the checkout service for the slice of ShopStream described in its first stage. The front-end capstone builds the part a shopper touches: cart review, checkout and order status. A shopper reviews a cart, submits it, sees that the order was received, and can come back to see its status. The e-commerce case study shows the wider storefront; the capstone takes one journey from it.

    The back-end side of the contract is already fixed by the other brief: a valid cart gets a 202 answer with an order id, an invalid one a 400, overload a 503, and an order's status can be read back. The front end must behave well against each. In the stage design, checkout is asynchronous after the order is accepted, which is why "received" and "confirmed" are different screens (see the order pipeline stage).

    The front-end slice inside ShopStreamShopper to Checkout front end; Checkout front end to Checkout API (submit); Checkout front end to Order status (poll status); Checkout front end to Catalogue prices (refresh prices); Checkout front end to Evidence (results)Shopper: phone or laptopShopperphone or laptopCheckout front end: the capstoneCheckout frontendthe capstoneCheckout API: back-end capstoneCheckout APIback-end capstoneOrder status: read backOrder statusread backCatalogue prices: current priceCataloguepricescurrent priceEvidence: tests, auditsEvidencetests, auditssubmitpoll statusrefresh pricesresults

    Figure 1. The slice. How to read this: the capstone is the accent box; the three grey boxes belong to the back-end capstone and ShopStream. The green box is the evidence the capstone produces, which is as much a deliverable as the code.

    Everything else is a non-goal, written down because a boundary that is not written moves.

    In scope Out of scope (non-goals)
    Cart review with current prices Product search and recommendations
    Checkout form, validation, submit Real payment capture screens
    Handling 202, 400, 503 and a lost reply Sign-in and account pages
    Order status page that survives a reload Native apps, push notifications
    Accessibility, performance and test evidence Internationalisation beyond one locale

    The design-doc article from Google's engineering community defines non-goals as "things that could reasonably be goals, but are explicitly chosen not to be goals".

    Requirements that can fail

    Minimal example. "Checkout must feel fast and be accessible" cannot fail: nobody said how fast, on what, or measured by whom. Rewrite it into two sentences a run can prove wrong:

    At the 75th percentile of real page loads, the checkout page has an LCP of at most 2.5 seconds. Every control on the checkout form can be reached and operated with the keyboard alone.

    The first uses a published threshold. web.dev says "LCP should occur within 2.5 seconds of when the page first starts loading", gives 200 milliseconds as the good INP and 0.1 as the good CLS, and recommends measuring "the 75th percentile of page loads, segmented across mobile and desktop devices". The second restates WCAG 2.2 success criterion 2.1.1, which asks that all functionality be "operable through a keyboard interface".

    The capstone keeps six functional and six non-functional requirements.

    Id Requirement Kind
    F1 Cart review shows server prices, not a copy kept on the client Functional
    F2 The checkout form validates before sending and shows each server error next to its field Functional
    F3 One checkout attempt creates one order, even if the button is pressed twice Functional
    F4 A 202 answer leads to a status page that shows "received" until a final state Functional
    F5 A 503 answer shows a busy message and retries politely, then offers a manual retry Functional
    F6 The order status is readable from a link and after a reload Functional
    N1 The flow meets WCAG 2.2 level AA for the criteria in scope Non-functional
    N2 The field Core Web Vitals meet the "good" thresholds Non-functional
    N3 The checkout route stays within a size budget set in the design doc Non-functional
    N4 Every screen defines its loading, error, empty and content states Non-functional
    N5 A lost reply or a retry never produces a second order Non-functional
    N6 The main decisions are recorded, and at least one record has a check Non-functional

    For N4, the error, loading and empty states lesson gives the states to list. For N3, performance budgets shows how to set and enforce the number.

    The contract with the back end

    The front end must map each back-end answer to a screen. RFC 9110 gives the status meanings: 202 "indicates that the request has been accepted for processing", and "the processing has not been completed", so a 202 is not a confirmation; 503 "indicates that the server is currently unable to handle the request", and the server may send a Retry-After header to suggest how long to wait. RFC 9457 defines the problem details object for errors, with members type, title, status, detail and instance, served as application/problem+json; the problem details lesson covers the back end's side.

    Back-end answer What the shopper should see Requirement
    202 with an order id "We have your order" and a link to its status F4, F6
    400 problem details Each problem next to its field, plus a summary F2
    503, maybe with Retry-After "We are busy, trying again", then a manual retry F5
    No reply, timeout "We could not confirm; checking" and a retry that reuses the same key F3, N5

    The last row is where front-end capstones usually fail. A client-generated idempotency key, as the back-end brief defines it, must be made once per checkout attempt, not once per click. The idempotency lesson explains why; the front end's job is to reuse the key.

    stateDiagram-v2 accTitle: Checkout screen states accDescr: The form is editing. Submitting moves to sending. A 202 answer moves to received. A 400 answer returns to editing with field errors. A 503 or a timeout moves to retrying, which resends with the same key, and after the retry limit moves to failed with a manual retry that returns to sending. The received state moves to confirmed or rejected when the order status changes. [*] --> Editing Editing --> Sending: submit Sending --> Received: 202 Sending --> Editing: 400, show field errors Sending --> Retrying: 503 or timeout Retrying --> Sending: wait, same key Retrying --> Failed: retry limit reached Failed --> Sending: manual retry, same key Received --> Confirmed: status confirmed Received --> Rejected: status rejected

    Figure 2. The checkout as a state machine. How to read this: every answer the back end can give has one arrow. There is no arrow from Sending straight to Confirmed, because 202 means received, not done. Each state needs a defined screen (N4).

    Acceptance criteria

    A criterion turns a requirement into a check with a threshold. The Gherkin reference describes the standard shape: Given steps "describe the initial context of the system", When steps "describe an event, or an action", and Then steps "describe an expected outcome, or result". The capstone has eight criteria. The thresholds marked illustrative are this course's, to be replaced by numbers you fix in the design doc before the run.

    Id Given / When / Then (short) Threshold How it is checked Covers
    AC-1 Given a valid cart, when Submit is pressed twice in one attempt, then one order id is shown 1 order, 1 key Component test with a fake API that counts requests F3, N5
    AC-2 Given a 400 naming a field, then the error appears by that field and is announced each field linked to its message Component test using roles and labels F2
    AC-3 Given a 503 with a retry delay of 2 s, then no retry fires earlier at most 3 automatic attempts (illustrative) Test with fake timers F5
    AC-4 Given a timeout, when the attempt is retried, then the same key is sent same key, 1 order Test with a fake API F3, N5
    AC-5 Given an order id in the URL, when the page is reloaded, then the status is shown status visible without a form Component test F6
    AC-6 Given only a keyboard, then the whole flow can be completed every control reachable and operable Manual pass, plus automated checks in CI N1
    AC-7 Given the design tokens, then body text has contrast at least 4.5:1 4.5:1 Unit test over the tokens N1
    AC-8 Given real traffic, then LCP, INP and CLS at the 75th percentile are good 2.5 s, 200 ms, 0.1 Field data from a deployed build N2

    AC-7 comes from WCAG 1.4.3, which asks for "a contrast ratio of at least 4.5:1" for text with listed exceptions. AC-8 cannot be proved on a laptop: the site's thresholds are about field data, so a good report says "not measured, needs a deployment" rather than quoting a lab number as if it were field data. A lab run can be attached as supporting evidence, labelled as such. Browser-based audits run in CI, not on the author's machine.

    Deliverables and how they are scored

    flowchart LR accTitle: From brief to review accDescr: The brief and scope feed a design document and decision records. These drive the build and tests. The build produces accessibility and performance evidence. All of it goes to a final review that fills in the acceptance table. B["Brief and scope
    D1"] --> DD["Design doc
    D2"] B --> AD["Decision records
    D3"] DD --> BU["Build and tests
    D4"] AD --> BU BU --> EV["Accessibility and
    performance evidence
    D5"] EV --> R["Review and
    acceptance table
    D6"] BU --> R

    Figure 3. The deliverables. How to read this: the brief comes first and the review last. The design doc and the decision records both feed the build, so a build that contradicts either can be caught at review.

    The rubric is this course's own, with illustrative weights. A reviewer scores each row from zero to its weight.

    Area Weight Full marks look like
    Scope and requirements (D1) 10 Non-goals listed, every requirement testable
    Design doc (D2) 20 Alternatives, trade-offs and risks written down
    Decision records and diagrams (D3) 15 At least four records, one with a check, a container diagram
    Build and tests (D4) 25 A test per functional requirement, deterministic
    Accessibility and performance evidence (D5) 15 Criteria fixed before the run, lab and field kept apart
    Review and honesty (D6) 15 Unmeasured items marked, no claim beyond the evidence

    Honesty carries weight. A report with eight green rows and no "not measured" row is more suspicious than one with a failure in it.

    One checkout, including the bad paths

    sequenceDiagram accTitle: One checkout with a busy answer and a lost reply accDescr: The shopper submits. The front end creates one idempotency key and sends the request. The first attempt gets a 503 with a retry delay. After waiting, the front end resends with the same key. The reply is lost, so it resends once more with the same key and gets a 202 with an order id. It then shows the status page. participant S as Shopper participant F as Front end participant A as Checkout API S->>F: Submit F->>F: create key K once for this attempt F->>A: POST checkout (K) A-->>F: 503, retry after 2 s Note over F: wait 2 s, show busy message F->>A: POST checkout (K) A--xF: reply lost Note over F: timeout, show checking message F->>A: POST checkout (K) A-->>F: 202 with order id F-->>S: received, link to status

    Figure 4. The realistic path. How to read this: the key K is made once and reused on every resend. The back end's own criterion makes a repeated key safe; the front end's criteria, AC-1 and AC-4, prove it never sends a different one.

    Failure example. A brief that said "build a great checkout" with no non-goals. Each review added a wish: address autocomplete, saved cards, a loyalty banner. By the deadline there was a polished form, no status page, no accessibility pass and nothing to score. The fix is a written non-goals list signed off before the build, changed only by an explicit decision.

    Trade-offs

    Choice Gain Cost Wrong when
    Narrow slice, deep evidence Finishes; every claim backed Much of the store untouched The slice skips the concepts you wanted
    Wide slice, shallow evidence A broader tour Nothing is proved You cannot defend each number
    Lab audit only Easy to run in CI Not what users experience You report it as field data
    Strict thresholds, set early Clear pass or fail Easy to miss They are chosen after the data

    In practice: scoping the checkout front end in three weeks

    This is a realistic scenario, not a case history.

    This is an educational scenario; nothing in it describes a real team.

    The situation

    A learner has three weeks and a laptop on which browser automation is not allowed. The first draft of the brief says "build the ShopStream storefront". It lists nine screens and no definition of done.

    Starting architecture

    A single-page app skeleton, and nothing that says which screens count.

    Options considered

    Option Gain Cost Risk
    A. Nine screens, thin Looks complete Three weeks cannot cover it No evidence for any screen
    B. Checkout slice, fake API Finishes, every criterion testable Not the real back end Fake API drifts from the contract
    C. Visual polish on one screen Impressive demo Skips states and accessibility Rubric rows D4 and D5 are empty

    The decision

    Option B. The brief lists five non-goals, eight criteria with thresholds fixed before the first run, and AC-8 marked "not measured, needs a deployment". The fake API replays the four back-end answers from the contract table, and a test fails if its answers stop matching the back-end brief.

    Rollout and verification

    Week one: brief, design doc and first decision records. Week two: the build, with a test per functional requirement. Week three: accessibility and performance evidence, then review. The reviewer scores the rubric from the report alone and checks that each threshold was written before its run.

    The 2 a.m. failure

    At the demo, a shopper on a slow connection taps Submit, sees nothing for a few seconds, and taps again. Two orders appear. The code generated a new key inside the click handler, so each tap was a fresh attempt. First checks: where is the key made, and how long does it live? Mitigation: create it when the attempt begins and keep it until the order id arrives or the shopper edits the cart. The brief-level fix is AC-1, written first, so the next run fails on it instead of the demo.

    Architect's notes

    • Write the definition of done first. Thresholds chosen after the data are decoration.
    • Give non-goals a reason each, or they get reopened.
    • Mark what you cannot measure. "Not measured" is a finding; a guessed number is a defect.

    Common mistakes

    • No non-goals, so the scope grows until nothing is finished.
    • Requirements without numbers. "Fast" and "accessible" cannot fail.
    • Treating 202 as success. It means received, not done.
    • Scoring only the code. Most of the rubric rewards decisions and evidence.

    Key takeaways

    • A capstone is a small slice plus a written definition of done.
    • Rewrite every requirement until a run could prove it wrong.
    • Fix thresholds before the run, and say where each number comes from.
    • Map every back-end answer to a screen, and one idempotency key to one attempt.
    • Lab results and field results are different evidence; label which you have.
    • Honesty about unmeasured criteria is scored.

    Practice exercises

    Exercise 1 (20 min). Rewrite "the cart page must work on a bad connection" as two acceptance criteria with a threshold and a check each.

    Exercise 2 (30 min). List five non-goals for a capstone on another front end of your choice, with a one-line reason each.

    Exercise 3 (30 min). Score a draft brief of your own against the rubric. Which row is weakest and what would raise it?

    Official documentation

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Get new articles by email

    Free. We email a confirmation link first, and you can unsubscribe from any email.

    Join engineers building production AI systems

    Comments