Skip to content

Build a Supporters-Only Library

Davor Minchorov•Beginner•1 to 2 weekends•December 3, 2026

A woodworker sells her workshop plans to 38 supporters and decides who gets each plan by reading a date in a spreadsheet. You will build the small app that shows every plan in full to supporters who are paid up and only a title and teaser to everyone else, and prove the rule on the last day, the day after and around midnight.

The brief

The client

I make woodworking videos and sell the full workshop plans behind them to 38 supporters, who each pay 6.00 euro a month. A plan is a page of text with a cut list in it, and I publish about two a month.

I keep the supporters in a spreadsheet with a "paid until" column. When a plan goes out I paste it into an email to everyone whose date is still in the future, and I do that by hand, so I forget. A man whose payment had stopped got a new plan because I did not clear his row, and I found out when he posted it on a forum.

I do not want a shop or a checkout. I want one place where I type who has paid until when, and a library that shows each person what they are allowed to see.

The problem

Access to the plans depends on a date that only the creator reads, and she applies it by hand each time she sends an email. Every missed update gives a plan away for free, and every paid-up supporter she leaves out of an email writes to ask where their plan is.

A plan that reaches the wrong person is a plan she cannot sell again, and a supporter she cuts off a day early cancels. The hours she should spend building go to checking dates in a column.

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

  • Let the creator add a supporter with a name, an email and a paid-through date, and change that date later.
  • Let the creator publish a plan with a title, a teaser, full text and an audience of everyone or supporters.
  • Show a list of all plans to anyone: plans for everyone in full, and plans for supporters as title and teaser unless the person asking is paid up.
  • Open a single plan, with the full text only for people the rule allows and a refusal that names the reason for everyone else.
  • Give every access answer a reason the creator could read out to a supporter who asks why.
  • Count a paid-through date to the end of that day in the creator's own time zone, Europe/Amsterdam.
  • Move a supporter's paid-through date forward when the creator records a renewal, and show who is paid up, who ends within 7 days and who has lapsed.
  • Show the total of the payments the creator recorded for a chosen calendar month, in whole cents.
  • Keep supporters, plans and payments after the program is stopped and started again.

Deliverables

  • A program a reviewer can run on their own machine, as a web page, an API that other programs call by sending requests, or a command-line tool, with supporters, plans and payments kept between runs.
  • A README that gets a reviewer from a fresh clone to the answers of the scripted month in 10 minutes, with the expected answer to each of the 12 questions written next to it.
  • Sample data of 5 supporters and 3 plans that the reviewer loads with one command.
  • The access table from the first Phase as a document in your repository.
  • An automated test suite, code that drives the library and checks its answers against what you expect, that runs from one command, with its cases listed in the README.
  • A way for a reviewer to ask the library any question as if it were any chosen moment, so the last day and midnight can be tried in the afternoon.

Out of scope

  • Logins and passwords. The person asking types an email address and nothing checks that it is theirs, so anyone who knows a supporter's email can read as that supporter. That is acceptable on your own machine, so do not put this tool on the internet. Build a Paid Membership Site, the intermediate project in this domain, adds real sign-in.
  • Taking payments or talking to a payment provider. The creator types each payment in herself. Provider messages that arrive twice or late belong to Build a Paid Membership Site.
  • More than one supporter level. There is one level of support at 6.00 euro a month.
  • A grace period after the paid-through date. The creator's rule is the end of that day and nothing more.
  • Search. The creator has not asked for it. One list and one plan page are the whole library for now.
  • Comments, replies, direct messages and events. The creator has not asked for them.
  • Plans as file downloads. A plan is text that a supporter reads in the library.
  • Two people changing the same supporter at once. That is a different problem, handled in Build a Paid Membership Site.
  • Several creators or several libraries. There is one creator and one library.
  • Sending email. The library replaces the emailed plans, and mail delivery is a separate problem.

Architectural constraints

  • Amounts are exact to the cent. 10 cents plus 20 cents is 30 cents, and no total ever shows a fraction of a cent.
  • A paid-through date is a whole day. A supporter reads until midnight at the end of that day in Amsterdam, and not an hour earlier or later.
  • The list of plans and the page for a single plan never disagree: for the same person, plan and moment they give the same answer.
  • The full text of a supporters plan is never sent to a person who is refused, in any form the program sends them.
  • The person or the request can supply the current time, for testing, so that the program can be asked about any moment.
  • Bad input is refused with a message that says what is wrong, and nothing from it is kept.

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 a web framework, queues or time zones. You do not need to know how a maker sells plans to supporters; the first Phase explains the business and the words the brief uses. Each Checkpoint says what goes wrong in the creator's library if you skip it. Having read a date from a form or a command line and printed it back will help.

Create a free accountSign in

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

Phase 1

Keep the circle and the plans in one place

Produces a written table of who sees what, supporters with their paid-through dates, and plans with an audience, all kept between runs. Leaves out the rule itself: nothing is hidden from anyone yet.

Research

Implementation

Implementation

Architectural walkthrough

How a maker sells plans to supporters

A woodworking maker makes videos and sells the full workshop plans behind them to 38 supporters. Each supporter pays 6.00 euro a month, and about two new plans come out each month. A plan is a page of text with a cut list in it. Some plans are free for everyone, and others are only for supporters.

A supporter is entitled to the plans for as long as they have paid. The maker records who is paid up until which date, and a supporter who pays again gets a later date. A supporter who stops paying keeps the date they last paid through, and that date passes. Someone who is not paid up sees a plan's title and a short teaser and no more.

The words this brief uses:

  • Supporter: a person who pays each month for access to the plans.

  • Plan: a page of text with a cut list in it, published with a title, a teaser and an audience.

  • Teaser: the short preview of a plan that anyone can read.

  • Audience: who a plan is for, either everyone or supporters.

  • Paid-through date: the last day a supporter's payment covers.

  • Renewal: a payment that moves the paid-through date forward.

  • Lapsed: a supporter whose paid-through date has passed.

Why the rule has to be written down

This Phase has to survive a creator whose rule lives in her head. "Paid through 12 Mar 2027" means the whole of that day. A library that reads it as one particular hour ends a supporter's access too early or too late for someone, and the hour that is right in Amsterdam is wrong in other cities.

The first Checkpoint has you write the six answers down before anything is built. Without them the library decides the policy by accident, and the first person to find out is a supporter who reads a plan they should not.

Input is part of this too: a missing date or an audience typed as "friends" is cheap to refuse now.

Phase 2

Decide who may read

Produces answers to who may read a plan at any moment, a library list and a single-plan page that agree, and tests for the last day and the day after. Leaves out renewals and money.

Implementation

Implementation

Implementation

Testing

Architectural walkthrough

This Phase has to survive two things. The first is a supporter who reads a plan after their last day ended, or who is refused a plan on the evening they still have. Both happen around midnight in Amsterdam, and each costs the creator: a plan given away that she cannot sell again, or a customer who cancels because she cut them off early.

The second is two places giving different answers. The first time the creator reports a leak, the fix reaches the place she remembers, and the other place keeps leaking. A list that shows a plan in full that its own page refuses tells the supporter the library cannot be trusted.

The moments that matter are 23:00 and 00:00 in Amsterdam on the last day. They do not wait for a test, so the creator needs to be able to ask the library what it would answer at any moment she names. Phase 3 asks the list and the page the same questions again to catch a disagreement that crept back in.

Phase 3

Run a month of renewals

Produces renewals, the paid-up, ending-soon and lapsed groups, a monthly payment total in whole cents, and a scripted month that proves the whole library. Leaves out real payments: the creator types each one in.

Implementation

Implementation

Testing

Architectural walkthrough

This Phase has to survive three things that are easy to confuse. A renewal moves a supporter's paid-through date. A payment is a record of money received. Whether a supporter is paid up is whatever the date says today, and it is never a separate fact the creator has to keep current. If it were, it would be wrong from midnight until someone corrected it.

The scripted month at the end is the proof, with its expected answers written by hand first.

Architectural walkthrough

One answer wherever a plan appears

The library answers one question for every plan: may this person read the full text now? The list asks it for every plan, the page for a single plan asks it for one, and a refusal has to say why.

If two places give different answers, the creator fixes the leak she noticed and the other one keeps leaking. A supporter sees a full plan in the list that its own page refuses, or the reverse. The man on the forum was one case of this, and the next one arrives with a different cause.

The last day ends at midnight in Amsterdam

"Paid through 12 Mar 2027" means the supporter reads until midnight at the end of 12 Mar 2027 in the creator's city. Amsterdam clocks run one hour ahead of the zero point most servers report in during winter and two hours ahead in summer. At 00:30 on 13 Mar 2027 in Amsterdam, a program that works out the date from the wrong clock still sees the 12th and lets a lapsed supporter read for an hour or two. In a city on the other side of the world the same mistake cuts a paid-up supporter off before their last evening is over. Both cost the creator money: one gives a plan away, the other makes a customer cancel.

Midnight does not wait for a test run

The mistakes above happen at 23:30 and 00:30. If the only way to see what the library does then is to be awake then, nobody sees it until a supporter does. The creator needs to ask the library what it would answer at any moment she names.

Money and the month

The creator reconciles each month's total against her bank statement. A total that is off by a fraction of a cent, or a payment of 10 cents and one of 20 cents that do not add to 30, gives her a number she cannot match and cannot trust.

Where it shows if you cut a corner

A plan that is open in the list and refused on its own page means two places disagree. A lapsed supporter allowed at 00:30 on the 13th means the day was read from the wrong clock. A total that is not exactly 30 for 10 cents and 20 cents means the amounts carry fractions. Phase 2 and Phase 3 each ask the questions that show these.