All BlueprintsCommerce

Gift cards and store credit

A small shop that sells gift cards and hands out store credit, where a balance is never a number somebody edits. What is left on a card is whatever its movements add up to: it cannot go past nil, it survives two tabs spending it at once, and anybody who asks where their money went gets a list.

L3–L5Level range
8Sprints
39Tasks
Backend and frontendBuilt as

What you’ll build.

By the last sprint

A shop with gift cards and store credit. Customers buy a card for somebody else, spend a balance across several orders, and never go below zero. A cancelled order comes back as credit, balances warn before they expire, and every movement adds up to the number on screen.

What you’ll learn.

Each sprint is built around one skill. You show you have it in a pull request your team reviews, then explain it in a walkthrough.

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.

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.

A ledger you can trust

You can record credits and debits and produce a balance that is the sum of them — and explain why the balance is not a column you update, and what happens when two movements land at once.

Gift cards and store credit

You can issue a gift card, redeem it against an order it cannot fully cover, and show a remaining balance that agrees with its history.

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.

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.

Statements that reconcile

You can generate a statement for a date range that adds up, downloads, and returns the same figures when it is generated again next month.

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.

Sprint 01

The front door

Somebody can make an account, come back to it, and leave it on a machine that is not theirs.

4 tasks
  1. A shopper can register and land signed in
  2. Signing back in survives a refresh and a night away
  3. Signing out stops the credential working, not just showing
  4. Shop staff accounts exist, and cannot be self-issued
Sprint 02

A shop and a till

Somebody can fill a basket and place an order that records what was bought, what it cost, and that it was paid.

5 tasks
  1. The shop has things to sell, put there by staff
  2. A basket that is still there tomorrow
  3. The total is the price at the till, and it is shown before paying
  4. Placing an order records what was bought, what it cost, and that it was paid
  5. A customer can see the orders they have placed
Sprint 03

Money on a card

A gift card can be bought, reaches the person it was for, and becomes a balance that is the sum of its movements.

5 tasks
  1. A customer can buy a gift card for somebody else
  2. What is on a card is what its movements add up to
  3. A code is money, so guessing one has to be hopeless
  4. The person it was for can claim the card, once
  5. A thousand movements still add up to the penny
Sprint 04

Spending it

A card pays for an order, or for part of one, and two checkouts can never spend the same money.

5 tasks
  1. A claimed card can pay for an order
  2. When the card does not cover it, the rest is paid another way
  3. The money is committed at the order, and comes back if the checkout is abandoned
  4. Two checkouts can never spend the same money
  5. The wallet shows what was spent and what is left
Sprint 05

Money coming back

A cancelled or returned order gives the money back as credit the customer can spend, as new movements, exactly once.

6 tasks
  1. An order moves through the states it can be in, and never backwards
  2. Cancelling before dispatch gives the money back
  3. A refund lands as store credit the customer can spend
  4. A cancellation arriving while the order is being packed resolves once
  5. A part refund on an order paid two ways gives each its share
  6. Store credit can be spent at checkout, in a stated order
Sprint 06

Nothing vanishes quietly

A balance expires on a schedule, after a warning in time to spend it, leaving a movement that says why.

5 tasks
  1. A balance nobody has touched is warned about, in time to spend it
  2. Expiry is a movement with a reason, not a balance disappearing
  3. Warnings and expiries happen with nobody pressing anything
  4. A run that happens twice does not take the money twice
  5. Staff can put an expired balance back
Sprint 07

Where the money went

Anybody entitled to see a balance can see every movement on it, and they add up to the figure on the screen.

5 tasks
  1. A statement of every movement, adding up to the figure on the screen
  2. Last month's statement is the same next month
  3. The shop can explain a balance to the person on the phone
  4. Six hundred movements still open quickly, and paging never lies
  5. A customer can take their statement away
Sprint 08

Open for business

The shop is on the internet at its own address, holding real balances, and the developer is not part of how it stays there.

4 tasks
  1. The shop runs at its own address, not on a laptop
  2. Every secret comes from outside the repository
  3. A release can be put back, and the money survives every one
  4. Somebody can tell whether the shop is up and whether last night ran

Read before you build. The best engineers do.

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 people who use it, and what finished means when the product is holding somebody's money.

A balance is not a number

Why the shop stores movements and adds them up, what that costs, and the three questions the obvious design cannot answer.

Build gift cards and store credit.

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