Type a topic, pick 10, 20 or 30 cards, and Claude writes you a study deck. Flip through it right away or save it for the night before.
I built this to prep for job interviews: type in whatever the next one is likely to cover, get a deck, flip through it.
It was also the first project where I got Stripe subscriptions actually working, which is why FIT 9to5 started life as a copy of it.
The topic and card count go to an HTTPS Firebase Function that calls Claude Sonnet 5.5 with two tools. One is flash_cards, a custom tool whose input schema is just { cards: [{ question, answer }] }. It never runs anything; it exists so the model hands back structured output. The other is web search, capped at two uses, so decks on niche or recent topics rest on something real.
Tool use isn't forced, so parsing is defensive: take the flash_cards block if there is one, otherwise slice the first text block from the first [ to the last ] and parse that. The prompt also has to tell the model to keep citation tags out of the cards.
Generating needs an account, and the function verifies your Firebase ID token before anything else. Subscribers use my Anthropic key. People who saved their own key use theirs, which is stored encrypted and only ever shown as its last four characters. Everyone else gets one deck on me.
That free deck used to be a flag in localStorage, which is an honor system. Now it's claimed atomically in a server-only field, freeGenerationUsed, so two tabs can't both win, and it's handed back if the Anthropic call fails.
Stripe hosts checkout, with the Firebase uid riding along as client_reference_id. The webhook verifies Stripe's signature against the raw request body and records the outcome in subscriptionStatus. The UI only ever reads that field, so every device and tab agrees.
Tool use isn't forced, so the bracket-slicing fallback stays.
The prompt has to keep cite tags out of the card text.
Getting Stripe Checkout past it took six commits and one revert.
One status field, written only by the server, made every session agree.
main