ElTimuro / webhook-proxy

A simple tool for working with webhooks. Supports forwarding messages to one or multiple destinations, and replaying messages

Home Page:https://UnWebhook.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Github Stars

Commits-per-month

UnWebhook Logo

UnWebhook

A simple tool for working with webhooks

To our Website & App »

By the Un team, building UnInbox

UnInbox Twitter - UnInbox Discord Server


Screenshot of UnWebhook

About

A simple tool for working with webhooks. Great for teams and staging environments.

Watch the introduction video on youtube

Capabilities

  • add multiple endpoints
  • save received messages (for 7 days)
  • automatically forward incoming messages to one or more destinations
  • choose forwarding strategy (send to: first in list, all in list)
  • support fallback forwarding (if first is down, forward to next)
  • replay webhook delivery (resend the data to destinations)

Want to send messages to your local machine and need a tunnel? Check out untun by the UnJs team


Tech Stack

UnWebhook is built with the following epic technologies & tools:

Running Locally

To get a local copy up and running, follow these simple steps.

Prerequisites

Here is what you need to be able to run UnInbox locally.

Setup

  1. Clone the repo into a public GitHub repository (or fork https://github.com/un/webhook-proxy/fork). If you plan to distribute the code, keep the source code public to comply with AGPLv3. To clone in a private repository, contact us to acquire a commercial license

    git clone https://github.com/un/webhook-proxy.git UnWebhook

    If you are on Windows, run the following command on gitbash with admin privileges:
    > git clone -c core.symlinks=true https://github.com/un/webhook-proxy.git
    See docs for more details.

  2. Go to the project folder

    cd UnWebhook
  3. Check and install the correct node/pnpm versions

    nvm install
  4. Install packages with pnpm

    pnpm i
  5. Set up your .env file

    • Duplicate .env.example to .env. This file is already pre-configured for use with the local docker containers

      mac

       cp .env.example .env

      windows

       copy .env.example .env
  6. Set your env variables

  7. Sync the schema with the database:

    pnpm run db:push
  8. Start the app and all services

    pnpm run dev

Self Hosting

Self hosting is encouraged, deploy to Vercel with Supabase as the DB

If you deploy to Supabase, enable the pg_cron extension to automatically delete messages after 7 days:

  1. Click Database in the sidebar > Extensions > search for and enable pg_cron
  2. Go to SQL editor, paste and run the following sql statements
select cron.schedule (
    'cleanup-messages',
    '30 3 * * 6',
    $$ delete from messages where created_at < now() - interval '1 week' $$
);
select cron.schedule (
    'cleanup-deliveries',
    '30 3 * * 6',
    $$ delete from message_deliveries where created_at < now() - interval '1 week' $$
);

About

A simple tool for working with webhooks. Supports forwarding messages to one or multiple destinations, and replaying messages

https://UnWebhook.com

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 58.0%Language:Vue 37.3%Language:CSS 4.7%