Add POI feature and imporve the overall backend implementation
This commit is contained in:
@@ -15,6 +15,13 @@ The **Notification Service** handles multi-channel communication with bakery own
|
||||
- **Multi-Recipient** - Send to individuals or groups
|
||||
- **Delivery Tracking** - Monitor delivery status per channel
|
||||
|
||||
### Purchase Order Event Processing (🆕)
|
||||
- **Automatic Supplier Notifications** - Sends professional HTML emails to suppliers when POs are approved
|
||||
- **Event-Driven Architecture** - Consumes procurement events from RabbitMQ
|
||||
- **Template Rendering** - Uses Jinja2 templates for professional, branded emails
|
||||
- **Fire-and-Forget Processing** - Non-blocking event consumption for high throughput
|
||||
- **Email Template Features** - Responsive design, gradient headers, line item tables, mobile-optimized
|
||||
|
||||
### Email Capabilities
|
||||
- **HTML Templates** - Professional branded emails
|
||||
- **Plain Text Fallback** - Ensure compatibility
|
||||
@@ -799,11 +806,18 @@ async def send_smart_notification(
|
||||
```
|
||||
|
||||
### Consumed Events
|
||||
|
||||
**From Procurement Service (🆕)**
|
||||
- **Purchase Order Approved** (`po.approved`) - Automatically sends professional email notification to supplier with PO details, line items, and delivery requirements
|
||||
- **Purchase Order Rejected** (`po.rejected`) - Notifies stakeholders when a PO is rejected with reason
|
||||
- **Purchase Order Sent** (`po.sent_to_supplier`) - Confirms PO dispatch to supplier
|
||||
- **Delivery Received** (`delivery.received`) - Notifies relevant parties when deliveries are received
|
||||
|
||||
**From Other Services**
|
||||
- **From Alert Processor**: Alert events trigger notifications
|
||||
- **From Orchestrator**: Daily summaries, scheduled reports
|
||||
- **From Orders**: Order confirmations, delivery updates
|
||||
- **From Production**: Quality issue alerts, batch completion
|
||||
- **From Procurement**: Stockout warnings, purchase order confirmations
|
||||
|
||||
## Custom Metrics (Prometheus)
|
||||
|
||||
@@ -915,7 +929,8 @@ python main.py
|
||||
- **Auth Service** - User information
|
||||
- **PostgreSQL** - Notification history
|
||||
- **Redis** - Template caching
|
||||
- **RabbitMQ** - Alert consumption
|
||||
- **RabbitMQ** - Alert consumption and procurement event processing (🆕)
|
||||
- **Procurement Service** - Purchase order events (🆕)
|
||||
|
||||
### Dependents
|
||||
- **Alert Processor** - Sends alerts via notifications
|
||||
@@ -923,6 +938,7 @@ python main.py
|
||||
- **Orchestrator** - Daily summaries and reports
|
||||
- **All Services** - Critical alerts routing
|
||||
- **Frontend Dashboard** - Notification preferences UI
|
||||
- **Suppliers** - Receive PO notifications via email (🆕)
|
||||
|
||||
## Business Value for VUE Madrid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user