Skip to main content

📦 Service Modules Overview

This document provides a complete overview of all notification service modules in the Notifications Service.

🎯 Core Services​

Queue Processor​

Location: services/queue/
Environment: QUEUE_ENABLED=true
Type: Cron Job (every 5 seconds)
Purpose: Core Bull queue processor that delivers all notifications

Critical: This module MUST be enabled for any notifications to work. It polls the NotificationQueue collection and processes pending notifications through external APIs.

Handles:

  • Email delivery via SendGrid
  • SMS delivery via Twilio
  • FCM web push notifications
  • Expo mobile push notifications

Full Documentation


🛒 E-Commerce Services​

Store Notifications​

Location: services/store/
Environment: STORE_ENABLED=true, ORDERS_REMINDER_ENABLED=true
Type: Change Stream + Cron Job
Purpose: Subscription, invoice, and order notifications

Notifications:

  • Past due invoices
  • Subscription renewals
  • New subscriptions
  • Cancellation requests
  • Subscription upgrades/downgrades
  • Order setup reminders (14-day)

Triggers:

  • Change Stream on StoreInvoice
  • Change Stream on StoreSubscription
  • Cron jobs for onboarding and order status

Full Documentation


👥 CRM Services​

Contact Notifications​

Location: services/contacts/
Environment: CONTACTS_CHANGE_ASSINGEE_ENABLED=true, CONTACTS_IMPORT_ENABLED=true
Type: Change Stream
Purpose: Contact management notifications

Notifications:

  • Contact reassignment alerts
  • Contact import completion summaries

Triggers:

  • Change Stream on contact assignee changes
  • Change Stream on contact imports

Deal Notifications​

Location: services/deals/
Environment: DEALS_CHANGE_ASSINGEE_ENABLED=true
Type: Change Stream
Purpose: Deal pipeline notifications

Notifications:

  • Deal reassignment alerts

Triggers:

  • Change Stream on deal assignee changes

CRM Reminders​

Location: services/reminders/
Environment: QUEUE_CRM_REMINDERS_ENABLED=true
Type: Cron Job
Purpose: Scheduled CRM task reminders

Notifications:

  • Task due date reminders
  • Follow-up reminders

Triggers:

  • Cron job checking reminder schedules

📦 Product Services​

InstaSites Notifications​

Location: services/instasites/
Environment: INSTASITES_VIEWED_ENABLED=true, INSTASITES_FAILED_ENABLED=true
Type: Change Stream
Purpose: InstaSites product notifications

Notifications:

  • View tracking notifications
  • Failure alerts to account owners

Triggers:

  • Change Stream on instasites.viewed field updates
  • Change Stream on instasites.status: failed

InstaReports Notifications​

Location: services/instareports/
Environment: INSTAREPORTS_FAILED_ENABLED=true
Type: Change Stream
Purpose: InstaReports failure alerts

Notifications:

  • Failure alerts with error details

Triggers:

  • Change Stream on instareports.status: failed

💬 Communication Services​

Forms Notifications​

Location: services/forms/
Environment: FORMS_ENABLED=true, FORMS_NO_RESPONSE_ENABLED=true
Type: Change Stream + Cron Job
Purpose: Form submission tracking and follow-ups

Notifications:

  • New form submission alerts
  • 7-day no-response reminders

Triggers:

  • Change Stream on form submissions
  • Cron job for 7-day no-response follow-ups

Inbound Leads​

Location: services/inbound/
Environment: INBOUND_ENABLED=true, INBOUND_CAMPAIGN_DISCONNECTED_ENABLED=true, INBOUND_LEAD_ASSIGNED_ENABLED=true
Type: Change Stream
Purpose: Inbound lead tracking and campaign monitoring

Notifications:

  • New lead alerts
  • Campaign disconnection warnings
  • Lead assignment notifications

Triggers:

  • Change Stream on new inbound leads
  • Change Stream on campaign disconnections
  • Change Stream on lead assignments

Support Conversations​

Location: services/conversations/
Environment: SUPPORT_NOTIFICATION_STREAM_ENABLED=true, SUPPORT_DELAYED_EMAILS_ENABLED=true
Type: Change Stream + Cron Job
Purpose: Support ticket and conversation notifications

Notifications:

  • New support message alerts
  • Batched email summaries (reduces email frequency)

Triggers:

  • Change Stream on support conversations
  • Cron job for delayed email sending (batches messages)

📈 Marketing Services​

Funnels​

Location: services/funnels/
Environment: FUNNEL_ENABLED=true
Type: Change Stream
Purpose: Marketing funnel notifications

Notifications:

  • Funnel-related event notifications

Triggers:

  • Change Stream on funnel events

Review Requests​

Location: services/reviews/
Environment: AUTO_REVIEW_REQUEST_ENABLED=true
Type: Cron Job (every 30 seconds)
Purpose: Automated review request system

Notifications:

  • Initial review requests
  • Reminder emails/SMS for non-responders

Features:

  • Configurable delay before sending
  • Optional reminders (repeating notifications)
  • Send-once or repeat options
  • Custom templates for email/SMS
  • Integration with Stripe, Square, Shopify, QuickBooks

Triggers:

  • Cron job checking review schedules

Full Documentation


👤 Account & User Services​

User Invites​

Location: services/users/
Environment: USERS_ACCEPT_INVITE=true
Type: Change Stream
Purpose: User invitation notifications

Notifications:

  • Welcome emails on invite acceptance

Triggers:

  • Change Stream on user invite acceptance

Account Signup Reminders​

Location: services/account/
Environment: ACCOUNT_SIGNUP_REMINDER=true
Type: Cron Job
Purpose: Incomplete signup follow-ups

Notifications:

  • Reminders to complete account setup

Triggers:

  • Cron job checking signup completion

Affiliate Payouts​

Location: services/affiliates/
Environment: AFFILIATE_PAYOUT_ENABLED=true
Type: Change Stream
Purpose: Affiliate program notifications

Notifications:

  • Payout confirmation emails

Triggers:

  • Change Stream on affiliate payout records

📋 Project Management Services​

Project Notifications​

Location: services/projects/
Environment: PROJECT_ENABLED=true
Type: Change Stream + Cron Jobs
Purpose: Project management notifications

Notifications:

  • Task assignment alerts
  • Approval request notifications
  • Task completion confirmations
  • Auto-approval reminders

Triggers:

  • Change Stream on project events
  • Cron jobs for auto-approval, auto-completion, approval reminders

🔧 Utility Services​

A2P Compliance​

Location: services/a2p/
Purpose: A2P (Application-to-Person) SMS compliance tracking

Details: Handles SMS compliance requirements and regulations.

Communication Tracking​

Location: services/communication/
Purpose: Communication log management

Details: Tracks all sent communications for audit and reporting purposes.

Domain Management​

Location: services/domains/
Purpose: Domain-related notifications

Details: Lightning domain notifications and domain management alerts.


📊 Module Statistics​

CategoryModulesEnvironment FlagsNotification Types
Core11All (email, SMS, FCM, Expo)
E-Commerce12Email, Bell
CRM34Email, Bell
Product23Email, Bell
Communication36Email, SMS, Bell
Marketing22Email, SMS
Account/User33Email
Project Management11Email, Bell
Utility30Various
Total1930+4 types

🔄 Trigger Type Summary​

Change Stream Modules (15)​

Modules that watch MongoDB collections for real-time changes:

  • Store Notifications (invoices, subscriptions)
  • Contact Notifications (assignee, imports)
  • Deal Notifications (assignee)
  • InstaSites Notifications (viewed, failed)
  • InstaReports Notifications (failed)
  • Forms Notifications (submissions)
  • Inbound Leads (new, disconnected, assigned)
  • Support Conversations (messages)
  • Funnels (events)
  • User Invites (acceptance)
  • Affiliate Payouts (payouts)
  • Project Notifications (events)

Cron Job Modules (8)​

Modules that run on schedule:

  • Queue Processor (every 5 seconds) - CORE
  • Store Onboarding (every 30 seconds)
  • Store Order Reminders (daily at 2 PM)
  • CRM Reminders (scheduled)
  • Forms No Response (7-day check)
  • Support Delayed Emails (batching)
  • Account Signup Reminders (periodic)
  • Review Requests (every 30 seconds)
  • Project Auto-Approval/Completion (periodic)

🚀 Quick Start Guide​

Enabling All Modules​

# Core (REQUIRED)
QUEUE_ENABLED=true

# E-Commerce
STORE_ENABLED=true
ORDERS_REMINDER_ENABLED=true

# CRM
QUEUE_CRM_REMINDERS_ENABLED=true
CONTACTS_IMPORT_ENABLED=true
CONTACTS_CHANGE_ASSINGEE_ENABLED=true
DEALS_CHANGE_ASSINGEE_ENABLED=true

# Product
INSTASITES_VIEWED_ENABLED=true
INSTASITES_FAILED_ENABLED=true
INSTAREPORTS_FAILED_ENABLED=true

# Communication
FORMS_ENABLED=true
FORMS_NO_RESPONSE_ENABLED=true
INBOUND_ENABLED=true
INBOUND_CAMPAIGN_DISCONNECTED_ENABLED=true
INBOUND_LEAD_ASSIGNED_ENABLED=true
SUPPORT_DELAYED_EMAILS_ENABLED=true
SUPPORT_NOTIFICATION_STREAM_ENABLED=true

# Marketing
FUNNEL_ENABLED=true
AUTO_REVIEW_REQUEST_ENABLED=true

# Account/User
USERS_ACCEPT_INVITE=true
ACCOUNT_SIGNUP_REMINDER=true
AFFILIATE_PAYOUT_ENABLED=true

# Project Management
PROJECT_ENABLED=true

# HTTP Endpoints
HOOKS_ENABLED=true
PORT=5008

Minimal Configuration (Development)​

# Only enable essential modules for testing
QUEUE_ENABLED=true # Required
STORE_ENABLED=true # Test subscriptions
FORMS_ENABLED=true # Test form submissions
AUTO_REVIEW_REQUEST_ENABLED=true # Test review flow

Production Configuration​

All modules enabled with proper external service credentials:

  • SendGrid API key
  • Twilio credentials
  • Firebase credentials
  • Redis connection
  • MongoDB replica set


Total Modules: 19+
Environment Flags: 30+
Supported Channels: Email, SMS, FCM, Expo Push
Status: Production - handling all platform notifications

💬

Documentation Assistant

Ask me anything about the docs

Hi! I'm your documentation assistant. Ask me anything about the docs!

I can help you with:
- Code examples
- Configuration details
- Troubleshooting
- Best practices

Try asking: How do I configure the API?
09:31 AM