Skip to content

easy to use HTTP webhooks web interface in Phoenix LiveView

Notifications You must be signed in to change notification settings

aschiavon91/harpoon

Repository files navigation

Harpoon

A simplified version of a tool similar to webhook.site, built with Elixir and Phoenix LiveView.

This tool allows users to easily inspect HTTP requests in real-time.

just run it

docker run -p 4000:4000 aschiavon/harpoon

Table of Contents

Introduction

This is a simple tool built using Elixir and Phoenix LiveView, allowing users to create temporary endpoints to inspect and monitor HTTP requests. The tool is intended for testing, debugging, and monitoring webhooks, APIs, and other HTTP requests in real-time.

Features

  • Create temporary endpoints for testing and monitoring HTTP requests.
  • Inspect HTTP requests in real-time using Phoenix LiveView.
  • Store request data in a Sqlite database for easy analysis and setup.
  • Lightweight and easy to use.

Prerequisites

Docker Version

  • Docker
  • Docker Compose

Local Version

  • Elixir
  • Erlang
  • Sqlite

Installation

To install Elixir/Erlang we do recommend using asdf.

After installing asdf, you can run those following commands to install Elixir/Erlang:

# enable elixir/erlang plugins on asdf
asdf plugin add elixir
asdf plugin add erlang

# clone the repo
git clone https://github.com/aschiavon91/harpoon.git && cd harpoon

# install version from '.tool-versions' file
asdf install

Dev setup

mv .example.env.local .env.local

mix setup

or using just

just start_dev

or using just

just start_prod

Environment Variables

and the respective default value

PHX_HOST="0.0.0.0" # you may want to change this to your respective domain, if its running behind a reverse proxy
DATABASE_FILE="$HOME/.harpoon/harpoon_prod.sqlite"
SECRET_KEY_BASE="<autogenerated>"
PORT="4000"

Usage

Browser to http://localhost:4000/ and you should be redirected to http://localhost:4000/<session_id>.

Then, you can start making HTTP requests to http://<session_id>.localhost:4000/, and you should start seeing the requests in the dashboard.