diff --git a/architecture.md b/architecture.md index fc9d6c4..08ad95c 100644 --- a/architecture.md +++ b/architecture.md @@ -1,81 +1,68 @@ +# Cognitive AI Manufacturing Agent (IoT Industry Automation) + +```mermaid graph TB - %% IoT Sensors subgraph "IoT Sensors" - A1[Temp/Pressure/Vibration
Flow/Speed/Level] + A[Temp/Pressure/Vibration
Flow/Speed/Level/Current] end - %% Edge Processing subgraph "Edge Layer" - B1[Edge Gateway
Data Validation] - B2[MQTT Broker
Protocol Convert] + B[Edge Gateway & MQTT
Data Validation/Protocol Convert] end - %% Stream Processing subgraph "DataStreamX" - C1[Real-time Ingestion] - C2[Pattern Detection] - C3[Data Enrichment] + C[Stream Processing
Pattern Detection/Enrichment] end - %% Event Streaming - subgraph "Kafka" - D1[Event Topics
sensor-data/alerts] - D2[Consumer Groups] + subgraph "Kafka Streaming" + D[Event Topics & Consumers
sensor-data/alerts/commands] end - %% AI Engine - subgraph "AI Processing" - E1[Anomaly Detection] - E2[Predictive Maintenance] - E3[Decision Engine] + subgraph "AI Engine" + E[Node.js/Python Agents
Anomaly/Predictive/ML] + F[Decision & Rule Engine
Action Classification] end - %% Actions subgraph "Actions" - F1{Critical?} - F2[Emergency Stop] - F3[Auto-Fix] - F4[Optimization] + G{Critical Alert?} + H[Emergency Shutdown] + I[Auto-Fix & Control] + J[Optimization] end - %% Notifications - subgraph "HookPilot" - G1[Workflow Engine] - G2[Multi-channel
Telegram/Email/Slack] + subgraph "HookPilot Automation" + K[Webhook Receiver
Workflow Engine] + L[Multi-channel Dispatch
Template/Retry/APIs] + end + + subgraph "Notifications" + M[Telegram/Email/Slack
SMS/WhatsApp/Push] end - %% Dashboard subgraph "React Dashboard" - H1[Real-time Monitor] - H2[Analytics] - H3[Control Panel] + N[Real-time Monitor
Analytics/Control Panel] end - %% Storage - subgraph "Storage" - I1[Time Series DB] - I2[Event Store] + subgraph "Storage & Analytics" + O[Time Series/Event Store
Config/User/ML Models] end - %% Learning Loop - subgraph "ML Loop" - J1[Performance Metrics] - J2[Model Retraining] + subgraph "Learning Loop" + P[Performance Metrics
Model Retraining/Tuning] end - %% Connections - A1 --> B1 --> B2 --> C1 - C1 --> C2 --> C3 --> D1 - D1 --> D2 --> E1 - E1 --> E2 --> E3 --> F1 - F1 -->|Yes| F2 - F1 -->|No| F3 --> F4 - F2 --> G1 - F3 --> G1 - F4 --> G1 - G1 --> G2 - D2 --> H1 --> H2 - H3 --> F3 - C3 --> I1 - E3 --> I2 - H2 --> J1 --> J2 --> E1 \ No newline at end of file + A --> B --> C --> D + D --> E --> F --> G + G -->|Yes| H + G -->|No| I --> J + H --> K + I --> K + J --> K + K --> L --> M + D --> N + F --> N + N --> I + C --> O + F --> O + N --> P --> E +``` \ No newline at end of file