Essay record

Rolling my own self-serve sponsorships for my personal website

Record
Essay / / 2 min read / 711 words
On this page4 sections / +

DISCLOSURE: Some links may be affiliate links. Details

After years of running third-party ads, my website now has self-service sponsorships. Sponsors get their logo, link, and message in the site's banner and footer, plus shout-outs in my videos.

Example:

CloudSeed Rust sponsorship banner showing its logo and one-line message, with a link to sponsor the site.

Here's how it works and how I built it.

How sponsorships work

The sponsor journey is pretty simple:

  1. Create an account and sign in with an email magic link.
  2. Create the ad creative: a logo, company name, link, and one-line message.
  3. Pay through Stripe Checkout.
  4. The ad enters review.
  5. After review, it goes live or is rejected.

Sponsors can create and preview their ads themselves while I hold final say over what goes on the site.

How I built it

The sponsorship system runs in the existing modulith serving my website.

Sponsorship architecture showing a sponsor, server-rendered frontend, Rust backend, external services, and five steps from signup to placement. Green outlines identify users and login, background workers, migrations, and email integration adapted from CloudSeed.

The main components are:

  • Rust app (Axum + Maud) - Serves the sponsor dashboard, admin review screens, and server-rendered site.
  • Database - Postgres stores users, drafts, fixed purchased creative, paid invoice periods, and review state.
  • Accounts - Handles email magic-link sign-in, sessions, and admin permissions.
  • Stripe - Hosts subscription checkout and billing management, with webhooks to keep payment state updated.
  • CDN - Cloudflare R2 stores sponsor logos and serves them through my CDN.
  • Background workers - Tokio tasks process billing, scheduled reviews, and sponsor-pool refreshes, with durable state in Postgres.
  • Email - Resend delivers sign-in links and transactional emails.
  • In-memory sponsor pool - Supplies eligible sponsors for fast page rendering without a database or Stripe call on each page load.

My site didn't previously need accounts - it was just a static markdown blog after all. Rather than building all that from scratch, I ported existing CloudSeed patterns over for things like login, migrations, background jobs, email, and the dashboard.

This is one reason I think boilerplates are still useful. AIs can write code fast but with a blueprint, they are also much more likely to build something in the shape you want.

Why I built it

I've been running this blog since 2013 and mostly relied on third-party ads to help pay for hosting. But that revenue isn't very high. My ethical display ads were bringing in something like $10 a year for years, which isn't particularly useful even with my fully self-hosted architecture.

So over the years I've been diversifying into products like CloudSeed, QuietCut, and my HAMINIONs membership. Those have shown that people want to support the work I'm doing here and read / watch more of it.

I also receive periodic sponsor requests, but I don't want to spend that much time on high-touch creatives or sponsored collaborations. I'd rather focus on the experiments and projects I'm interested in.

Sponsorships seemed like a way to split the difference - companies can reach my audience while supporting those experiments and I control the placements and tracking so it's minimally invasive and privacy-first.

AI lowers implementation costs, shifting ideas from infeasible to feasible, feasible to practical, and practical to commodity.

I probably wouldn't have built this 2 years ago. The effort to build and maintain it wouldn't have justified the likely revenue.

AI and CloudSeed changed that calculation. Much of this is basic CRUD built on foundations I already have, so I can use AI to help build, enhance, and maintain it going forward.

As I wrote in Your Imagination is the Limit, cheaper implementation changes which projects are practical to build. This sponsorship system is one example of that for me - I certainly could've built it before but it wouldn't have been very practical for me.

Next

Want to support my experiments and get your logo in front of tens of thousands of developers? Sponsor this blog!

Ship fullstack Rust webapps fast with CloudSeed.

If you liked this post, you might also like:

Sponsors

Sponsor this site

Built with CloudSeed Rust