How best-of-lists/best-of works
Main Components
• Repository Core: Represent the GitHub repository as the central codebase. This includes:
• The README.md and accompanying markdown files (config/header.md, config/footer.md) that form the presentation layer.
• The projects.yaml file containing the core list data.
• History and change logs in the “history” directory that record updates and project changes.
• Automation Workflows: Indicate the .github/workflows components. These workflows (e.g., setup-best-of-list.yml and update-best-of-list.yml) run automated tasks such as pulling in new changes, updating scores, and regenerating the markdown pages.
• Contribution and Template System: Include folders like “template” and CONTRIBUTING.md that help structure contributions and guidelines for adding new projects.
• External Integration: Optionally display how the system might interact with external APIs (such as GitHub’s API for star counts, package manager APIs, etc.) that feed into the “project-quality score” used for ranking.
• Best-of Generator: Mention the external best-of-generator (as referenced in the README) that might be used or integrated to help generate updated markdown or automate list creation, via scripts like create-best-of-list.md.
Relationships and Interactions
• User Contributions → GitHub (issues, pull requests): Users add or update project data either by editing projects.yaml or submitting change requests. This triggers the CI/CD workflows.
• GitHub Workflows → Data Processing: The workflows (triggered periodically or on changes) pull the latest information, process the configuration and history logs, and update the projects’ ranking and metadata.
• Data Processing → Markdown Generation: Processed data, combined with header/footer templates, is used to update the README and other static pages that showcase the “best-of” lists.
• External APIs → Data Enrichment: The project-quality score and other metrics (stars, forks, etc.) are likely fetched via external API calls that then get integrated by the workflows.
Important Architectural Patterns/Design Principles
• Separation of Concerns: Notice the clear separation between configuration (config/ and template/ directories), historical tracking (history/), core data (projects.yaml), and automated processing (GitHub workflows).
• Automation and CI/CD: The use of GitHub Actions emphasizes automation in updating and maintaining the curated lists.
• Template-Driven Generation: The project uses markdown (with separate header/footer templates) to dynamically generate a polished view of the curated lists.
Relevant Technologies/Frameworks
• GitHub Actions (YAML-based workflows) for CI/CD automation.
• Markdown as the presentation format.
• YAML for configuration and project data (projects.yaml).
• Likely external API integrations (GitHub API and possibly package manager APIs for metrics).