Skip to content

Add webhook delivery system template #37

Description

@PAMulligan

Description

Add a webhook delivery system template that enables generated APIs to send event notifications to external systems via HTTP callbacks.

Why

Webhooks are the standard pattern for API event notifications (e.g., Stripe, GitHub, Twilio all use webhooks). A template with retry logic, signature verification, and delivery tracking gives Nerva-generated APIs enterprise-grade event capabilities.

Acceptance Criteria

  • Create a webhook delivery service template with:
    • Webhook registration endpoint (subscribe URL, events, secret)
    • Event dispatching with HMAC-SHA256 signature headers
    • Exponential backoff retry logic (3 attempts)
    • Delivery status tracking (pending, delivered, failed)
    • Webhook payload Zod schemas
  • Create a Drizzle schema for webhook subscriptions and delivery logs
  • Add middleware for verifying incoming webhooks (for APIs that receive webhooks)
  • Include example webhook events (`user.created`, `order.completed`)
  • Add integration tests for webhook delivery and verification
  • Document the webhook system in generated API docs
  • CI passes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions