relayENGINEERING PROJECT

GO + POSTGRESQL · OPEN SOURCE

Every event
deserves a
delivery record.

From an accepted event to a signed webhook. Relay makes delivery durable, retries bounded, and uncertainty explicit.

Built by Luan Bonifacio. A backend engineering project, developed one verified milestone at a time.

RELAY / DELIVERY RECORDILLUSTRATION
order.created evt_example
  1. 01
    Authenticated & accepted

    Client token verified. Destination ownership checked.

  2. 02
    Committed to PostgreSQL

    Event + delivery saved atomically. Then HTTP 201.

  3. 03
    Claimed by a worker

    Durable lease. No transaction held during HTTP.

  4. 04
    Signed & delivered

    HMAC-SHA256 · HTTPS · receiver returned 204

DELIVERY OUTCOMEsucceeded

Example flow, not live traffic or performance data.

3 attempts

Total delivery budget per event

5 seconds

Outbound HTTP deadline

At least once

Receiver deduplication required

Explicit boundaries.
No exactly-once promise.

01 / FOLLOW THE EVENT

A small system.
A deliberate delivery path.

One Go repository, separate API and worker processes, and PostgreSQL as the durable queue. No message broker required.

01 / RECEIVEAPI

Authenticate · validate · commit

02 / PERSISTPostgreSQL

Events · leases · attempts

03 / DELIVERWorker

Claim · sign · send · record

04 / VERIFYYour receiver

Verify signature · deduplicate

Delivery has more than one ending.

Explore illustrative outcomes. A timeout or worker crash cannot prove that the receiver did nothing.

pending → attempting → succeeded

The receiver returns 204. Relay records success. The response confirms acceptance by the receiver, not completion of its business workflow.

02 / ENGINEERING DECISIONS

The hard parts
are in the boundaries.

Designed around failures that happen between systems, with tests for the behavior that matters.

01

Commit before acknowledgment

Authenticated ingestion persists the event and its delivery in one transaction. Idempotency is client-scoped: matching request bytes reuse the event; conflicting submissions are rejected.

02

Outbound requests have limits

Public-address validation, DNS-pinned HTTPS, no redirects, and bounded request time and response size constrain the sender before it reaches a receiver.

03

Secrets have a lifecycle

HMAC-SHA256 signs the timestamp, stable event ID, and exact payload bytes. Destination secrets are encrypted with AES-GCM and move through explicit lifecycle states.

04

Crashes leave evidence

Durable leases and fenced completion coordinate workers. Interrupted attempts remain unknown in history. Retries consume a persisted budget, with jittered delays.

Read the architecture →

03 / PROJECT STATUS

Built in public.
Scoped with care.

This is an engineering portfolio, not a hosted webhook product. This domain serves the project page; the Relay API is not publicly exposed.

IMPLEMENTED

A durable delivery core

Authenticated destinations and ingestion, idempotency, encrypted signing keys, signed HTTPS attempts, bounded retries, and a continuous worker.

PLANNED

Visibility and controlled recovery

Owner-scoped delivery history, controlled replay of failed deliveries, operational metrics, and deployment hardening before public API access.

Inspect the implementation and tests ↗

READ IT. RUN IT. TRACE IT.

Good delivery starts
with understandable code.

Open the repository