I have this small mental problem where I like to do the same thing repeatedly to see if I can squeak out just one more little bit of groovy awesome. For me, that “same thing” is building a Stripe webhook receiver, complete with digital fulfillment, using TypeScript, Cloudflare, and PostgreSQL.

If you’ve seen any of my videos in the last few months you’ve seen me do this. I like this problem because it’s complex enough to exercise some serious logic, but not too difficult a problem that takes hours.

OK anyway to the dang point already: I think I hit about 80% of what I want to happen:

  • Tests that are well-written in the style I prefer (BDD, given-when-then, happy and sad paths, one expectation per spec)

  • Rigorous attention to SOLID.

  • A glowing review from Gemini or ChatGPT (an LLM I don’t use aside from review).

  • The use of some type of dependency orchestration - like a DI container or composite root.

  • I can change out/update/upgrade major parts of the app without a full rewrite.

This makes me happy, but there’s so much more to do! Primarily orchestration, which I think my next premium video will be all about (using this template set).

There’s more to say about all of this, and I surely will, but I wanted to share the code/instructions with you, which I wrapped up in a fun onboarding/interview package so you can roll your own.

I like TypeScript and Postgres, and I hate Repositories. Those are my preferences - but you might have something different.

The Interview

When you first use this, ask Claude (or whatever LLM) to go through the files and interview you about the missing pieces. Some of it is templatized for you to fill in, and Claude can do that for you quickly.

Once that’s done, have Claude explain how to use the whole thing, or just have a look around. If you’re impatient, well OK fine!

I separated things strictly into agents (things that get spawned out to do work), skills (the stuff that truly matters, such as SOLID, GoF, BDD, etc) and finally commands, which are things I do in a codebase.

There are other commands in there as well, particularly for Git and GitHub. Repetitive stuff that really should be automated.

I have a particular convention I follow as well, but ultimately I don’t like being confined to someone else’s process, which is why I’m turning this out as a template! Make it your own, and go rock yourself some bitchen code.

Let me know what you think! You can download it right here:

claude-playbook.zip