A local-first webhook testing platform. Get a unique URL that accepts any HTTP request, then explore headers, query params, body, and metadata in a clean, readable UI. No third-party SaaS required.
Features Β· Quick Start Β· Docs Β· Configuration Β· Open Source vs Cloud Β· Contributing
Debugging webhooks usually means pasting a random URL into a hosted tool, hoping it stays up, and sending your event data to someone else's servers. Hooklex runs on your machine. You own the data, you control retention, and you get a proper developer experience: a code-grade editor, powerful search, replay tracking, and one-click exports.
flowchart LR
A["π Webhook sender<br/>(Stripe, Shopify, your app...)"] -->|"any HTTP request"| B["βοΈ Hooklex Server<br/>:5000"]
B -->|"stores"| C[("π PostgreSQL")]
D["π₯οΈ Hooklex Client<br/>:3000"] -->|"inspect and export"| B
E["π©βπ» You"] --> D
Every collection gets its own URL that accepts any incoming HTTP request. No setup, no guessing. |
|
The Monaco editor (the engine behind VS Code) gives you collapsible nodes, search, and syntax highlighting for JSON and XML. Preview images, videos, and PDFs inline, and copy binary bodies as Base64. |
Group endpoints per project or client, like Postman or Insomnia, but built for receiving requests. |
Search by collection name, body content, IP address, headers, and query parameters. Filter by |
Re-send a request with |
Export any request as CSV, Markdown, or PDF for spreadsheets, docs, and reports. |
Turn any JSON or XML body into a typed interface instantly. |
Background jobs remove expired and deleted data on a schedule you control, so your database never gets stuck. |
Two images and a PostgreSQL database. Prisma migrations run automatically on startup. |
| π’ Open Source (Free, runs locally) | π Cloud (Coming soon) | |
|---|---|---|
| Full server and client code | β | β |
| All HTTP methods | β | β |
| Monaco editor and rich preview (JSON, XML, images, PDFs, Base64) | β | β |
Local collections and global search (isReplay support) |
β | β |
| Export to CSV, Markdown, and PDF | β | β |
| TypeScript type generation | β | β |
| Custom Actions: live forwarding to local or staging servers | β | β |
| Routing conditions and dynamic custom responses | β | β |
| Cloud persistence and backup (30 to 90 days of history, no need to keep your machine on) | β | β |
| Public request sharing (shareable link for any request) | β | β |
1. Create a docker-compose.yml:
services:
db:
image: postgres:16-alpine
container_name: hooklex-db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-hooklex}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-hooklex_password}
POSTGRES_DB: ${POSTGRES_DB:-hooklex}
volumes:
- hooklex_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-hooklex} -d ${POSTGRES_DB:-hooklex}"]
interval: 5s
timeout: 5s
retries: 10
server:
image: muhammadhassan34/hooklex-server:latest
container_name: hooklex-server
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
SERVER_PORT: ${SERVER_PORT:-5000}
CLIENT_PORT: ${CLIENT_PORT:-3000}
DATABASE_URL: postgresql://${POSTGRES_USER:-hooklex}:${POSTGRES_PASSWORD:-hooklex_password}@db:5432/${POSTGRES_DB:-hooklex}
ports:
- "${SERVER_PORT:-5000}:${SERVER_PORT:-5000}"
# Arguments are optional. Remove this `command` block to use the defaults.
command:
- "dist/start-all.js" # mandatory script entry point
- "--read-limit"
- "${READ_LIMIT:-100}"
- "--write-limit"
- "${WRITE_LIMIT:-100}"
- "--expire-after"
- "${EXPIRE_AFTER:-1}"
- "--cron-schedule"
- "${CRON_SCHEDULE:-*/1 * * * *}"
client:
image: muhammadhassan34/hooklex-client:latest
container_name: hooklex-client
restart: unless-stopped
depends_on:
- server
environment:
CLIENT_PORT: ${CLIENT_PORT:-3000}
SERVER_PORT: ${SERVER_PORT:-5000}
ports:
- "${CLIENT_PORT:-3000}:${CLIENT_PORT:-3000}"
volumes:
hooklex_pgdata:2. Start everything:
docker compose up -d3. Open http://localhost:3000 and create your first collection. π
Note
The browser talks to the server directly at http://localhost:5000, so both ports must be published to your host. To use custom ports, set CLIENT_PORT and SERVER_PORT in a .env file next to your compose file.
Warning
Change the default database password (POSTGRES_PASSWORD) before running anywhere other than your own machine.
Hooklex ships with its own documentation, and there are two ways to read it:
| Option | How |
|---|---|
| π In the app (recommended) | Run the client and server, then open http://localhost:3000/docs for a beautifully rendered documentation site covering features, isReplay, exports, and more. |
| π» In the code | Browse the .mdx documentation files in the repository, for example the Features Overview. They are plain text, so you can read them straight from GitHub or your editor. |
Tip
If you changed CLIENT_PORT, use your own port: http://localhost:<CLIENT_PORT>/docs.
Prerequisites
Steps
# 1. Clone the repository
git clone https://github.com/core-engine-labs/hooklex.git
cd hooklex
# 2. Install dependencies
pnpm install
# 3. Start a local PostgreSQL database
docker run -d --name hooklex-dev-db \
-e POSTGRES_USER=hooklex \
-e POSTGRES_PASSWORD=hooklex_password \
-e POSTGRES_DB=hooklex \
-p 5432:5432 \
postgres:16-alpine
# 4. Configure environment variables
export DATABASE_URL="postgresql://hooklex:hooklex_password@localhost:5432/hooklex"
# 5. Run in development mode (migrations are applied on startup)
pnpm devImportant
CLIENT_PORT and SERVER_PORT must be identical on the client and server images.
| Variable | Description | Default Value | Required |
|---|---|---|---|
CLIENT_PORT |
Port the client listens on. | 3000 |
No |
SERVER_PORT |
Port of the Hooklex server the client connects to. | 5000 |
No |
| Variable | Description | Default Value | Required |
|---|---|---|---|
SERVER_PORT |
Port the server listens on. | 5000 |
No |
CLIENT_PORT |
Port of the Hooklex client (used for CORS / allowed origin). | 3000 |
No |
DATABASE_URL |
PostgreSQL connection string, e.g. postgresql://user:pass@host:5432/hooklex. |
none | Yes |
| Argument | Description | Default Value | Required |
|---|---|---|---|
--read-limit |
Maximum read requests per minute, per IP. | 100 |
No |
--write-limit |
Maximum write requests per minute, per IP. | 100 |
No |
--expire-after |
Days to keep request data before it expires. | 1 |
No |
--cron-schedule |
Cron schedule for the cleanup jobs (deleted collections, expired requests, deleted requests). | */1 * * * * (every minute) |
No |
Pass arguments through the command in Docker Compose (see Quick Start), or run a one-off:
docker compose run --rm <SERVICE_NAME> node dist/start-all.js --read-limit 500 --write-limit 500| Service | Default Port | Volume |
|---|---|---|
| Client | 3000 (set by CLIENT_PORT) |
None. Stateless. |
| Server | 5000 (set by SERVER_PORT) |
None. All data lives in PostgreSQL. |
| PostgreSQL | 5432 (internal) |
Named volume, e.g. hooklex_pgdata, to persist data. |
Re-testing a webhook in a busy history is hard. isReplay makes re-runs obvious. Add both query parameters to your webhook URL:
?isReplay=true&replayedFrom=msg_wrong
| Parameter | What you get in the UI |
|---|---|
isReplay=true |
An orange REPLAY badge in the sidebar list. |
replayedFrom=<label> |
Your label in the request header banner, searchable from global search. |
Tip
Send both parameters or neither. A request with only one is rejected with 400 Bad Request.
Contributions are welcome and appreciated.
- π Open an issue first for bugs or feature ideas, with steps to reproduce or a clear description.
- π΄ Fork the repository and create a branch from
main(for examplefeat/my-changeorfix/my-bug). - π§ Make your changes. Keep them focused, and make sure the project builds and runs locally.
- π Open a Pull Request that explains what changed and why, and links the related issue.
By contributing, you agree that your contributions are licensed under the AGPL-3.0.
Hooklex is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
If Hooklex saves you time, consider giving it a β on GitHub.
Made with π by Core Engine Labs