Platform Notification System (Design Spec)

Consolidate Toast, Messages, and Polling notifications into a centralized database with WebSocket push and REST APIs.

4|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/aaaa47080/stock_agent --skill platform-notification-system-design-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Platform Notification System (Design Spec)
Source: https://github.com/aaaa47080/stock_agent/tree/main/.agent/skills/platform-notification-system
Command: npx skills add https://github.com/aaaa47080/stock_agent --skill platform-notification-system-design-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Currently, the platform handles notifications through fragmented mechanisms (Toast, direct WebSocket messages, and polling) with no centralized, searchable history, leading to missed alerts and a disjoint user experience.

Core Features & Use Cases

  • Centralized notifications table that stores all events with metadata and timestamps.
  • WebSocket-based real-time delivery and a unified backend channel.
  • REST API endpoints for querying, marking as read, and counting unread notifications.
  • Event-driven triggers to generate notifications from actions (e.g., friend requests, tips, system alerts).
  • Unified UI components like a Bell icon and Notification Center for offline/history support.

Quick Start

Set up the new notifications service, wire existing events to push updates via WebSocket, and expose REST endpoints for fetching and marking reads.

Frequently Asked Questions about Platform Notification System (Design Spec)

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I consolidate real-time notifications and polling into a centralized database?

To consolidate real-time notifications, route fragmented events like Toast, polling, and direct messages into a centralized notifications table. This unified schema stores all events with metadata and timestamps to ensure no alerts are missed.

What is the best way to implement WebSocket push notifications for a unified backend channel?

WebSocket push notifications are implemented via a unified backend channel that delivers real-time updates directly to a centralized notification service. This replaces fragmented polling with immediate event-driven message delivery.

How do I build REST APIs for querying and marking unread notifications as read?

Build REST API endpoints that interface directly with the centralized notifications database to query historical alerts, count unread messages, and update their status to read. This ensures consistent offline support and history access.

Can I use event-driven triggers to generate system alerts and friend request notifications?

Yes, event-driven triggers automatically generate notifications for platform actions like friend requests, tips, and system alerts. These events push updates through the WebSocket channel to maintain real-time UI synchronization.

Does a centralized notification system support offline historical access across UI components?

A centralized notification system supports offline historical access through unified UI components like a Notification Center and Bell icon. It fetches past alerts via REST APIs even when real-time WebSocket connectivity is interrupted.