# quiquemartinez/autoissuesync architecture

> Architecture diagram of the GitHub repository quiquemartinez/autoissuesync, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/quiquemartinez/autoissuesync
- Repository: https://github.com/quiquemartinez/autoissuesync

## Overview

##### Main components
- AutoIssueSync.Core – Contains core definitions, such as the GitHubIssue attribute and domain logic that defines issue types, statuses, and rules.
- AutoIssueSync.Analyzer – Implements code analysis (using Roslyn) to scan C# files for the presence of the GitHubIssue attribute.
- AutoIssueSync.Sync – Houses the synchronization logic for interacting with GitHub. It connects to the GitHub API (via Octokit) to create, update, or close issues based on the analysis.
- AutoIssueSync.Demo – Provides a demonstrative command-line application showcasing the tool’s usage.
- External Services – GitHub (via GitHub API) is the external dependency where issues are created and managed.
- CI/CD – There is a GitHub Actions workflow (.github/workflows/issue-sync.yml) for automating aspects like code analysis or synchronization based on repository events.

##### Component relationships and interactions
- This to the AutoIssueSync.Analyzer component (which scans for [GitHubIssue] tags).
- The Analyzer passes its results or signals to AutoIssueSync.Core, which processes the issue information (e.g., compares current state vs. stored state).
- Optionally, illustrate AutoIssueSync.Demo as an application that ties all these components together or as a test-bed, showing how a developer might run the tool manually.
- CI/CD pipeline block to indicate that the automation of synchronization may also be triggered by GitHub Actions.

##### Architectural patterns and design principles
- Separation of concerns – Analyzer, Core, Sync, and Demo each handle distinct responsibilities.
- Layered architecture – The system is stratified into a code-analysis layer, a business logic layer, and an integration layer (GitHub API).
- Extensibility – Because the Core defines attributes and rules, further extensions or modifications can propagate to Analyzer/Sync without overhauling the entire system.
- Dependency injection or modular design (common in .NET projects) can be noted if applicable.

##### Important details
- Integration point with GitHub using Octokit explicitly.
- That the analyzer component uses the Roslyn Compiler Platform to inspect attribute usage.
- How the system decision logic is driven by attribute metadata (such as IssueType and IssueStatus).

Happy diagramming!

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Source Code Files"]:::source
    B["AutoIssueSync.Analyzer (Roslyn-based scanner)"]:::internal
    C["AutoIssueSync.Core (Issue rules & definitions)"]:::internal
    D["AutoIssueSync.Sync (GitHub Integration via Octokit)"]:::internal
    E["GitHub API/Repository"]:::external
    F["AutoIssueSync.Demo (Command-line Application)"]:::internal
    G["CI/CD Pipeline (GitHub Actions)"]:::pipeline

    A -->|"triggers scan"| B
    B -->|"reports issues"| C
    C -->|"provides data"| D
    D -->|"calls"| E
    F -->|"orchestrates"| B
    F -->|"orchestrates"| D
    G -->|"automates"| D

    classDef source fill:#FFF2CC,stroke:#333,stroke-width:2px
    classDef internal fill:#CFE2F3,stroke:#333,stroke-width:2px
    classDef external fill:#D9EAD3,stroke:#333,stroke-width:2px, font-style:italic
    classDef pipeline fill:#F4CCCC,stroke:#333,stroke-width:2px,stroke-dasharray: 5,5

    click B "https://github.com/quiquemartinez/autoissuesync/blob/master/AutoIssueSync.Analyzer"
    click C "https://github.com/quiquemartinez/autoissuesync/blob/master/AutoIssueSync.Core"
    click D "https://github.com/quiquemartinez/autoissuesync/blob/master/AutoIssueSync.Sync"
    click F "https://github.com/quiquemartinez/autoissuesync/blob/master/AutoIssueSync.Demo"
    click G "https://github.com/quiquemartinez/autoissuesync/blob/master/.github/workflows/issue-sync.yml"
```
