Nestjs notification

From HoangNguyen0403/agent-skills-standard · View interactive version

Nestjs notification is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Build dual-write notification services with database persistence and FCM push delivery in NestJS. Use when creating notification entities, sending push via FCM, or implementing in-app notification feeds.

How to use this skill

Skill file

NestJS Notification Architecture

**Priority: P0 (CRITICAL)**

Implement "Dual-Write" notification system: persist to Database (In-App) and send via FCM (Push).

Workflow: Send Notification

  1. Save to database — Persist notification entity with type enum and metadata.
  2. Check FCM token — Verify recipient valid fcmToken; skip push if missing.
  3. Send push — Call FCM inside try/catch; never let FCM failure block request.
  4. Serialize data — Convert Dates to ISO strings; keep FCM data payload flat (IDs only).

Dual-Write Service Example

See implementation examples

Structure

See implementation examples

Implementation Guidelines

Anti-Patterns

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.