How barchart/alerting-service-public works
This repository is a JavaScript SDK for Barchart’s remote Alerting Service. An application uses the SDK to define conditional alerts, publishers and schedules, then the AlertManager creates or manages them through a transport adapter; the service continuously evaluates conditions and sends notifications. The SDK also exposes alert and trigger monitoring, templates, market-data metadata and publisher defaults. The source excerpts establish the main manager, HTTP adapter, builders, validation and JWT behavior; several documented capabilities have unsampled implementations, so their internal links are intentionally limited.
Main entry points: AlertManager.js AlertManager · AlertBuilder.js Alert builder · AdapterBase.js Transport contract · AdapterForHttp.js HTTP adapter
Components 19
Alert authoring
- Alert builder
lib/builder/builders/AlertBuilder.js - Condition builder
lib/builder/builders/ConditionBuilder.js - Publisher builder
lib/builder/builders/PublisherBuilder.js - Alert model
lib/builder/data/Alert.js
Alert management
- AlertManager
lib/AlertManager.js - Alert subscriptions
lib/AlertManager.js - Trigger monitoring
lib/AlertManager.js - Template management
lib/AlertManager.js - Market data lookup
lib/AlertManager.js - Alert metadata
lib/AlertManager.js - Service configuration
lib/adapters/AdapterBase.js
Service transport
- Transport contract
lib/adapters/AdapterBase.js - HTTP adapter
lib/adapters/AdapterForHttp.js - Socket.IO adapter
lib/adapters/AdapterForSocketIo.js
SDK support
- Request validators
lib/data/validators - JWT provider
lib/security/JwtProvider.js - Environment configuration
lib/common/Configuration.js
Other components
- Client application
- Barchart Alerting Service
Connections 19
- Client application → AlertManager: uses SDK
README.md - Client application → Alert builder: defines alerts
README.md - Alert builder → Condition builder: builds conditions
lib/builder/builders/AlertBuilder.js - Alert builder → Publisher builder: builds publishers
lib/builder/builders/AlertBuilder.js - Alert builder → Alert model: constructs model
lib/builder/builders/AlertBuilder.js - AlertManager → Request validators: validates requests
lib/AlertManager.js - AlertManager → Transport contract: uses transport contract
lib/AlertManager.js - Transport contract → HTTP adapter: implemented by
lib/adapters/AdapterBase.js - Transport contract → Socket.IO adapter: implemented by
lib/adapters/AdapterBase.js - HTTP adapter → Barchart Alerting Service: sends API requests
lib/adapters/AdapterForHttp.js - AlertManager → Alert subscriptions: manages
lib/AlertManager.js - AlertManager → Trigger monitoring: monitors
lib/AlertManager.js - AlertManager → Template management: manages
lib/AlertManager.js - AlertManager → Market data lookup: looks up instruments
lib/AlertManager.js - AlertManager → Alert metadata: retrieves metadata
lib/AlertManager.js - Transport contract → Service configuration: defines operations
lib/adapters/AdapterBase.js - JWT provider → Environment configuration: reads host config
lib/security/JwtProvider.js - JWT provider → Barchart Alerting Service: requests impersonation token
lib/security/JwtProvider.js - HTTP adapter → JWT provider: authenticates requests
lib/adapters/AdapterForHttp.js