Announcing Fuik: a webhook engine for Rails

Webhooks are one of those super simple but really powerful tools that almost every developer has needed to use at least once. From Stripe, GitHub to Postmark. Setting up webhooks is not difficult, but there is quite a bit of boilerplate involved: payload storage, event routing and signature verification. Repetitive. Tedious. Boring. Oh, and did I mention debugging?

Meet Fuik: a Rails engine that catches and stores webhooks from any provider, then gives you a clean way to process them.

👉 If you want to check out the repo and star ⭐ it, that would make my day! 😊

index/list view of Fuik; listing received events from Stripe, GitHub, Shopify and Postmark

You can install Fuik simply by running bundle add fuik and then run the install generator and migrate the database. Seconds of work! Your app can now receive webhooks at /webhooks.

Then visit /webhooks to view all received webhooks. Click any event to see the full payload (that’s where Fuik has some powereful features stored for you; more on that below).

But just looking at your webhook payloads is not enough. Fuik maps every event with a dedicated class. Create one by running:

bin/rails generate fuik:provider stripe checkout_completed

This creates app/webhooks/stripe/checkout_session_completed.rb. Add your business logic:

module Stripe
  class CheckoutSessionCompleted < Base
    def process!
      User.find_by(id: payload.client_reference_id).tap do |user|
        user.activate_subscription!
        user.send_welcome_email
      end

      @webhook_event.processed!
    end
  end
end

Detail view on Fuik’s UI; showing a Shopify webhook event for an order/create event

Fuik’s UI has quite a few more trick up its sleeve to help you (or your LLM friend) debug your webhook issues. 🤖⚡

  • Copy payload as JSON: click a button, payload is in your clipboard
  • Download payload as JSON file: keep it for testing, debugging or throw it at your LLM agent, bot or colleague.
  • Add .json to any URL: get the raw payload without the UI
  • Click any key to get the Ruby accessor path: click product_id (as seen in the above screenshot) in the dashboard and get payload["line_items"][0]["product_id"] (say what? 🤯)

Fuik includes templates for a small selection of providers I needed. Built one yourself? Upstream it and submit a PR. Help your fellow developer by contributing to OSS. ❤️


Already using Fuik? Star it on GitHub. ⭐

Product-minded Rails notes

Once a month: straightforward notes on improving UX in Rails—what to simplify, what to measure, and UI/frontend changes that move real usage.

Over to you…

What did you like about this article? Learned something knew? Found something is missing or even broken? 🫣 Let me (and others) know!

Comments are powered by Chirp Form

Want to read me more?