Skip to content
core-engine-labsPublic

About

Open-source, self-hosted webhook tester and inspector. Capture any HTTP request, inspect headers and payloads in a Monaco editor, replay requests, and export to CSV, Markdown or PDF. Docker ready.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hooklex logo

Hooklex

Catch every webhook. Inspect everything. Debug without guessing.

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.


License: AGPL v3 Docker Pulls GitHub Stars TypeScript

Server Image Size Client Image Size


Features Β· Quick Start Β· Docs Β· Configuration Β· Open Source vs Cloud Β· Contributing


Interface Preview


πŸ’‘ Why Hooklex?

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
Loading

✨ Key Features

πŸ”— Unique Endpoint URLs

Every collection gets its own URL that accepts any incoming HTTP request. No setup, no guessing.

🧰 Wide Method Support

GET POST PUT PATCH DELETE HEAD OPTIONS TRACE plus PURGE and PROPFIND. Anything else gets a clean 405 with an Allow header.

🎨 Beautiful Content Preview

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.

πŸ“ Organized Collections

Group endpoints per project or client, like Postman or Insomnia, but built for receiving requests.

πŸ” Global Search

Search by collection name, body content, IP address, headers, and query parameters. Filter by isReplay and by public or private visibility.

πŸ” isReplay Tracking

Re-send a request with ?isReplay=true&replayedFrom=<label> and get a REPLAY badge plus an origin label right in the UI.

πŸ“€ Export Anywhere

Export any request as CSV, Markdown, or PDF for spreadsheets, docs, and reports.

🧬 TypeScript Type Generation

Turn any JSON or XML body into a typed interface instantly.

🧹 Automatic Cleanup

Background jobs remove expired and deleted data on a schedule you control, so your database never gets stuck.

🐳 Simple Docker Deployment

Two images and a PostgreSQL database. Prisma migrations run automatically on startup.


🧩 Open Source vs Cloud

🟒 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) βž– βœ…

πŸš€ Quick Start (Docker Compose)

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 -d

3. 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.


πŸ“š Documentation

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.


πŸ› οΈ Local Development

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 dev

βš™οΈ Configuration / Environment Variables

Important

CLIENT_PORT and SERVER_PORT must be identical on the client and server images.

πŸ–₯️ Client image

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

βš™οΈ Server image

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

πŸŽ›οΈ Server arguments (all optional)

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

πŸ“¦ Ports and volumes

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.

πŸ” The isReplay System

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.


🀝 Contributing

Contributions are welcome and appreciated.

  1. πŸ› Open an issue first for bugs or feature ideas, with steps to reproduce or a clear description.
  2. 🍴 Fork the repository and create a branch from main (for example feat/my-change or fix/my-bug).
  3. πŸ”§ Make your changes. Keep them focused, and make sure the project builds and runs locally.
  4. πŸš€ 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.


πŸ“œ License

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

About

Open-source, self-hosted webhook tester and inspector. Capture any HTTP request, inspect headers and payloads in a Monaco editor, replay requests, and export to CSV, Markdown or PDF. Docker ready.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages