# onurbozkurt/desktime-monthly architecture

> Architecture diagram of the GitHub repository onurbozkurt/desktime-monthly, 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/onurbozkurt/desktime-monthly
- Repository: https://github.com/onurbozkurt/desktime-monthly

## Overview

##### Main Components

a. Client Components:
- CLI Interface (Entry Point)
- Configuration Manager (for .env handling)
- Statistics Processor
- Output Formatter

b. External Components:
- Desktime API
- Environment Configuration

**User Interaction Layer**
- ↓
**Configuration Layer**
- ↓
**Core Processing Layer**
- ↓
**External Service Layer**

##### Specific Elements

a. Components:
- Statistics Processor as a central processing component
- Output Formatter as a formatting component
- Desktime API as an external cloud service

b. Data Flow:
- Environment variables flow from .env to Configuration Manager
- API requests/responses between the Statistics Processor and Desktime API
- Flow of processed data to the Output Formatter
- Final formatted output to the user

##### Important Relationships to Highlight

**[User] → [CLI Interface] → [Configuration Manager]**
- ↓
**[Desktime API] ← [Statistics Processor] → [Output Formatter] → [User]**

##### Technical Details
- HTTP/REST communication with Desktime API
- Environment variable dependencies
- Data transformation flow
- Output formatting process

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef userInteraction fill:#90EE90,stroke:#333,stroke-width:2px
    classDef configuration fill:#FFE4B5,stroke:#333,stroke-width:2px
    classDef processing fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:2px
    classDef output fill:#FFB6C1,stroke:#333,stroke-width:2px

    %% User Interaction Layer
    User((User)):::userInteraction
    CLI[CLI Interface]:::userInteraction
    click CLI "https://github.com/onurbozkurt/desktime-monthly/tree/main/desktime"

    %% Configuration Layer
    Config[Configuration Manager]:::configuration
    click Config "https://github.com/onurbozkurt/desktime-monthly/blob/main/.env.example"
    Dependencies[Dependencies Manager]:::configuration
    click Dependencies "https://github.com/onurbozkurt/desktime-monthly/tree/main/Gemfile"

    %% Core Processing Layer
    StatsProcessor[Statistics Processor]:::processing
    OutputFormatter[Output Formatter]:::processing

    %% External Service Layer
    DesktimeAPI[Desktime API]:::external

    %% Relationships
    User --> CLI
    CLI --> Config
    CLI --> Dependencies
    Config --> StatsProcessor
    Dependencies --> StatsProcessor
    StatsProcessor <--> DesktimeAPI
    StatsProcessor --> OutputFormatter
    OutputFormatter --> User

    %% Legend
    subgraph Legend
        UI[User Interaction]:::userInteraction
        Conf[Configuration]:::configuration
        Proc[Processing]:::processing
        Ext[External Services]:::external
        Out[Output]:::output
    end
```
