How cheesegrinder/poppy-ui works
Main Components
• Monorepo Container – Representing the overall repository that houses all packages and shared configurations.
• Core Package – This is the foundation that contains the actual Web Components (buttons, dropdowns, modals, etc.), styling, assets, and utility functions.
• Framework Wrappers:
– Angular Package – A wrapper that adapts the core components to Angular.
– React Package – A wrapper that adapts the core components to React.
– Vue Package – A wrapper that adapts the core components to Vue.
• Documentation Package – Although less central to runtime, it’s a separate package providing guides and API documentation.
• Test Directories – Representing testing configurations and sample applications for React and Vue, which illustrate usage examples.
• Developer Tools & Configurations – Include the configuration files (like .editorconfig, tsconfig.json, npm workspace setups) that tie the monorepo together.
Relationships and Interactions
• The Core Package is central and is built using Stencil, which compiles the shared Web Components. From it, the output is fed into the different framework wrappers.
• Each framework package (Angular, React, Vue) depends on the Core Package. They essentially wrap the core components to provide idiomatic integration.
• Developers interact with the individual packages depending on their target framework.
• There is a build process (invoked via npm scripts) that powers the development and packaging workflow. Note that CI/CD related aspects should be left out as per the instructions.
• The monorepo structure (npm workspaces) ensures that dependencies for all packages are installed in a single node_modules and shared where possible.
Important Architectural Patterns/Design Principles
• Modular Design – The separation of core Web Components from the framework-specific wrappers.
• Code Reusability – The core package is shared across Angular, React, and Vue.
• Monorepo Management – Using npm workspaces to reduce redundancy, encourage shared dependencies, and simplify dependency management.
• Encapsulation of Styles and Components – The styles, themes, global CSS, and utility functions support consistency across all wrappers.
• Layered Architecture – At the bottom is the core, then the wrappers adapt/extend functionality, and finally the tests and documentation add both quality assurance and guidance for usage.
Technologies, Frameworks, and Libraries
• Stencil – Used for compiling and generating Web Components.
• Web Components/Custom Elements – The core technology behind the UI components.
• Daisy UI – Provides styling and UI enhancements.
• Frameworks: Angular, React, and Vue – Each has a dedicated wrapper to integrate the core package.
• npm Workspaces – Manages the monorepo setup.
• Supporting Tools: Node, npm, TypeScript, and configuration files such as tsconfig and eslint (if present).
Elements
– Monorepo Container
– Core Package (Stencil-generated Web Components)
– Angular Wrapper Package
– React Wrapper Package
– Vue Wrapper Package
– Documentation and Examples (e.g., tests)
• Visual Distinctions:
– Ensure labels include technology names (Stencil, Angular, React, Vue) where relevant.
• Annotations or legends if needed, to note that this design omits CI/CD details.