velt-notifications-best-practices
Velt Notifications Best Practices
Comprehensive implementation guide for Velt's notification system in React and Next.js applications. Contains 15 rules across 8 categories, prioritized by impact to guide automated code generation and integration patterns.
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
- Reading or writing per-user notification config via REST API (document-level or org-level)
- Setting up email notifications with SendGrid
- Creating custom notifications via REST API
- Integrating with external services via webhooks
- Configuring notification delay and batching to reduce noise
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Core Setup | CRITICAL | core- |
| 2 | Panel Configuration | HIGH | panel- |
| 3 | Data Access | HIGH | data- |
| 4 | Settings Management | MEDIUM-HIGH | settings- |
| 5 | Notification Triggers | MEDIUM | triggers- |
| 6 | Delivery Channels | MEDIUM | delivery- |
| 7 | UI Customization | MEDIUM | ui- |
| 8 | Debugging & Testing | LOW-MEDIUM | debug- |
Quick Reference
1. Core Setup (CRITICAL)
core-setup— Enable notifications and add VeltNotificationsTool
2. Panel Configuration (HIGH)
panel-tabs— Configure notification panel tabs (forYou, all, documents, people)panel-display— Control panel open mode (popover vs sidebar)
3. Data Access (HIGH)
data-hooks— Use React hooks to access notification datadata-rest-api— Use REST APIs for server-side notification managementdata-notification-data-provider— Register NotificationDataProvider to route custom notification fetch and delete through your own backend; applies only to notificationSource === 'custom' notifications; pipeline order is notification → user → comment
4. Settings Management (MEDIUM-HIGH)
settings-channels— Configure notification delivery channelssettings-config-rest-api— Read and write per-user notification config at document or org level via REST API
5. Notification Triggers (MEDIUM)
triggers-custom— Create custom notifications via REST API
6. Delivery Channels (MEDIUM)
delivery-email— Set up email notifications with SendGriddelivery-webhooks— Integrate with external services via webhooksdelivery-delay-batching— Configure opt-in server-side delay and batching pipeline
7. UI Customization (MEDIUM)
ui-wireframes— Customize notification components with wireframes
8. Debugging & Testing (LOW-MEDIUM)
debug-common-issues— Common issues and solutions
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
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
More from velt-js/agent-skills
velt-crdt-best-practices
Velt CRDT (Yjs) collaborative editing best practices for real-time applications. This skill should be used when implementing collaborative features using Velt CRDT stores, integrating with editors like Tiptap, BlockNote, CodeMirror, or ReactFlow, or debugging sync issues. Triggers on tasks involving real-time collaboration, multiplayer editing, CRDT stores, or Velt SDK integration.
28velt-comments-best-practices
Velt Comments implementation patterns and best practices for React, Next.js, and web applications. Use when adding collaborative commenting features, comment modes (Freestyle, Popover, Stream, Text, Page), rich text editor comments (TipTap, SlateJS, Lexical), media player comments, or chart comments.
27velt-setup-best-practices
Velt collaboration SDK setup guide for React, Next.js, Angular, Vue, and HTML applications. Use this skill when setting up Velt for the first time, configuring VeltProvider, implementing user authentication with authProvider and JWT tokens, initializing document collaboration with setDocuments, or debugging Velt setup issues. Triggers on any task involving Velt installation, VeltProvider configuration, auth token generation, document identity setup, or project structure for Velt integration — even if the user doesn't explicitly mention "setup".
26velt-activity-best-practices
Velt Activity Logs implementation patterns and best practices for React, Next.js, and web applications. Use when adding real-time activity feeds, custom activity logging, audit trails, CRDT debounce configuration, or server-side activity management via REST API.
7velt-rest-apis-best-practices
Velt REST API v2 and webhook best practices for server-side integration. Use when calling Velt REST API v2 endpoints, generating JWT tokens for frontend authentication, handling Velt webhooks (comment events, huddle events, CRDT updates), managing users/documents/organizations via REST, or implementing server-side Velt operations. Triggers on any task involving Velt REST API, JWT token generation for Velt, Velt webhooks, x-velt-api-key headers, or server-side comment/notification/activity management — even if the user doesn't explicitly say 'REST API'. For the Python SDK (velt-py) for self-hosting, see velt-self-hosting-data-best-practices instead.
5velt-single-editor-mode-best-practices
Velt Single Editor Mode implementation patterns and best practices for React, Next.js, and web applications. Use when implementing exclusive editing access, editor/viewer role management, access request handoff flows, element-level sync control, timeout-based editor transfer, or multi-tab editing restrictions.
5