skills/vendix-notifications-system/SKILL.md
Store notifications system: database notifications, SSE stream, Web Push/VAPID, subscriptions, and frontend NgRx integration. Trigger: When adding notification types, modifying SSE/Web Push delivery, notification preferences, or notification UI.
npx skillsauth add rzyfront/vendix vendix-notifications-systemInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for full-stack store notifications: persisted notification rows, SSE live stream, Web Push browser notifications, and notification preferences.
NotificationsService.createAndBroadcast(...) is the hub:
notifications using GlobalPrismaService.NotificationsSseService.NotificationsPushService.| Channel | Behavior |
| --- | --- |
| REST list/unread | Store-scoped persisted notifications |
| SSE | One Subject per store_id; every connected user for that store receives events |
| Web Push | Browser push via VAPID and push_subscriptions; filtered by notification_subscriptions.in_app |
| Email/WhatsApp preferences | Stored in notification_subscriptions, not used by generic notification delivery |
apps/backend/src/domains/store/notifications/notifications.controller.tsapps/backend/src/domains/store/notifications/notifications.service.tsapps/backend/src/domains/store/notifications/notifications-sse.service.tsapps/backend/src/domains/store/notifications/notifications-push.service.tsapps/backend/src/domains/store/notifications/notifications-events.listener.tsapps/backend/src/domains/store/notifications/dto/update-subscription.dto.tsapps/backend/src/domains/store/notifications/dto/push-subscription.dto.tsapps/frontend/src/app/core/services/notifications.service.tsapps/frontend/src/app/core/services/push-subscription.service.tsapps/frontend/src/app/core/store/notifications/*apps/frontend/src/app/shared/components/notifications-dropdown/notifications-dropdown.component.tsapps/frontend/src/app/private/modules/store/settings/general/components/notifications-settings-form/notifications-settings-form.component.tsapps/frontend/public/push-sw.js| Method | Endpoint | Purpose |
| --- | --- | --- |
| GET | /store/notifications | List notifications |
| GET | /store/notifications/unread-count | Unread count |
| PATCH | /store/notifications/:id/read | Mark one read; skips subscription gate |
| PATCH | /store/notifications/read-all | Mark all read; skips subscription gate |
| GET | /store/notifications/subscriptions | Read/init notification preferences |
| PATCH | /store/notifications/subscriptions | Update notification preferences |
| GET | /store/notifications/stream?token=JWT | SSE stream; token in query because EventSource has no custom headers |
| GET | /store/notifications/push/vapid-key | Public VAPID key |
| PATCH | /store/notifications/push/subscribe | Save browser push subscription |
| PATCH | /store/notifications/push/unsubscribe | Remove browser push subscription |
notifications has store_id, type, severity, title, body, data, is_read; no user_id.notification_subscriptions has store_id, user_id, type, in_app, email, whatsapp.push_subscriptions stores browser endpoints and keys per store_id, user_id, and endpoint.notification_type_enum is the source of valid types. Listener-emitted types must exist in this enum.notification_type_enum through a safe Prisma migration.notifications-events.listener.ts.createAndBroadcast(...) receives a valid enum value.in_app preferences affect push delivery.notification_type_enum; those creates fail and are swallowed by createAndBroadcast().update-subscription.dto.ts and default subscription initialization cover only a subset of enum values.notification_subscriptions.in_app.subscription.updated; confirm backend emits that type before relying on it.Angular 20 frontend effects use native EventSource callbacks without NgZone.run(). Do not reintroduce Zone.js patterns; follow vendix-zoneless-signals.
vendix-zoneless-signals - EventSource/NgRx frontend behaviorvendix-multi-tenant-context - Store context and scoped operationsvendix-subscription-gate - Store write gating and @SkipSubscriptionGatevendix-prisma-migrations - Adding enum values safelydevelopment
Mobile app development rules for Vendix Expo/React Native project. Trigger: When editing, creating, or modifying any file under apps/mobile, or when developing mobile-specific features.
development
Feature gating by store subscription state: global store write guard, AI feature gate, Redis feature resolution, quota consumption, frontend paywall interceptor, banner, and subscription UI states. Trigger: When adding feature gates, paywalls, subscription-based access control, protecting store write operations, AI feature gates, or rollout flags.
testing
SaaS subscription billing for Vendix stores: plan pricing, invoices, Wompi platform payments, manual payments, partner commissions, payouts, proration, and dunning. Trigger: When creating SaaS invoices, working with partner rev-share, margin/surcharge pricing, invoice sequence allocation, partner payout batches, subscription payments, manual payments, or dunning flows.
development
Periodic quota counters with Redis, UTC period keys, Lua-based idempotent AI quota consumption, request-id deduplication, and post-success consumption. Trigger: When building quota counters, enforcing monthly/daily feature caps, or reusing AI quota patterns for uploads, emails, exports, or rate-limited features.