Skip to content

Build a Session Pack Tracker

Davor Minchorov•Beginner•1 to 2 weekends•October 29, 2026

A solo career coach sells prepaid packs of five sessions and counts them in a paper notebook. She loses income whenever she cannot say whether a cancelled session was cancelled early enough to give back. You will build a small tool that counts the sessions left on each pack, books and cancels sessions by her cancellation rule, and shows every client her own time.

The brief

The client

I am a career coach and I work alone. I have about twelve clients at a time, and I sell each of them a pack of five one-hour sessions. I keep the count in a paper notebook: a client's name, a row of five boxes, and a tick for every session.

A client once told me her sixth session was included. I had written "cancelled" next to one tick and could not remember whether she cancelled the evening before or an hour before. I gave her the session and lost a morning's income.

Some of my clients live abroad, so I also never know which hour a booking shows on their clock. I need something that counts for me, applies my cancellation rule the same way every time, and shows each client her own time.

The problem

A pack is money the coach has already been paid, and each session in it is an hour she can sell once. The notebook cannot tell her whether a pack still has a session left, whether it has expired, or whether a cancelled session was cancelled early enough to give the session back.

When she guesses wrong she either gives away a free hour or argues with a client who paid for it. Both cost more than the tool takes to build.

The client's name and figures are invented for this brief; the rules and the failures are ones that real businesses of this kind work with.

The spec

Requirements

  • Add a client with a name, an email and a time zone.
  • Record that a client bought a pack of a given number of sessions at a given price, and give the pack an expiry date 90 days after purchase.
  • Show, for any client, each of their packs with the sessions included, the sessions left and the expiry date.
  • Book a session for a client at a chosen start time. The session uses one session from one of the client's packs, and when the client has several open packs it uses the one that expires first.
  • Refuse a booking, with a reason the coach can read, when no pack has a session left, when the session would start after the pack expires, or when the start time has already passed.
  • Cancel a session. A client who cancels 24 hours or more before the start gets the session back. A client who cancels later forfeits it. When the coach cancels, the session is always given back.
  • Refuse to cancel a session that is already cancelled, and change nothing when it does.
  • Show a client's history: every session with its start time in the client's own time zone and its state.
  • Accept the current time as an input, so every rule that depends on the clock can be checked without waiting.

Deliverables

  • A working tool in the language and interface of your choice: a web page, an API that other programs call by sending requests, or a command-line program.
  • A README that takes a reviewer from a fresh copy of the project to the replay of the coach's notebook, with the final numbers shown, in 10 minutes, and lists the command for each test.
  • The coach's notes from the first Checkpoint: what she tracks, her rules in her own words and the worked examples.
  • A set of rule cases that runs in one action and reports pass or fail for each case.

Out of scope

  • Taking payment. The coach collects money by bank transfer, so the tool records that a pack was bought and nothing else.
  • Clients logging in and booking themselves. The coach is the only user. A client booking her own hour is the next step up, Build a Booking System for a Coaching Studio.
  • Refusing two sessions at the same hour. The coach looks at her own calendar, and this tool does not know about it.
  • Subscriptions, monthly credits and emergency passes. A renewing plan adds states the notebook never had.
  • Video calls, messages, session notes and email reminders. Each is its own area of a larger product.
  • More than one coach, payouts and commission.
  • Moving a session to another time. The coach cancels the old one and books a new one.
  • Selling a single session without a pack. The coach sells only packs.
  • A login, users and roles. One coach on her own machine does not need them. Do not put this tool on the internet: anyone who can open it could read every client's email and change every pack.

Architectural constraints

  • Amounts are exact to the cent. A price of 450.00 is always shown back as 450.00, however many packs are added up.
  • A session shows the same moment to everyone and the right hour on each client's own clock, including either side of a clock change in her country.
  • The tool can be told what the current time is. It uses the real clock only when nobody supplies one.
  • The sessions left on a pack always equal the sessions included minus the sessions that still count as used in the client's history. Nobody types the number in.
  • A refused booking or a refused cancellation changes nothing.

Prerequisites

You can write a small program in a language of your choice and have saved data to a database or a file once. You do not need to know how a coach sells sessions, how time zones work, or any framework. You do not need to know how a solo coach sells packs of sessions; the first Phase explains the business and the words the brief uses. Having written one automated test helps.

Create a free accountSign in

Free to start. An account is what keeps track of the checkpoints you finish.

Phase 1

Record clients and packs

Produces the coach's notes, clients with a time zone, packs with an expiry date, and a view of each client's packs with the sessions left. Leaves booking and cancelling for later, so every pack still has all its sessions.

Research

Implementation

Implementation

Implementation

Architectural walkthrough

How a solo coach sells packs of sessions

A career coach works alone with about twelve clients at a time. She sells each client a pack: a set number of one-hour sessions, five in her case, paid for up front. A client then books sessions one at a time, each at a start time, and each one uses up a session from the pack.

Packs do not last forever. A pack expires 90 days after it is bought. A client can cancel a booked session, and her rule decides whether the session goes back to the pack or is lost. Some clients live abroad, so the same start time shows as a different hour on their clock.

The words this brief uses:

  • Pack: a set number of sessions a client has bought at one price.

  • Session: one hour of coaching, booked at a start time.

  • Sessions left: the sessions in a pack that are not used or forfeited.

  • Expiry date: the day a pack stops being usable, 90 days after purchase.

  • Forfeit: lose a session because the client cancelled too late.

  • Time zone: the region whose clock a time is read on. A start time is the same moment everywhere and a different hour on each clock.

Why the numbers come first

Three numbers have to be right before a single session exists: how many sessions a pack has left, what a pack cost, and which hour a client sees on her own clock. Each one fails in a way the coach cannot see until a client argues with her.

The first Checkpoint is research for that reason. The coach's rules and examples are worked by hand before anything is built, so the numbers the finished tool must reach are known in advance.

Phase 2

Book and cancel sessions

Produces booking and cancelling that apply the pack rules, including every refusal. Proves booking and cancelling at the edges of the clock in one run. Leaves the history view and the replay of the coach's notebook for the next Phase.

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

This Phase must survive a coach who makes ordinary mistakes: cancelling a session twice, booking an hour that has gone, booking a client whose pack ran out last week. Each mistake costs her money or trust if the tool accepts it.

The cancellation rule depends on what time it is. If the only way to see it fire is to wait a day, it is a guess until a client argues.

Phase 3

Show the history and prove the rules

Produces the client's session history in her own time zone, a set of rule cases that run in one action, and a replay of the coach's notebook from an empty tool. Adds no new rule.

Implementation

Testing

Testing

Architectural walkthrough

This Phase is about trust, in two places. A client in New York who is shown the coach's clock arrives six hours off for a session the coach thinks is settled. Every client has to see her own hour for the same session, and the session itself must be the same one for all of them.

The second place is the rules. A rule the coach only tried by hand is a rule she guessed at. If a change moves the cutoff by one minute, the first person to find out is a client with a disputed cancellation. A set of cases that covers the cutoff and the expiry boundary by name turns that into a failing case on the day it happens.

The replay at the end covers what single rules miss. Booking, cancelling, expiry and the choice between two packs affect each other, and a count that is wrong in one corner shows up only when they all run together. The replay starts from nothing and ends at numbers fixed in advance.

Architectural walkthrough

A count that disagrees with the list

A tracker that keeps a number on each pack called sessions left works until the coach makes one mistake. She cancels the wrong session, or the program stops halfway through a booking, and the number and the list of sessions now disagree. Neither one can tell her which is right, and she is back to arguing from memory.

The count has to follow from the sessions it describes. Fixing a wrong cancellation then fixes the number, because there is no second figure to repair.

A rule that depends on the clock

Whether a cancellation gives the session back depends on how long before the start it was made, so the answer depends on what time it is. If the only way to see the rule fire is to wait a day, the rule stays a guess until a client argues about it. At exactly 24 hours, a minute under and a minute over, a wrong answer costs the coach an hour of income or a client's goodwill.

A booking that half happens

A booking has two good outcomes: the session exists and the pack is one lower, or nothing happened. The outcome in between is a pack that lost a session to a booking that does not exist. The coach sees an empty pack and a diary with nothing in it.

Where it shows if you cut a corner

A sessions-left figure typed in or kept apart shows at the end of the replay, as a number that does not match the sessions behind it. A rule that cannot be run at a chosen time shows as boundary cases nobody can run. Clock text kept without its place shows as a client in New York seeing her session six hours off. Prices that pick up fractions of a cent show on a long run of packs, not on a single price of 450.00.

The next step up is Build a Booking System for a Coaching Studio. It takes the same packs and the same cancellation rule into a setting where clients book their own hours, so two of them can want the same slot at the same moment.