How kamchettysadhika/realitysync- works
Project Type and Purpose
• RealitySync is a microservices-based, AI-powered field intelligence platform built on Node.js/TypeScript with Python forecasting components.
• It combines anomaly detection, predictive forecasting, AI-driven orchestration, and automated communication to streamline field operations.
File Structure and Key Modules
• Top-level entry: index.ts
• Core services (root folder and services/):
• anomalyEngine.ts (rules engine for anomaly detection)
• forecast/ (forecast_input.csv, forecast_output.json)
• simulateAnomaly.ts
• services/exportFeedback.ts, services/triggerActions.ts
• mulesoft.ts, salesforce.ts, sensors.ts, slack.ts
• src/ – higher-level modules organized by capability:
• src/forecast (Prophet model in Python, timeseries.ts)
• src/llm (agent tuning, prompt management)
• src/agents (autonomycommander, executeresponse)
• src/pipeline.ts (workflow coordination)
• src/services (coordination.ts, monitor.ts)
• src/slack (handlers, monitor integration)
• src/monitor (metrics, export to CSV)
README for Architectural Insights
• Four major subsystems:
1. Predictive Intelligence Engine (ML/anomaly + GPT-4)
2. Intelligent Workflow Orchestration (GPT planner + rules)
3. Automated Communication Hub (Slack API, Service Cloud, OAuth2)
4. Real-Time Dashboard Intelligence (Tableau + data pipelines)
• Microservices architecture on MERN stack, serverless-friendly, stateless OAuth2.
Out Main Components
a. Data Ingestion & Storage
• Event DB (db/logEvent.ts)
• Forecast input (CSV, timeseries.json)
b. Predictive Intelligence Service
• Anomaly Detection Engine (rules/anomalyEngine.ts)
• Forecast Service (forecast folder + src/forecast/prophet_forecast.py)
• LLM-based pattern learner (src/LLM-representation.ts, src/llm)
c. Workflow Orchestration Service
• pipeline.ts, src/pipeline.ts
• GPT-4 Planner (tunedprompt.ts, tuneAgent.ts)
d. Communication Hub
• Slack integration (slack.ts, src/slack/)
• Service Cloud integration (salesforce.ts)
• Mulesoft connector (mulesoft.ts)
• Feedback loop (services/exportFeedback.ts)
e. Monitoring & Dashboard
• Metrics collection (src/monitor/metrics.ts)
• CSV export (monitortoCSV.ts)
• Tableau pipeline (external)
Interactions and Data Flows
1. Raw events → Ingestion layer → Event DB
2. DB → Anomaly Detection → Forecast Service → LLM learner
3. LLM output + rules → Orchestration Engine → dispatch recommendation
4. Orchestration → triggers → Slack API, Service Cloud, Mulesoft
5. Field responses → exportFeedback → update DB → monitoring
6. Monitoring metrics → real-time dashboard (Tableau)
Architectural Patterns
• Microservices communicating via asynchronous triggers or REST calls
• Stateless OAuth2 for external API auth
• Hybrid model: Node.js for orchestration and integration, Python for forecasting
• Modular folder layout mirrors service boundaries
Technologies & Frameworks to Annotate
• Node.js + TypeScript, Python + Prophet
• GPT-4 API
• Slack SDK, Salesforce Service Cloud API, Mulesoft
• Tableau for real-time dashboards
• Durable storage (file-based CSV/JSON and a DB for events)