Skip to content

Commit

Permalink
wip: 🔕 temporary commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam committed Nov 1, 2024
1 parent b1a1438 commit e6d3787
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 1 deletion.
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,91 @@
<p align="center">
<a href="https://github.com/tarampampam/webhook-tester#readme">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://socialify.git.ci/tarampampam/webhook-tester/image?description=1&font=Raleway&forks=1&issues=1&logo=https%3A%2F%2Fhsto.org%2Fwebt%2Frm%2F9y%2Fww%2Frm9ywwx3gjv9agwkcmllhsuyo7k.png&owner=1&pulls=1&pattern=Solid&stargazers=1&theme=Dark">
<img align="center" src="https://socialify.git.ci/tarampampam/webhook-tester/image?description=1&font=Raleway&forks=1&issues=1&logo=https%3A%2F%2Fhsto.org%2Fwebt%2Frm%2F9y%2Fww%2Frm9ywwx3gjv9agwkcmllhsuyo7k.png&owner=1&pulls=1&pattern=Solid&stargazers=1&theme=Light">
</picture>
</a>
</p>

# WebHook Tester

This application allows you to test and debug webhooks and HTTP requests using unique, randomly generated URLs. You
can customize the response code, `Content-Type` HTTP header, response content, and even set a delay for responses.
The concept is inspired by [this project](https://github.com/fredsted/webhook.site).

<p align="center">
<img src="https://github.com/user-attachments/assets/26e56d78-8a10-4883-9052-d18047206fda" alt="screencast" />
</p>

Built with Go for high performance, this application includes a lightweight UI (written in `ReactJS`) that’s compiled
into the binary, so no additional assets are required. WebSocket support provides real-time webhook notifications in
the UI—no need for third-party solutions like `pusher.com`!

### 🔥 Features list

- Standalone operation with in-memory storage/pubsub - no third-party dependencies needed
- Fully customizable response code, headers, and body for webhooks
- Fast, built-in UI based on `ReactJS`
- Multi-architecture Docker image based on `scratch`
- Runs as an unprivileged user in Docker
- Well-tested, documented source code
- CLI health check sub-command included
- Binary view of recorded requests in UI
- Supports JSON and human-readable logging formats
- Liveness probes (`/healthz` endpoint)
- Customizable webhook responses
- Built-in WebSocket support
- Efficient in memory and CPU usage
- Free, open-source, and scalable

### 🗃 Storage

The app supports two storage options: **memory** and **Redis** (configured with the `--storage-driver` flag).

- **Memory** driver: Ideal for local debugging when persistent storage isn’t needed, as recorded requests are cleared
upon app shutdown
- **Redis** driver: Retains data across app restarts, suitable for environments where data persistence is required.
Redis is also necessary when running multiple instances behind a load balancer

### 📢 Pub/Sub

For WebSocket notifications, two drivers are supported for the pub/sub system: **memory** and **Redis** (configured
with the `--pubsub-driver` flag).

When running multiple instances of the app, the Redis driver is required.

## 🧩 Installation

Download the latest binary for your architecture from the [releases page][link_releases]. For example, to install
on an **amd64** system (e.g., Debian, Ubuntu):

[link_releases]:https://github.com/tarampampam/webhook-tester/releases

```shell
$ curl -SsL -o ./webhook-tester https://github.com/tarampampam/webhook-tester/releases/latest/download/webhook-tester-linux-amd64
$ chmod +x ./webhook-tester
$ ./webhook-tester start
```

Alternatively, you can use the Docker image:

| Registry | Image |
|----------------------------------------|--------------------------------------|
| [GitHub Container Registry][link_ghcr] | `ghcr.io/tarampampam/webhook-tester` |
| [Docker Hub][link_docker_hub] (mirror) | `tarampampam/webhook-tester` |

> [!NOTE]
> It’s recommended to avoid using the `latest` tag, as **major** upgrades may include breaking changes.
> Instead, use specific tags in `X.Y.Z` format for version consistency.
## âš™ Usage

> [!NOTE]
> TODO: Add usage examples
[link_ghcr]:https://github.com/users/tarampampam/packages/container/package/webhook-tester
[link_docker_hub]:https://hub.docker.com/r/tarampampam/webhook-tester/

<!--GENERATED:CLI_DOCS-->
<!-- Documentation inside this block generated by github.com/urfave/cli; DO NOT EDIT -->
## CLI interface
Expand Down Expand Up @@ -63,3 +151,9 @@ The following flags are supported:
| `--http-port="…"` | HTTP server port | `8080` | `HTTP_PORT` |

<!--/GENERATED:CLI_DOCS-->

## License

This is open-sourced software licensed under the [MIT License][link_license].

[link_license]:https://github.com/tarampampam/webhook-tester/blob/master/LICENSE
10 changes: 9 additions & 1 deletion web/public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"name": "WebHook Tester",
"short_name": "WebHook Tester",
"description": "Allows you to easily test webhooks and other types of HTTP requests",
"id": "app",
"start_url": "/",
"scope": "/",
"lang": "en",
"icons": [
{
"src": "/favicon-48x48.png",
"sizes": "48x48",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
Expand All @@ -16,7 +23,8 @@
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
"purpose": "maskable",
"purpose": "any"
}
],
"orientation": "natural",
Expand Down
Binary file not shown.

0 comments on commit e6d3787

Please sign in to comment.