Skip to content

d0zingcat/alert-message-center

Repository files navigation

Alert Message Center

README | 简体中文

Tech Stack Database

Alert Message Center is a modern, enterprise-grade alert routing and dispatching hub. It decouples complex alert sources (Prometheus, Grafana, custom scripts, etc.) from end recipients, ensuring precise alert delivery via Feishu (Lark) private messages and group chats.


📸 Preview

1. Topic Management & Personal Inbox

Supports alert distribution through the Topic subscription model, and also provides a Personal Inbox feature for quick self-notifications without creating a topic. Topics View

2. Group Chat Alert Dispatch

Supports adding the bot to Feishu group chats and binding topics to these groups for group-wide broadcasting. Group Binding Group Alert

3. Admin Dashboard (Live Stats)

Real-time tracking of system alert load, dispatch success rates, and topic popularity. Admin Dashboard


🔥 Key Features

  • 🚀 Zero-Config Personal Inbox: Every user has a unique Webhook Token. Send directly to the /dm interface to receive messages on Feishu with zero configuration.
  • 📢 Topic Subscription Model: Flexible "Publish-Subscribe" mechanism. Alerts sent to a Topic are automatically distributed to all subscribers.
  • 👥 Group Chat Distribution: Alerts can be simultaneously dispatched to bound Feishu group chats, supporting automatic discovery and unbinding.
  • 🛡️ Permissions & Auditing:
    • Topic creation requires admin approval.
    • Full Alert Task logs for end-to-end traceability.
  • 📊 Real-time Dashboard: Grafana-style monitoring interface for system health visualization.
  • 🔌 WebSocket Mode: Supports Feishu Open Platform WebSocket for intranet deployments without public IP or domain.
  • 📎 Attachment Support: Send files and images directly via dashboard or API.
  • 🏗️ Git Pre-commit Hooks: Automated linting and formatting using Husky and Biome to ensure code quality.
  • ⚡ High Performance: Built on Bun + Hono for millisecond-level dispatch latency.

🛠️ Tech Stack


🚀 Quick Start

1. Feishu App Configuration

  1. Login to the Feishu Open Platform and create an Enterprise Custom App.
  2. Enable Bot capability in "App Capabilities".
  3. Apply for im:message:send_as_bot permission in "Permission Management".
  4. Get your App ID and App Secret.

2. Deployment

# Install dependencies
bun install

# Configure environment variables (apps/server/.env)
DATABASE_URL="postgresql://user:pass@localhost:5432/db"
FEISHU_APP_ID="cli_xxx"
FEISHU_APP_SECRET="xxx"
ADMIN_EMAILS="user1@example.com,user2@example.com"

# Database migration
cd apps/server && bun run db:migrate:deploy

# Start development
bun run dev

3. Docker Deployment

cp apps/server/.env.example .env
docker-compose up -d

🏗️ CI/CD

Automatically builds and pushes Docker images to GitHub Container Registry (GHCR) on every push to main.

📜 Changelog

See CHANGELOG.md for version history.

📡 Webhook Usage

1. Send to Personal Inbox (DM)

  • URL: POST /api/webhook/:your_token/dm
  • Format: JSON or Multipart Form-Data

2. Send to Topic

  • URL: POST /api/webhook/:your_token/topic/:topic_slug

Examples (using curl)

Send Text (JSON):

curl -X POST -H "Content-Type: application/json" \
  -d '{"content":{"text":"Hello World"}}' \
  http://localhost:3000/api/webhook/YOUR_TOKEN/dm

Send File (Multipart):

curl -X POST \
  -F "content={\"text\":\"Check this file\"}" \
  -F "file=@/path/to/report.pdf" \
  http://localhost:3000/api/webhook/YOUR_TOKEN/dm

Send Image:

curl -X POST \
  -F "image=@/path/to/screenshot.png" \
  http://localhost:3000/api/webhook/YOUR_TOKEN/dm

📂 Project Structure

  • apps/server: Core API service
  • apps/web: Responsive management dashboard

Created with ❤️ by the Alert Message Center Team.

About

X-like alert message subscription management tool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages