Skip to content

srayan/pagingWrick

Repository files navigation

pagingWrick

Event-driven notification service that processes events from Azure Service Bus Queue and sends Discord notifications for high-severity alerts.

Overview

pagingWrick is a serverless Azure Functions application that:

  • Receives events from multiple applications via Azure Service Bus Queue
  • Filters events by severity (high/low)
  • Sends Discord notifications for high-severity events
  • Uses Azure Managed Identity (no secrets in code!)

Architecture

[Your Apps]
    ↓
[Azure Service Bus Queue]
    ↓
[Azure Function (with Managed Identity)]
    ↓
[Azure Key Vault] → Discord Webhook URL
    ↓
[Discord Channel] → iPhone Notification

Event Schema

Events sent to the queue must follow this schema:

{
  "source": "stockeroo",           // Your app name
  "severity": "high",               // "high" or "low"
  "message": "Stock price alert!",  // Human-readable message
  "timestamp": "2026-01-23T10:30:00Z", // ISO 8601 timestamp
  "metadata": {                     // Optional: any additional data
    "stockSymbol": "AAPL",
    "price": 150.25
  }
}

Features

  • No Secrets in Code - Uses Azure Managed Identity
  • Flexible Schema - Metadata field allows app-specific data
  • Rich Discord Notifications - Colored embeds with formatted data
  • Automatic Retries - Service Bus handles retries and dead-lettering
  • Scalable - Azure Functions auto-scales with load
  • Free Tier Friendly - Uses consumption plan

Quick Start

Prerequisites

  • Azure subscription
  • Discord account
  • Node.js 20+ (for local development)
  • Azure Functions Core Tools (optional, for local testing)

Setup

See DEPLOYMENT.md for detailed deployment instructions.

Send Events from Your Apps

See examples/ for code samples in different languages.

Project Structure

pagingWrick/
├── src/
│   ├── types.ts              # Event schema and validation
│   ├── discord.ts            # Discord webhook sender
│   └── functions/
│       └── processEvent.ts   # Main Azure Function
├── deploy/
│   ├── main.bicep           # Infrastructure as Code
│   └── main.parameters.json # Deployment parameters
├── examples/                # Client code examples
└── docs/                   # Additional documentation

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Watch mode
npm run watch

# Run locally (requires Azure Functions Core Tools)
npm start

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published