# cooperspencer/gickup architecture

> Architecture diagram of the GitHub repository cooperspencer/gickup, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cooperspencer/gickup
- Repository: https://github.com/cooperspencer/gickup

## Overview

##### Main Components Identification

The system can be broken down into three main layers:

a. Core Layer:
- Main application logic (main.go)
- Configuration handling (conf.example.yml)
- Type definitions (types/)

b. Source Providers Layer:
- GitHub
- GitLab
- Gitea
- Gogs
- Bitbucket
- OneDev
- Sourcehut
- Whatever (generic Git)

c. Destination Providers Layer:
- All source providers (except Whatever)
- Local storage
- S3 storage

d. Metrics/Monitoring Layer:
- Gotify
- Heartbeat
- Ntfy
- Prometheus

##### Detailed Component Breakdown

Core Layer (Blue):

- Gickup Core     |

- Configuration       |
- Type Definitions    |
- Git Commands        |
- Logger              |

Source Providers (Green):

- Source Providers    |

- GitHub              |
- GitLab              |
- Gitea               |
- Gogs                |
- Bitbucket           |
- OneDev              |
- Sourcehut           |
- Whatever (Generic)  |

Destination Providers (Orange):

- Destination Providers  |

- GitHub              |
- GitLab              |
- Gitea               |
- Gogs                |
- OneDev              |
- Sourcehut           |
- Local               |
- S3                  |

Metrics Layer (Purple):

- Metrics/Monitoring  |

- Gotify              |
- Heartbeat           |
- Ntfy                |
- Prometheus          |

##### Flow Representation

- From source providers to core
- From core to destination providers
- From core to metrics layer

##### Additional Elements

- Notes about configuration requirements
- External dependencies (Git commands, S3 SDK)
- Deployment options (Docker, binary)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef source fill:#2ecc71,stroke:#27ae60,color:white
    classDef destination fill:#e67e22,stroke:#d35400,color:white
    classDef metrics fill:#9b59b6,stroke:#8e44ad,color:white
    classDef utility fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Core Components
    Core["Gickup Core"]:::core
    Config["Configuration"]:::core
    Types["Type Definitions"]:::core

    %% Source Providers
    subgraph Sources["Source Providers"]
        GitHub_S["GitHub"]:::source
        GitLab_S["GitLab"]:::source
        Gitea_S["Gitea"]:::source
        Gogs_S["Gogs"]:::source
        Bitbucket_S["Bitbucket"]:::source
        OneDev_S["OneDev"]:::source
        Sourcehut_S["Sourcehut"]:::source
        Whatever["Whatever (Generic)"]:::source
    end

    %% Destination Providers
    subgraph Destinations["Destination Providers"]
        GitHub_D["GitHub"]:::destination
        GitLab_D["GitLab"]:::destination
        Gitea_D["Gitea"]:::destination
        Gogs_D["Gogs"]:::destination
        OneDev_D["OneDev"]:::destination
        Sourcehut_D["Sourcehut"]:::destination
        Local["Local Storage"]:::destination
        S3["S3 Storage"]:::destination
    end

    %% Utility Components
    GitCmd["Git Commands"]:::utility
    Logger["Logger"]:::utility
    ZIP["ZIP Handler"]:::utility

    %% Metrics Components
    subgraph Metrics["Metrics/Monitoring"]
        Gotify["Gotify"]:::metrics
        Heartbeat["Heartbeat"]:::metrics
        Ntfy["Ntfy"]:::metrics
        Prometheus["Prometheus"]:::metrics
    end

    %% Relationships
    Sources --> Core
    Core --> Destinations
    Core --> Metrics
    Core --> GitCmd
    Core --> Logger
    Core --> ZIP
    Config --> Core
    Types --> Core

    %% Click Events
    click Core "https://github.com/cooperspencer/gickup/blob/main/main.go"
    click Config "https://github.com/cooperspencer/gickup/blob/main/conf.example.yml"
    click Types "https://github.com/cooperspencer/gickup/blob/main/types/types.go"
    click GitHub_S "https://github.com/cooperspencer/gickup/blob/main/github/github.go"
    click GitLab_S "https://github.com/cooperspencer/gickup/blob/main/gitlab/gitlab.go"
    click Gitea_S "https://github.com/cooperspencer/gickup/blob/main/gitea/gitea.go"
    click Gogs_S "https://github.com/cooperspencer/gickup/blob/main/gogs/gogs.go"
    click Bitbucket_S "https://github.com/cooperspencer/gickup/blob/main/bitbucket/bitbucket.go"
    click OneDev_S "https://github.com/cooperspencer/gickup/blob/main/onedev/onedev.go"
    click Sourcehut_S "https://github.com/cooperspencer/gickup/blob/main/sourcehut/sourcehut.go"
    click Whatever "https://github.com/cooperspencer/gickup/blob/main/whatever/whatever.go"
    click Local "https://github.com/cooperspencer/gickup/blob/main/local/local.go"
    click S3 "https://github.com/cooperspencer/gickup/blob/main/s3/s3.go"
    click Gotify "https://github.com/cooperspencer/gickup/blob/main/metrics/gotify/gotify.go"
    click Heartbeat "https://github.com/cooperspencer/gickup/blob/main/metrics/heartbeat/heartbeat.go"
    click Ntfy "https://github.com/cooperspencer/gickup/blob/main/metrics/ntfy/ntfy.go"
    click Prometheus "https://github.com/cooperspencer/gickup/blob/main/metrics/prometheus/prometheus.go"
    click GitCmd "https://github.com/cooperspencer/gickup/blob/main/gitcmd/gitcmd.go"
    click Logger "https://github.com/cooperspencer/gickup/blob/main/logger/logger.go"
    click ZIP "https://github.com/cooperspencer/gickup/blob/main/zip/zip.go"

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Source Providers"]:::source
        L3["Destination Providers"]:::destination
        L4["Metrics/Monitoring"]:::metrics
        L5["Utility Components"]:::utility
    end
```
