DocuPulse features a comprehensive notification and event logging system that provides real-time alerts, email notifications, and detailed audit trails. The system combines in-app notifications with email delivery, offering users multiple ways to stay informed about important activities and system events. Built with security and compliance in mind, it provides complete visibility into user actions and system activities.
account_created - New user account createdpassword_reset - Password reset requestedaccount_deleted - User account deletedaccount_updated - User profile updatedpassword_changed - Password successfully changedroom_invite - Invited to join roomroom_invite_removed - Removed from roomconversation_invite - Invited to conversationconversation_invite_removed - Removed from conversationconversation_message - New message received1. Event triggers notification2. System validates notification type3. Creates notification record4. Generates email template5. Sends email via SMTP6. Updates notification statusnotif_type - Type of notificationuser_id - Target user IDsender_id - Optional sender IDdetails - Additional datagenerate_mail - Email flagsmtp_server - SMTP server addresssmtp_port - SMTP port numberuse_tls - TLS encryption flagusername - SMTP usernamepassword - SMTP passwordsender_email - From email addressAccount Created - New user welcomePassword Reset - Reset instructionsRoom Invite - Room invitationConversation Invite - Chat invitationConversation Message - Message alertsuser_login - User authenticationuser_logout - User logoutuser_create - Account creationuser_update - Profile updatesuser_delete - Account deletionroom_create - Room creationroom_update - Room modificationsroom_delete - Room deletionroom_member_add - Member additionroom_member_remove - Member removalfile_upload - File uploadsfile_download - File downloadsfile_delete - File deletionsfile_rename - File renamingfile_move - File movingconversation_create - Chat creationconversation_update - Chat updatesconversation_delete - Chat deletionmessage_create - Message sendingconversation_open - Chat access1. Event occurs in system2. log_event() function called3. Validates event type4. Captures user context5. Records IP and user agent6. Stores in databaseevent_type - Type of eventuser_id - User who triggeredtimestamp - Event timedetails - Event-specific dataip_address - User IP addressuser_agent - Browser/client infoget_user_notifications - Fetch user notificationsmark_notification_read - Mark as readmark_all_notifications_read - Mark all readget_unread_count - Count unreaddelete_notification - Delete notificationdelete_old_notifications - Cleanup old notificationsgenerate_mail_from_notification - Create emailsend_email_via_smtp - Send emailget_smtp_settings - Get email configcreate_notification - Create new notificationget_user_events - User-specific eventsget_room_events - Room-specific eventsget_recent_events - Recent system eventsget_events_by_type - Filter by event typeget_events_by_date_range - Date range filteruser_id - Filter by userevent_type - Filter by typestart_date - Start dateend_date - End datelimit - Result limit{{ '{{ user.username }}' }} - User's full name{{ '{{ user.email }}' }} - User's email{{ '{{ user.company }}' }} - User's company{{ '{{ user.position }}' }} - User's position{{ '{{ sender.username }}' }} - Sender's name{{ '{{ site.company_name }}' }} - Company name{{ '{{ site.company_website }}' }} - Website{{ '{{ setup_link }}' }} - Setup URL{{ '{{ reset_link }}' }} - Reset URL{{ '{{ created_at }}' }} - Creation time{{ '{{ conversation.name }}' }} - Chat name{{ '{{ message.content }}' }} - Message text{{ '{{ room_link }}' }} - Room URL{{ '{{ conversation_link }}' }} - Chat URL{{ '{{ updated_fields }}' }} - Changed fields{{ '{{ created_at }}' }} - Creation timestamp{{ '{{ updated_at }}' }} - Update timestamp{{ '{{ deleted_at }}' }} - Deletion timestamp{{ '{{ removed_at }}' }} - Removal timestamp{{ '{{ expiry_time }}' }} - Expiration time