Skip to content

Design & development projects

Things I’ve Built

Here is a small sampling of projects I’ve made.

Previous: Defiant Jazz

05 Serverless functions 2025 View as Markdown

Sanity Functions recipes

Official, ready-to-copy serverless functions for Sanity users. I wrote 9 of them and helped maintain the library.

Links
[Sanity Function recipes ]
[Publish once, post everywhere ]
[Automatically tag blog posts ]
[Notify your team in Slack ]
[Capture tone of voice ]
[Brand voice validator ]
[Post to Bluesky ]
[Post to Mastodon ]

Sanity Functions run your own code on Sanity’s infrastructure whenever content changes. I helped build the recipe library that goes with them: official, ready-made functions anyone can add to a project with one command and have running before lunch.

npx sanity blueprints add function --example slack-notify

Publish a post and a Slack channel hears about it. Publish once and a function posts it to Bluesky, Mastodon, LinkedIn, and five more platforms, formatted for each. Another one tags posts for you, reusing the tags already in the dataset before the model is allowed to invent a new one, which is exactly the kind of chore an AI should be doing in the background instead of an editor. Another checks a draft against the brand voice and writes the suggestions back into the document. I created 9 of the library’s 21 recipes, including most of the ones linked above, worked on all but one of the rest, and kept them working as the product shipped underneath them.

A function is a serverless handler declared in a blueprint next to the Studio and triggered by a content event. The GROQ filter on that trigger is the whole ballgame: without a tight one, every publish in the dataset invokes the function, which is a correctness bug and a bill at the same time. The projection matters for the same reason, so the handler only receives the fields it uses. The AI recipes go through Agent Actions instead of raw model calls, so the model writes into the document through the schema rather than handing back a blob of text to parse. Every recipe is a self-contained folder: handler, blueprint config, a sample event so it runs locally against a real document shape, and a README with the env vars. That structure is what let them keep pace with a handler signature and CLI that kept changing after the library was public.

The point of all of it is time to a working function. A developer who has one running in ten minutes will try the next one, wire it into a real project, and fork it into something the recipe never anticipated. A developer who starts from an empty handler usually closes the tab. The recipes exist so the first thing happens.