VOOZH about

URL: https://thenewstack.io/middleware-in-the-frontend-tool-helps-manage-webhooks-on-vercel/

⇱ Middleware in the Frontend? Tool Helps Manage Webhooks on Vercel - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-05-22 07:18:52
Middleware in the Frontend? Tool Helps Manage Webhooks on Vercel
API Management / Frontend Development / Open Source

Middleware in the Frontend? Tool Helps Manage Webhooks on Vercel

Hookdeck is offering an open source tool that helps frontend developers manage asynchronous event-driven architectures.
May 22nd, 2024 7:18am by Loraine Lawson
👁 Featued image for: Middleware in the Frontend? Tool Helps Manage Webhooks on Vercel
Image via Pexels.

A new open source middleware by Hookdeck will help developers manage asynchronous events on Vercel. Hookdeck Vercel Middleware is designed to run on Vercel’s system with just three lines of code.

The middleware adds the ability to authenticate, delay, filter, queue, throttle, and retry asynchronous HTTP requests (via webhooks) made to a Vercel application, Hookdeck co-founder and CEO Alexandre Bouchard told The New Stack.

Two use cases are dealing with webhooks from API providers such as Stripe, Shopify or Twilio, or building asynchronous APIs. It was a natural extension for Hookdeck, which calls itself an event gateway. Event gateways are like a software central hub for managing the flow of events between services, orchestrating events that come into or leave your system via a third party, he said.

Webhooks: A Gateway to Event-Driven Architecture

“I call webhooks the gateway drug to event-driven architecture because, for a lot of developers, it’s their first exposure to the asynchronous programming paradigm and event-driven architecture concerns,” Bouchard said. “Hookdeck sits in front of the… infrastructure that you have and ingests those events; and we deal with the management, the queuing, the error recovery, and all the security aspects to it, too. What that means is that we become a central point for the ingress and egress of those events.”

Hookdeck considers the event gateway as an evolution of the API gateway, but for event-driven stateful workflows. The company counts its competitors as Azure Event Grid, AWS EventBridge and the open source project, Convoy. But when it comes to the Hookdeck Vercel Middleware in particular, Bouchard doesn’t think there is a competing offering.

“You’re not going to go to Shopify and tell them, hey, you know what guys, come back in half an hour — right now, I can’t deal with this,” Bouchard said. “You don’t really have the benefit of any margin for error when it comes to you not controlling the publisher. Webhooks is a subset of the problem.”

But Why Middleware?

The middleware approach lends itself well to serverless runtimes, Bouchard said. Hookdeck Vercel Middleware solves two problems, he explained. The first is it provides a different web developer experience than the full Hookdeck event gateway. There are a small subset of contexts where this approach will work and Vercel was the best option for trying the approach, he said.

“Hookdeck right now is very declarative. You have to preconfigure all your configuration, your connections and all that before you can go live,” he said. “The goal in middleware was to be able to do that on the sly. So, basically, to be able to say, in this code, I want this endpoint now to become what we call an asynchronous endpoint — an endpoint where the requests are being deferred, queued, modeled, and so on; and do this in a way where, for the developer, the experience is very transparent.”

The middleware component allows the developers to set up an asynchronous endpoint and establish the rules and conditions for it, he said. The code runs on the Vercel Edge network, but Hookdeck manages the actual requests, he added.

“What happens is basically the middleware will receive HTTP requests like a webhook coming from, say, Shopify,” he explained. “It receives a webhook, it evaluates whether or not that should be deferred and queued — and if it does, then, the middleware will forward that request to the Hookdeck edge network.”

With the middleware, developers can manage:

  • Queues;
  • Throttling, for when a third part sends more webhooks than your system can process;
  • Retrying a synchronous HTTP request;
  • Delays, which, for example, would be used in situations where customers can edit an order within a certain time frame;
  • Filters, which would allow filtering based on the data in the payload to let an event through or not. For example, it would allow developers using Shopify to filter all product update webhooks for only the ones where a production is out of stock, Bouchard said.

For scenarios where there will be hundreds of millions of events ingested or anything that’s mission-critical, he recommends using Hookdeck’s core event gateway solution.

Potential Areas of Expansion

JavaScript was also a top choice for trying this approach because it’s so widely used, but if this goes well, Hookdeck plans to develop the middleware for other languages as well, he said.

Hookdeck is also considering expanding the approach to other providers. The code itself is written in a way that much of it could be used outside the context of Vercel, although there are some developer experience considerations that are Vercel-specific, he added. Supabase, an open source alternative to Firebase, is one such provider that he mentioned as a possibility.

“We’re seeing a lot of usage on top of Supabase functions,” he said. “That’s definitely one that we’re seeing and we’re thinking about as well.”

TRENDING STORIES
Loraine Lawson is a veteran technology reporter who has covered technology issues from data integration to security for 25 years. Before joining The New Stack, she served as the editor of the banking technology site Bank Automation News. She has...
Read more from Loraine Lawson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.