Skip to content

Railway.app template for handling Front Application Webhook payloads

License

Notifications You must be signed in to change notification settings

dugjason/front-application-webhook-railway-tpl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Front Application Webhook Template

A Front Application Webhook processing application template optimized for deployment on Railway.app.

This template provides a robust foundation for handling events received from an Application Webhook with payload validation, integrity checking and built-in queue processing to allow you to process events asynchronously at scale.

Features

  • 🔒 Built-in webhook signature validation
  • 📝 Schema-based payload validation
  • 🔄 Queue-based webhook processing by BullMQ
  • 🚦 Challenge-response handling
  • 🚀 Ready to deploy on Railway.app

Quick Start

Deploy on Railway

  1. Click the "Deploy on Railway" button to deploy the template to Railway.

  2. Once deployed, Railway will automatically set up your environment.

  3. Ensure you set your FRONT_APP_SECRET environment variable in Railway.

For local development:

Copy the .env.example file to .env and set your FRONT_APP_SECRET environment variable, and your Redis credentials.

# Install dependencies
npm install

# Start the development server
npm run dev

# The server will start at http://localhost:3000

Environment Variables

On deploying this template, Railway will automatically set the Redis environment variables for you. You will need to set the FRONT_APP_SECRET environment variable in Railway.

API Endpoints

  • POST /ingest: Main Application Webhook endpoint

Development

To modify this template for your use case, the first step is to update the queue processing logic in src/queue/worker.ts. This is where you'll add your logic for processing how you want to handle the received events.

Contributing

Contributions are welcome and encouraged! Please feel free to submit a Pull Request.

License

MIT License

About

Railway.app template for handling Front Application Webhook payloads

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published