How webex/widgets works
Project Type and Purpose
• This is an open-source React component library—“Webex Widgets”—designed to be published to npm and embedded by developers into their web applications. It provides self-contained React widgets (currently a Meetings widget) that handle UI, styling, and integration with Webex APIs.
Main Components
a. Source Code (src/)
• widgets/WebexMeetings: React components, CSS, assets, and internal logic.
• index.js: library entry point that exports widgets.
b. Build & Bundling
• rollup.config.js & webpack.config.js: build the library and demo bundles.
• package.json & release.config.js: npm publication configuration.
c. Continuous Integration
• .circleci/config.yml & GitHub Actions (.github/workflows): test, build, and publish pipelines.
d. Demo Application (demo/)
• A small React app that imports the built widget and demonstrates usage.
e. Documentation Site (docs/)
• Prebuilt static bundles and HTML for npmjs documentation pages.
f. Tests
• End-to-end tests (wdio.conf.js, tests/): verify widget functionality in a simulated browser.
g. Distribution
• npm registry: consumers install @webex/widgets.
• dist/css/webex-widgets.css & dist/js bundles: the published artifacts.
External Dependencies & Services
• npm registry: artifact publication and consumption.
• Webex Backend APIs & Media Services: widget runtime integration for authentication (accessToken), meeting signaling, and media streams.
• Developer’s host app: imports and renders the widget, passes props (accessToken, meetingDestination, optional fedramp).
Architectural Patterns & Design Principles
• Modular component design: each widget is self-contained under src/widgets.
• Single entry point pattern: src/index.js re-exports widgets.
• CI/CD pipeline for automated testing and publishing.
• Demo & docs decoupled from core library—built via separate configs.