I added ActivityPub support to my static Hugo blog hosted on Vercel. It now automatically announces new posts to followers on the Fediverse. Key challenges included implementing the ActivityPub protocol for a static site, handling WebFinger discovery, managing Follow/Unfollow requests, and sending signed HTTP requests. I used Vercel Serverless Functions for dynamic request handling and Firebase Firestore for storing follower data. Check out the code and follow me @paul@paul.kinlan.me to see it in action!
Post Deploy Webhook for Vercel
I needed to find a way to send webhooks after a successful deployment on Vercel, which wasn't a built-in feature. Since Vercel integrations can listen for deployment events, I created one to solve this. It's a simple tool hosted on GitHub that lets you set up custom webhooks for your Vercel projects. It's not on the Vercel Marketplace, and it's more of a workaround until Vercel natively supports deployment webhooks. Check out the GitHub repo for instructions on setting it up with Firebase Firestore.
Creating a commit with multiple files to Github with JS on the web
I've created a simple UI for my static site and podcast creator that allows me to quickly post new content. It uses Firebase Auth, EditorJS, Octokat.js, and Zeit's Github integration. This post focuses on committing multiple files to Github using Octokat.js. The process involves getting a reference to the repo and the tip of the master branch, creating blobs for each file, creating a new tree with these blobs, and creating a commit that points to the new tree. The code handles authentication, creates blobs for images, audio (if applicable), and markdown content, and then creates the tree and commit. This setup allows me to have a serverless static CMS.
RSS Feed to Google Chat Webhook using Cloud Functions for Firebase and Superfeedr
I created a simple service using Firebase Functions and Superfeedr to post new entries from RSS feeds to our Google Chat room. Superfeedr polls RSS feeds, including those without Pubsubhubbub, and pings my Cloud Function with the new feed data. The function then parses this data and posts it to our Google Chat webhook. It's surprisingly easy to set up and works great for keeping our team updated with new content.
Web Architecture 101 - VideoBlocks
This blog post provides a basic overview of web architecture concepts that are helpful for new web developers. It covers a standard, scalable web stack and discusses the benefits and tradeoffs of using Platform as a Service tools like Heroku, Firebase, or AppEngine for simplifying development, even with higher costs.