How streamelements/widgets works
Main Components
• Widget Repository Core:
• A central component representing this code repository where all the custom widgets reside.
• Each widget (e.g., AlertboxTextFit, CustomChat, ChatPoll, etc.) can be shown as independent modules or blocks.
• A consistent structure for every widget module (each containing widget.html, widget.js, widget.css, and widget.json).
• Documentation and Guidelines:
• A component for documentation (the docs folder, toc.json, and supplemental READMEs) that guides the widget development and integration process.
• That these resources define standards and best practices for widget creation and for using custom code in alertboxes, overlays, and other parts.
• GitHub Configuration and Workflows:
• A component for version control and CI workflows (.github directory and associated workflow files such as code analysis and PR title checkers).
• How Pull Requests and quality assurance processes integrate with the repository’s maintenance.
• External Integration Point:
• The StreamElements platform where these custom widgets are intended to be deployed.
Relationships and Interactions
• Community Contribution Flow:
• Developers or community members as external contributors who fork, modify, or add widget modules.
• Contributors via 'Pull Requests' that flow into the GitHub repository – then processed by automated GitHub workflows (e.g., code analysis using the provided yml files).
• Modular Architecture:
• Demonstrate that each widget module is independent but follows a standardized structure.
• Documentation and Guidelines:
• Link the docs folder to each widget to indicate that documentation governs widget structure and custom code practices.
Architectural Patterns and Design Principles
• Plugin/Modular Design:
• Standardization:
• The repository follows a standard layout for each widget that includes HTML (structure), CSS (presentation), JavaScript (behavior), and a JSON configuration.
• Continuous Integration and Quality Assurance:
• The presence of GitHub workflows (CI/CD pipelines, code analysis tasks) should be highlighted. Represent these as part of the “Quality Gate” that each contribution must pass before becoming part of the main repo.
• Component "Community Contributors":
• Component "GitHub Repository":
• Split into sub-components:
• "Widget Modules" (each widget is a node).
• "Documentation (docs folder, toc.json, README files)" tied to the widgets.
• "GitHub Workflows" (specifically the .github directory with its workflows for automation, code analysis, and PR checks).
• Component "StreamElements Platform":
• Data and Control Flows:
• How pull requests (with their associated CI checks) get merged.
• How widget structure (the standardized set of files) feeds into the widget system that the StreamElements platform uses.