Blueprint · Commerce

Corner shop storefront

An online shop for one small corner shop. The shelf shows what is really in stock, a basket is still there the next day, the shop never takes money for something it does not have, and the shopper can follow their order until they collect it.

L2–L4

Level range

8

Sprints

39

Tasks

Backend and frontend

Built as

By the last sprint

What you’ll build

A real online shop for one corner shop. The shopkeeper adds stock from their phone. Shoppers fill a basket that is still there tomorrow, and when two people try to buy the last tin, only one of them gets it. Orders are paid for, followed and collected at the counter, and stock held for a checkout nobody finished goes back on the shelf by itself.

What you’ll learn

A skill in every sprint

You show you have it in a pull request your team reviews, then explain it in a walkthrough.

01

Authentication

You can register and sign in a user, keep a request authenticated without asking for the password again, and explain where the credential lives in the browser and why there rather than somewhere else.

02

File uploads

You can upload a file from the browser, store it somewhere the application does not own, and show it again on a later request — and say where the bytes travelled and what the database actually holds.

03

A cart that survives

You can add, change and remove items, keep the cart across a logout and login, and show a total that reflects prices as they are now.

04

Stock that cannot go negative

You can decrement stock on a sale and prove that a hundred simultaneous orders for ten items produce ten sales and ninety refusals.

05

An order that moves through states

You can move an order through its states, refuse a transition that should not happen, and show the history of how it got where it is.

06

Background jobs

You can hand work to a worker, tell the user it is in progress, and show the result when it lands — and say what happens to that work if the process dies halfway.

07

Going live

Somebody who has never met you can open a URL and use the product — and you can say what is different about the copy running there, where its secrets come from, and what you do when a release turns out to be wrong.

The roadmap

8 sprints, 39 tasks

Every sprint has a goal and a set of tasks. Open a sprint to see the tasks you will pick up.

  1. Sprint 01

    Behind the counter

    A shopper can create an account and come back to it, and nobody can make themselves the shopkeeper from the sign-up form.

    4 tasks
    1. Let a shopper create an account and be signed in straight away
    2. Let a shopper sign back in and stay signed in for days
    3. Let a shopper sign out and leave nothing behind
    4. Stop anyone making themselves the shopkeeper from the sign-up form
  2. Sprint 02

    Stocking the shelves

    The shopkeeper puts the shop's stock online from their phone, and a shopper can see what is for sale and how many are left.

    5 tasks
    1. Let the shopkeeper add a product to the shelf
    2. Let the shopkeeper add a photo from their phone
    3. Show shoppers the shelf and how many of each product are left
    4. Let the shopkeeper take a product off the shelf or delete it
    5. Make the server refuse shelf changes from anyone but the shopkeeper
  3. Sprint 03

    The basket

    A basket survives closing the browser, comes with a shopper into their account when they sign in, and shows today's prices.

    5 tasks
    1. Let shoppers add products to a basket and change their mind
    2. Keep the basket when the shopper closes the browser
    3. Join the visitor basket into the account basket on sign-in
    4. Price the basket at today's prices and show what changed
    5. Show which basket products are sold out or running low
  4. Sprint 04

    The last one on the shelf

    A shopper pays, the stock count goes down by exactly what was bought, and two shoppers buying the last tin at the same moment produce one order and one refusal.

    5 tasks
    1. Let a shopper pay for their basket and get an order
    2. Lower the stock count only when an order is paid for
    3. Make the stock count refuse to go below zero
    4. Prove that two shoppers cannot both buy the last tin
    5. Show the shopper who lost the last tin what is still available
  5. Sprint 05

    Held, not sold

    Starting checkout holds the stock for 10 minutes so the shopper can finish paying, and a checkout nobody finishes gives the stock back.

    5 tasks
    1. Hold the basket's stock for 10 minutes when checkout opens
    2. Treat held stock as unavailable to every other shopper
    3. Stop a shopper whose hold has ended before taking any money
    4. Give stock back when a shopper leaves checkout
    5. Let the shopkeeper count the shelf while people are buying
  6. Sprint 06

    Where the order is

    An order moves from paid to ready to collected, the shopper can see where it is, and cancelling refunds the payment and puts the stock back.

    5 tasks
    1. Let a shopper see where each of their orders is
    2. Let the shopkeeper work through the day's orders
    3. Allow only the order moves that make sense, and record each one
    4. Refund the payment and return the stock when an order is cancelled
    5. Settle a cancel and a start-packing pressed at the same moment
  7. Sprint 07

    When the shop is shut

    Expired holds go back on the shelf and the shopper is told their order is ready, with nobody at the shop pressing anything.

    4 tasks
    1. Release expired holds every minute with nobody looking
    2. Make every scheduled job safe to run twice
    3. Email the shopper when their order is ready or cancelled
    4. Show the shopkeeper when scheduled work stops
  8. Sprint 08

    Open for business

    The shop is on the internet at its own address, with data that survives a restart, email that reaches real inboxes, and a way back from a bad release.

    6 tasks
    1. Put the shop on a host that strangers can reach
    2. Read every setting and secret from the environment
    3. Send order emails that reach real inboxes
    4. Run the hold release and order emails on the host
    5. Serve the shop at its own address over a secure connection
    6. Make a bad release quick to undo, and alert when the shop is down
The reading

Read before you build

Senior engineers read the docs before they touch the code. Every Blueprint comes with short documents on the product and its world, the kind a team hands a new hire. Read them well and you ask sharper questions and walk into every review prepared.

What you are building

The shop, the two kinds of people who use it, and the three parts that make it hard.

What a count means

In stock, held, available and set aside are four different numbers, and showing one in place of another causes most stock bugs.

More commerce Blueprints

More to build

Not the one for you?

Every Blueprint is planned the same way, across health, shopping, money, education and more.

Browse all Blueprints
Ready?

Build corner shop storefront.

Start your free week. Adaeze runs your kickoff, and Lars reviews every pull request.

Start today, for free