How homarr-labs/dashboard-icons works
Components to Highlight
• “Repository Source”:
– The main repository holds the source SVG files (in the “svg” directory), pre‐generated PNG and WEBP files (in their respective directories), metadata files (in the “meta” folder), and documentation.
• “Build & Processing Layer (Automation Scripts)”: The “scripts” folder contains Python scripts that perform operations such as:
– Generating and updating metadata (generate_meta.py, generate_metadata*.py)
– Producing file trees (generate_file_tree.py)
• “CI/CD Pipeline (GitHub Actions)”: The “.github/workflows” directory hosts several workflows that automate tasks like:
– Compression and update pipelines (compress_icons.yml, update_icons_and_resources.yml, etc.)
– Handling pull request events (on_icon_addition_approved.yml, on_icon_update_approved.yml)
Relationships & Data Flow
• Once a change is made (via pull requests or issues), the CI/CD workflows are triggered.
• GitHub Actions then run the processing scripts which:
– Convert SVGs into PNG/WEBP formats.
– Update the metadata and generate updated “tree.xml” and “tree.json” files.
• End-users or external dashboards dynamically reference these assets using stable URLs (via jsDelivr or direct GitHub links).
Architectural Patterns
• Automated CI/CD: There is strong reliance on GitHub Actions to ensure that any contribution triggers standardized processing, validation, and deployment.
• Source-Of-Truth: SVG files serve as the base asset from which other formats are generated, ensuring consistency.