By the Un team, building UnInbox
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
UnWebhook
is built with the following epic technologies & tools:
- Nuxt JS Vue based FrontEnd & Backend + modules
- Tailwind CSS Engine
- tRPC Typesafe APIs
- DrizzleORM ORM + MySQL
To get a local copy up and running, follow these simple steps.
Here is what you need to be able to run UnInbox locally.
- A Supabase database
- Node.js (Version: >=20.x)
- NVM (Node Version Manager) (see https://github.com/nvm-sh/nvm)
- pnpm (see https://pnpm.io/installation)
-
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. -
Go to the project folder
cd UnWebhook
-
Check and install the correct node/pnpm versions
nvm install
-
Install packages with pnpm
pnpm i
-
Set up your
.env
file-
Duplicate
.env.example
to.env
. This file is already pre-configured for use with the local docker containersmac
cp .env.example .env
windows
copy .env.example .env
-
-
Set your env variables
-
Sync the schema with the database:
pnpm run db:push
-
Start the app and all services
pnpm run dev
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:
- Click
Database
in the sidebar >Extensions
> search for and enablepg_cron
- 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' $$
);