How primer/figma works
Main Components
a. Version Control & Repository:
• GitHub repository as the foundation of the project’s lifecycle.
• It includes configuration files (.gitignore, CODEOWNERS) and the root README that documents usage and guides.
b. CI/CD Automation via GitHub Actions:
• Clearly denote the CI/CD pipelines, showing two distinct workflows (docgen-brand and docgen-web) that trigger on changes.
• These pipelines automate documentation generation or other related tasks.
c. Monorepo Structure – Packages:
• The “brand” package: Contains its own package.json, CHANGELOG, and a “generated” directory for components.json.
• The “web” package: Similarly structured with its own assets and documentation.
• Each package is a self-contained module that contributes to the overall Primer for Figma system.
d. External References & Documentation:
• Connection to external design documentation sources, such as Primer.style and Figma community files.
• These links show how the design assets integrate into broader design guidelines and community usage.
Relationships and Data Flow
• From developers editing the source code within the monorepo (both packages and CI configuration) to GitHub where commits trigger the CI/CD workflows.
• From GitHub Actions workflows (docgen-brand and docgen-web) to the generation of assets (stored under “generated” folders within each package).
• From the output of these pipelines to the external displays (Primer.style documentation, internal and community Figma files).
Highlighting Architectural Patterns
• Monorepo Architecture: Emphasize that multiple packages (brand and web) are managed within a single repository.
• Continuous Integration/Continuous Deployment (CI/CD): Underline how GitHub Actions is configured for automated documentation generation.
• Modularity: Indicate that the two packages, while sharing a common repository, serve distinct aspects of the design system.
Technologies, Frameworks, and Tools
• GitHub and GitHub Actions (for version control and automation).
• Node.js ecosystems (as seen by package.json files, possibly indicating dependency management and script execution).
• Figma (with various internal and community design files that are integrated with the documented design guidelines).
• Optional: Documentation generation scripts (referenced in the workflow files) and how they interact with the JSON files in the “generated” folders.