velt-notifications-best-practices

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Velt Notifications Best Practices

Velt Notifications 最佳实践

Comprehensive implementation guide for Velt's notification system in React and Next.js applications. Contains 12 rules across 8 categories, prioritized by impact to guide automated code generation and integration patterns.
这是一份针对React和Next.js应用中Velt通知系统的全面实现指南。包含8个分类下的12条规则,按影响优先级排序,可指导自动化代码生成与集成模式。

When to Apply

适用场景

Reference these guidelines when:
  • Adding in-app notifications to a React/Next.js application
  • Setting up the VeltNotificationsTool and VeltNotificationsPanel
  • Configuring notification tabs (For You, All, Documents, People)
  • Accessing notification data via hooks or REST APIs
  • Managing user notification preferences and channels
  • Setting up email notifications with SendGrid
  • Creating custom notifications via REST API
  • Integrating with external services via webhooks
在以下场景中可参考本指南:
  • 为React/Next.js应用添加应用内通知
  • 设置VeltNotificationsTool和VeltNotificationsPanel
  • 配置通知标签页(为你推荐、全部、文档、人员)
  • 通过hooks或REST API访问通知数据
  • 管理用户通知偏好与渠道
  • 配置SendGrid邮件通知
  • 通过REST API创建自定义通知
  • 通过Webhook与外部服务集成

Rule Categories by Priority

按优先级划分的规则分类

PriorityCategoryImpactPrefix
1Core SetupCRITICAL
core-
2Panel ConfigurationHIGH
panel-
3Data AccessHIGH
data-
4Settings ManagementMEDIUM-HIGH
settings-
5Notification TriggersMEDIUM
triggers-
6Delivery ChannelsMEDIUM
delivery-
7UI CustomizationMEDIUM
ui-
8Debugging & TestingLOW-MEDIUM
debug-
优先级分类影响程度前缀
1核心设置关键
core-
2面板配置
panel-
3数据访问
data-
4设置管理中高
settings-
5通知触发器
triggers-
6交付渠道
delivery-
7UI定制
ui-
8调试与测试中低
debug-

Quick Reference

快速参考

1. Core Setup (CRITICAL)

1. 核心设置(关键)

  • core-setup
    — Enable notifications and add VeltNotificationsTool
  • core-setup
    — 启用通知并添加VeltNotificationsTool

2. Panel Configuration (HIGH)

2. 面板配置(高)

  • panel-tabs
    — Configure notification panel tabs (forYou, all, documents, people)
  • panel-display
    — Control panel open mode (popover vs sidebar)
  • panel-tabs
    — 配置通知面板标签页(forYou、all、documents、people)
  • panel-display
    — 控制面板打开模式(弹出框 vs 侧边栏)

3. Data Access (HIGH)

3. 数据访问(高)

  • data-hooks
    — Use React hooks to access notification data
  • data-rest-api
    — Use REST APIs for server-side notification management
  • data-hooks
    — 使用React hooks访问通知数据
  • data-rest-api
    — 使用REST API进行服务端通知管理

4. Settings Management (MEDIUM-HIGH)

4. 设置管理(中高)

  • settings-channels
    — Configure notification delivery channels
  • settings-channels
    — 配置通知交付渠道

5. Notification Triggers (MEDIUM)

5. 通知触发器(中)

  • triggers-custom
    — Create custom notifications via REST API
  • triggers-custom
    — 通过REST API创建自定义通知

6. Delivery Channels (MEDIUM)

6. 交付渠道(中)

  • delivery-email
    — Set up email notifications with SendGrid
  • delivery-webhooks
    — Integrate with external services via webhooks
  • delivery-email
    — 设置SendGrid邮件通知
  • delivery-webhooks
    — 通过Webhook与外部服务集成

7. UI Customization (MEDIUM)

7. UI定制(中)

  • ui-wireframes
    — Customize notification components with wireframes
  • ui-wireframes
    — 使用线框图定制通知组件

8. Debugging & Testing (LOW-MEDIUM)

8. 调试与测试(中低)

  • debug-common-issues
    — Common issues and solutions
  • debug-common-issues
    — 常见问题与解决方案

How to Use

使用方法

Read individual rule files for detailed explanations and code examples:
rules/shared/core/core-setup.md
rules/shared/panel/panel-tabs.md
Each rule file contains:
  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Source pointers to official documentation
阅读单个规则文件获取详细说明与代码示例:
rules/shared/core/core-setup.md
rules/shared/panel/panel-tabs.md
每个规则文件包含:
  • 规则重要性的简要说明
  • 错误代码示例及解释
  • 正确代码示例及解释
  • 官方文档的参考链接

Compiled Documents

编译文档

  • AGENTS.md
    — Compressed index of all rules with file paths (start here)
  • AGENTS.full.md
    — Full verbose guide with all rules expanded inline
  • AGENTS.md
    — 包含所有规则及文件路径的压缩索引(从这里开始)
  • AGENTS.full.md
    — 包含所有规则详细内容的完整指南