# pishone-accuknox/actionboard architecture

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

- Interactive diagram: https://gitdiagram.com/pishone-accuknox/actionboard
- Repository: https://github.com/pishone-accuknox/actionboard

## Overview

##### Main System Components

The system architecture should be represented with these key components:

a) Frontend Layer:
- React/TypeScript Application (Main UI)
- Component Structure
- Data Visualization Elements
- UI Component Library (shadcn-ui)

b) Data Collection Layer:
- Python Script (actionboard_data_collector.py)
- GitHub Actions Integration

c) Data Storage Layer:
- JSON Data Files
- Workflow Metrics Storage

**┌─ Frontend Layer ─────────────────┐**
- ┌─ UI Components ──┐            │
- Dashboard      │            │
- Charts        │            │
- Time Analysis │            │
- ┘            │
- ┌─ Data Management ─┐          │
- State Handling  │          │
- Data Fetching   │          │
- ┘          │
- ┘

**┌─ Data Collection Layer ─────────┐**
- Python Script                   │
- (GitHub Actions Data Collector) │
- ┘

**┌─ Storage Layer ────────────────┐**
- ┌─ JSON Files ───┐            │
- Daily Trends │            │
- Failed Runs  │            │
- Workflow Runs│            │
- ┘            │
- ┘

##### Component Relationships

- Data flow from GitHub Actions to Python collector
- Data storage flow from collector to JSON files
- Data consumption flow from storage to frontend components
- Component interactions within the frontend layer

##### Important Implementation Details to Highlight

a) Frontend Architecture:
- Component hierarchy (Dashboard → Charts/Analysis Components)
- UI component library integration
- Hooks and utility functions organization

b) Data Collection:
- GitHub Actions workflow integration
- Automated data collection process
- Data transformation flow

c) Storage:
- Structure of JSON data files
- Data update frequency
- Data access patterns

##### Technical Stack Indicators

Technology badges or labels for:
- Vite (Build tool)
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
- Python

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Frontend
        App["Main UI Application"]
        Dashboard["Dashboard Component"]
        
        subgraph Visualization
            DailyTrend["Daily Trend Chart"]
            TimeAnalysis["Time Analysis"]
            WorkflowFailures["Workflow Failures"]
        end
        
        subgraph Components
            ThemeProvider["Theme Provider"]
            DatePicker["Date Range Picker"]
            UI["UI Component Library"]
        end
        
        subgraph Utils
            Hooks["Custom Hooks"]
            Utils["Utility Functions"]
        end
        
        App --> Dashboard
        Dashboard --> Visualization
        Dashboard --> Components
        Dashboard --> Utils
    end
    
    subgraph Collection
        GHActions["GitHub Actions"]
        PythonScript["Data Collector Script"]
        GHActions --> PythonScript
    end
    
    subgraph Storage
        DailyTrendJSON["Daily Trend Data"]
        FailedRunsJSON["Failed Runs Data"]
        WorkflowRunsJSON["Workflow Runs Data"]
    end
    
    PythonScript --> Storage
    Storage --> Dashboard
    
    %% Click Events
    click App "https://github.com/pishone-accuknox/ActionBoard/blob/main/src/App.tsx"
    click Dashboard "https://github.com/pishone-accuknox/ActionBoard/blob/main/src/components/Dashboard.tsx"
    click DailyTrend "https://github.com/pishone-accuknox/ActionBoard/blob/main/src/components/DailyTrendChart.tsx"
    click TimeAnalysis "https://github.com/pishone-accuknox/ActionBoard/blob/main/src/components/TimeAnalysis.tsx"
    click WorkflowFailures "https://github.com/pishone-accuknox/ActionBoard/blob/main/src/components/WorkflowFailures.tsx"
    click UI "https://github.com/pishone-accuknox/ActionBoard/tree/main/src/components/ui/"
    click PythonScript "https://github.com/pishone-accuknox/ActionBoard/blob/main/actionboard_data_collector.py"
    click GHActions "https://github.com/pishone-accuknox/ActionBoard/blob/main/.github/workflows/fetch-metrics.yml"
    click DailyTrendJSON "https://github.com/pishone-accuknox/ActionBoard/blob/main/data/daily_trend.json"
    click FailedRunsJSON "https://github.com/pishone-accuknox/ActionBoard/blob/main/data/failed_runs.json"
    click WorkflowRunsJSON "https://github.com/pishone-accuknox/ActionBoard/blob/main/data/workflow_runs.json"
    click ThemeProvider "https://github.com/pishone-accuknox/ActionBoard/blob/main/src/components/ThemeProvider.tsx"
    click DatePicker "https://github.com/pishone-accuknox/ActionBoard/blob/main/src/components/DateRangePicker.tsx"
    click Utils "https://github.com/pishone-accuknox/ActionBoard/blob/main/src/lib/utils.ts"
    click Hooks "https://github.com/pishone-accuknox/ActionBoard/tree/main/src/hooks"
    
    %% Styling
    classDef frontend fill:#3b82f6,color:white
    classDef collection fill:#22c55e,color:white
    classDef storage fill:#eab308,color:white
    classDef external fill:#6b7280,color:white
    
    class App,Dashboard,DailyTrend,TimeAnalysis,WorkflowFailures,ThemeProvider,DatePicker,UI,Hooks,Utils frontend
    class PythonScript collection
    class DailyTrendJSON,FailedRunsJSON,WorkflowRunsJSON storage
    class GHActions external
    
    %% Legend
    subgraph Legend
        Frontend_["Frontend"]:::frontend
        Collection_["Collection"]:::collection
        Storage_["Storage"]:::storage
        External_["External"]:::external
    end
```
