Trigger Vercel Functions from database changes [open source]

Hey everyone,

Excited to share an open source project my colleagues and I have been working on.

Sequin (https://github.com/sequinstream/sequin) sends Postgres rows and changes over webhooks. You can trigger Vercel Functions directly from Vercel Postgres.

At some point, almost every app needs to trigger side effects. Think of sending a new user a welcome email or fanning out jobs when an order arrives. Often, these kinds of side effects originate with a database insert, update, or delete - but require additional code and logic to trigger, catch errors, and retry.

Sequin reliably sends Postgres rows and changes anywhere. It comes with some great features:

  • Never miss a message: Sequin persists messages until they are acknowledged (i.e. exactly once processing guarantees).
  • SQL-based routing: Filter and route messages using SQL where conditions
  • Replays: Rewind to any row on your table. Republish messages that match a SQL query.
  • Backfills: Queue up records from this moment forward or the entire table.
  • Observability and debugging: Sequin has a web console that allows you to observe every message.
  • Skip the PL/pgsql: Define business logic in the language of your choice and in your application.
  • Transforms: Transform message payloads with Lua functions.

Sequin connects to your Vercel Postgres (or any Postgres) via the Write Ahead Log (WAL). It captures changes to your Postgres tables, turning them into a stream of messages. Sequin buffers messages to ensure delivery and allow for replays and rewinds.

This architecture ensures every database change is captured transactionally, every message is delivered, and virtually no overhead is added to your database.

The project is just starting, and we’re actively improving the project. We’ve been surprised how much this resonates with Vercel projects - sowe wanted to share and join the community in case you need any support.

And please open a GitHub issue or send us a note. We’re looking forward to feedback to shape the roadmap.

6 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.