# otto-de/gitactionboard architecture

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

- Interactive diagram: https://gitdiagram.com/otto-de/gitactionboard
- Repository: https://github.com/otto-de/gitactionboard

## Overview

##### Main Components Identification
The system consists of two primary components:
- Frontend (Vue.js application)
- Backend (Spring Boot Java application)

##### Client Layer
- Vue.js Frontend Application
- Components for different dashboards (Workflow, CodeStandardViolations, Secrets)
- Authentication UI (Login Page)

##### Backend Services
- REST API Controllers
- Domain Services
- Adapters Layer
- Security Layer

##### External Systems
- GitHub API
- Microsoft Teams (for notifications)

##### Caching Layer
- In-memory cache for GitHub API responses

b. Component Relationships:

**[Frontend Components] ←→ [Backend REST Controllers]**
**[Backend Controllers] ←→ [Domain Services]**
**[Domain Services] ←→ [Adapters]**
**[Adapters] ←→ [External Systems (GitHub/MS Teams)]**

##### Specific Implementation Details

a. Frontend (Blue):
- Main Dashboard Component
- Authentication Components
- Monitoring Components (Workflows/Secrets/Code Standards)

b. Backend (Green):
- Controllers Package
- GithubController
- GithubAlertsController
- ConfigurationController
- BasicAuthenticationController

c. Services (Yellow):
- WorkflowService
- CodeStandardViolationsService
- SecretsScanService
- NotificationsService

d. External Systems (Gray):
- GitHub API
- MS Teams Webhook

Following flows:
- User requests → Frontend → Backend
- Backend → GitHub API (with caching)
- Backend → MS Teams (for alerts)
- GitHub API responses → Cache → Backend → Frontend

##### Additional Elements

Annotations for:
- Authentication mechanisms (Basic Auth & GitHub OAuth2)
- Caching configuration
- API rate limiting
- Security boundaries

##### Technical Details to Highlight

- Spring Boot backend architecture
- Vue.js frontend structure
- RESTful API endpoints
- Authentication flows
- Caching mechanism
- Monitoring capabilities

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef service fill:#f1c40f,stroke:#f39c12,color:black
    classDef external fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef cache fill:#e74c3c,stroke:#c0392b,color:white
    classDef security fill:#9b59b6,stroke:#8e44ad,color:white

    %% Frontend Layer
    subgraph Frontend
        MainDash["Dashboard"]:::frontend
        LoginUI["Login Page"]:::frontend
        WorkflowDash["Workflow Dashboard"]:::frontend
        CodeDash["Code Standards Dashboard"]:::frontend
        SecretsDash["Secrets Dashboard"]:::frontend
    end

    %% Backend Controllers Layer
    subgraph Controllers
        GithubCtrl["GitHub Controller"]:::backend
        AlertsCtrl["GitHub Alerts Controller"]:::backend
        AuthCtrl["Authentication Controller"]:::backend
        ConfigCtrl["Configuration Controller"]:::backend
    end

    %% Services Layer
    subgraph Services
        WorkflowSvc["Workflow Service"]:::service
        CodeStdSvc["Code Standards Service"]:::service
        SecretsSvc["Secrets Scan Service"]:::service
        NotifSvc["Notifications Service"]:::service
    end

    %% Security Layer
    subgraph Security
        WebSecurity["Web Security Config"]:::security
        GithubAuth["GitHub Auth Handler"]:::security
    end

    %% External Systems
    GithubAPI["GitHub API"]:::external
    TeamsWebhook["MS Teams Webhook"]:::external

    %% Cache
    Cache["Cache Layer"]:::cache

    %% Relationships
    MainDash --> GithubCtrl
    LoginUI --> AuthCtrl
    WorkflowDash --> GithubCtrl
    CodeDash --> AlertsCtrl
    SecretsDash --> AlertsCtrl

    GithubCtrl --> WorkflowSvc
    AlertsCtrl --> CodeStdSvc
    AlertsCtrl --> SecretsSvc
    
    WorkflowSvc --> Cache
    CodeStdSvc --> Cache
    SecretsSvc --> Cache
    
    Cache --> GithubAPI
    NotifSvc --> TeamsWebhook

    AuthCtrl --> WebSecurity
    WebSecurity --> GithubAuth

    %% Click Events
    click MainDash "https://github.com/otto-de/gitactionboard/blob/main/frontend/src/components/Dashboard.vue"
    click LoginUI "https://github.com/otto-de/gitactionboard/blob/main/frontend/src/components/LoginPage.vue"
    click WorkflowDash "https://github.com/otto-de/gitactionboard/blob/main/frontend/src/components/WorkflowDashboard.vue"
    click CodeDash "https://github.com/otto-de/gitactionboard/blob/main/frontend/src/components/CodeStandardViolationsDashboard.vue"
    click SecretsDash "https://github.com/otto-de/gitactionboard/blob/main/frontend/src/components/SecretsDashboard.vue"
    
    click GithubCtrl "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/adapters/controller/GithubController.java"
    click AlertsCtrl "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/adapters/controller/GithubAlertsController.java"
    click AuthCtrl "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/adapters/controller/BasicAuthenticationController.java"
    click ConfigCtrl "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/adapters/controller/ConfigurationController.java"
    
    click WorkflowSvc "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/domain/service/WorkflowService.java"
    click CodeStdSvc "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/domain/service/CodeStandardViolationsService.java"
    click SecretsSvc "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/domain/service/SecretsScanService.java"
    click NotifSvc "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/domain/service/notifications/NotificationsService.java"
    
    click WebSecurity "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/config/security/WebSecurityConfig.java"
    click GithubAuth "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/config/security/GithubAuthenticationSuccessHandler.java"
    click Cache "https://github.com/otto-de/gitactionboard/blob/main/backend/src/main/java/de/otto/platform/gitactionboard/config/CacheConfig.java"
```
