New enterprise feature

This commit is contained in:
Urtzi Alfaro
2025-11-30 09:12:40 +01:00
parent f9d0eec6ec
commit 972db02f6d
176 changed files with 19741 additions and 1361 deletions

View File

@@ -53,6 +53,16 @@ The **Orchestrator Service** automates daily operational workflows by coordinati
- **Split-Brain Prevention** - Ensure only one leader
- **Leader Health** - Continuous health monitoring
### 🆕 Enterprise Tier: Network Dashboard & Orchestration (NEW)
- **Aggregated Network Metrics** - Single dashboard view consolidating all child outlet data
- **Production Coordination** - Central production facility gets visibility into network-wide demand
- **Distribution Integration** - Dashboard displays active delivery routes and shipment status
- **Network Demand Forecasting** - Aggregated demand forecasts across all retail outlets
- **Multi-Location Performance** - Compare performance metrics across all locations
- **Child Outlet Visibility** - Drill down into individual outlet performance
- **Enterprise KPIs** - Network-level metrics: total production, total sales, network-wide waste reduction
- **Subscription Gating** - Enterprise dashboard requires Enterprise tier subscription
## Business Value
### For Bakery Owners
@@ -119,6 +129,13 @@ The **Orchestrator Service** automates daily operational workflows by coordinati
- `GET /api/v1/orchestrator/metrics` - Workflow metrics
- `GET /api/v1/orchestrator/statistics` - Execution statistics
### 🆕 Enterprise Network Dashboard (NEW)
- `GET /api/v1/{parent_tenant}/orchestrator/enterprise/dashboard` - Get aggregated enterprise network dashboard
- `GET /api/v1/{parent_tenant}/orchestrator/enterprise/network-summary` - Get network-wide summary metrics
- `GET /api/v1/{parent_tenant}/orchestrator/enterprise/production-overview` - Get production coordination overview
- `GET /api/v1/{parent_tenant}/orchestrator/enterprise/distribution-status` - Get current distribution/delivery status
- `GET /api/v1/{parent_tenant}/orchestrator/enterprise/child-performance` - Compare performance across child outlets
## Database Schema
### Main Tables
@@ -693,6 +710,10 @@ python main.py
### Dependencies
- **All Services** - Calls service APIs to execute workflows
- **🆕 Tenant Service** (NEW) - Fetch tenant hierarchy for enterprise dashboards
- **🆕 Forecasting Service** (NEW) - Fetch network-aggregated demand forecasts
- **🆕 Distribution Service** (NEW) - Fetch active delivery routes and shipment status
- **🆕 Production Service** (NEW) - Fetch production metrics across network
- **Redis** - Leader election and caching
- **PostgreSQL** - Workflow history
- **RabbitMQ** - Event publishing
@@ -700,6 +721,7 @@ python main.py
### Dependents
- **All Services** - Benefit from automated workflows
- **Monitoring** - Tracks workflow execution
- **🆕 Frontend Enterprise Dashboard** (NEW) - Displays aggregated network metrics for parent tenants
## Business Value for VUE Madrid