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.
What you’ll build.
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.
The front door
Somebody can make an account, come back to it, and leave it on a machine that is not theirs.
4 tasks
- A shopper can register and land signed in
- Signing back in survives a refresh and a night away
- Signing out stops the credential working, not just showing
- Shop staff accounts exist, and cannot be self-issued
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
- The shop has things to sell, put there by staff
- A basket that is still there tomorrow
- The total is the price at the till, and it is shown before paying
- Placing an order records what was bought, what it cost, and that it was paid
- A customer can see the orders they have placed
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
- A customer can buy a gift card for somebody else
- What is on a card is what its movements add up to
- A code is money, so guessing one has to be hopeless
- The person it was for can claim the card, once
- A thousand movements still add up to the penny
Spending it
A card pays for an order, or for part of one, and two checkouts can never spend the same money.
5 tasks
- A claimed card can pay for an order
- When the card does not cover it, the rest is paid another way
- The money is committed at the order, and comes back if the checkout is abandoned
- Two checkouts can never spend the same money
- The wallet shows what was spent and what is left
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
- An order moves through the states it can be in, and never backwards
- Cancelling before dispatch gives the money back
- A refund lands as store credit the customer can spend
- A cancellation arriving while the order is being packed resolves once
- A part refund on an order paid two ways gives each its share
- Store credit can be spent at checkout, in a stated order
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
- A balance nobody has touched is warned about, in time to spend it
- Expiry is a movement with a reason, not a balance disappearing
- Warnings and expiries happen with nobody pressing anything
- A run that happens twice does not take the money twice
- Staff can put an expired balance back
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
- A statement of every movement, adding up to the figure on the screen
- Last month's statement is the same next month
- The shop can explain a balance to the person on the phone
- Six hundred movements still open quickly, and paging never lies
- A customer can take their statement away
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
- The shop runs at its own address, not on a laptop
- Every secret comes from outside the repository
- A release can be put back, and the money survives every one
- 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.
More commerce Blueprints.
Corner shop storefront
A small shop sells online. The shelf shows what is genuinely there, a basket survives the tab it was made in, the shop never takes money for a tin it does not have, and the buyer can follow their order until they pick it up.
Food ordering with options
Ordering for one restaurant, where a dish is a set of choices rather than a price. A size replaces the base price, extras add to it, some extras only exist on some sizes, and the total the customer is charged is worked out from what they chose rather than taken from the browser.
Restock waitlist
A waiting list for what a small shop has run out of. People ask to be told when it returns, and when three come back the stock goes down the line in the order they asked: held long enough to act on, offered to nobody behind them until that window closes, and never offered to the same person twice.
Build gift cards and store credit.
Start your free week. Adaeze runs your kickoff, and Lars reviews every pull request.