- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
18 lines
781 B
Python
18 lines
781 B
Python
"""
|
|
@handler Notification Event Handlers (Backend/app/events/handlers/notification_events.py)
|
|
@purpose Decoupled notification handlers for Order Placed, Repair Completed, and Status updates.
|
|
"""
|
|
from typing import Dict, Any
|
|
import logging
|
|
|
|
logger = logging.getLogger("NotificationHandlers")
|
|
|
|
def handle_order_placed(payload: Dict[str, Any]):
|
|
order_id = payload.get("order_id")
|
|
customer_email = payload.get("email")
|
|
logger.info(f"[NOTIF SUCCESS] Order Confirmation Email dispatched for Order #{order_id} to {customer_email}")
|
|
|
|
def handle_repair_completed(payload: Dict[str, Any]):
|
|
ticket_id = payload.get("ticket_id")
|
|
phone = payload.get("phone")
|
|
logger.info(f"[NOTIF SUCCESS] WhatsApp Repair Completion Alert dispatched for Ticket #{ticket_id} to {phone}")
|