Skip to content

Latest commit

 

History

History
96 lines (61 loc) · 6.92 KB

File metadata and controls

96 lines (61 loc) · 6.92 KB
graph LR
    BaseLoader["BaseLoader"]
    GitHubLoader["GitHubLoader"]
    StravaLoader["StravaLoader"]
    GenericConcreteLoader["GenericConcreteLoader"]
    CLI_Orchestrator["CLI/Orchestrator"]
    External_Data_Sources["External Data Sources"]
    Cache_History_Files["Cache/History Files"]
    BaseLoader -- "is inherited by" --> GitHubLoader
    BaseLoader -- "is inherited by" --> StravaLoader
    BaseLoader -- "is inherited by" --> GenericConcreteLoader
    CLI_Orchestrator -- "configures" --> GitHubLoader
    CLI_Orchestrator -- "configures" --> StravaLoader
    CLI_Orchestrator -- "configures" --> GenericConcreteLoader
    CLI_Orchestrator -- "requests data from" --> GitHubLoader
    CLI_Orchestrator -- "requests data from" --> StravaLoader
    CLI_Orchestrator -- "requests data from" --> GenericConcreteLoader
    GitHubLoader -- "retrieves raw data from" --> External_Data_Sources
    GitHubLoader -- "interacts with" --> Cache_History_Files
    StravaLoader -- "retrieves raw data from" --> External_Data_Sources
    StravaLoader -- "interacts with" --> Cache_History_Files
    GenericConcreteLoader -- "retrieves raw data from" --> External_Data_Sources
    GenericConcreteLoader -- "interacts with" --> Cache_History_Files
    click CLI_Orchestrator href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/GitHubPoster/CLI_Orchestrator.md" "Details"
Loading

CodeBoardingDemoContact

Details

This subsystem focuses on the robust and extensible data loading mechanism for the github_poster project. It is designed around an abstract BaseLoader that defines a common interface for fetching and normalizing activity data from various external sources. Concrete implementations, such as GitHubLoader, StravaLoader, and other GenericConcreteLoader instances, extend this base to handle specific API interactions and data formats. The CLI/Orchestrator acts as the primary consumer, initiating data requests and configuring the appropriate loaders. Data persistence and historical tracking are managed through Cache/History Files, while raw data is retrieved from diverse External Data Sources. This architecture ensures modularity, allowing easy integration of new data sources without altering the core processing logic.

BaseLoader

Defines the abstract interface and common functionalities for all data loaders. It establishes a standardized contract for fetching and normalizing activity data, including dependency checks and year list generation, ensuring consistency across different data sources.

Related Classes/Methods:

GitHubLoader

A concrete data adapter responsible for fetching raw activity data specifically from the GitHub API. It handles GitHub-specific API interactions, authentication, and parsing, then normalizes the data into the consistent internal format defined by BaseLoader.

Related Classes/Methods:

StravaLoader

A concrete data adapter dedicated to fetching raw activity data from the Strava API. It manages Strava-specific API calls, token management, and data parsing, subsequently normalizing the data to align with the BaseLoader's defined structure.

Related Classes/Methods:

GenericConcreteLoader

This represents the pattern for other concrete data loaders (e.g., AutoSleep, Apple Health, Bilibili, Garmin, Leetcode, Todoist, Wakatime). Each GenericConcreteLoader connects to its respective external service, fetches raw data, and normalizes it into the consistent internal format, adhering to the BaseLoader interface.

Related Classes/Methods:

CLI/Orchestrator [Expand]

Represents the command-line interface or a higher-level orchestration component that initiates the data loading process. It selects and configures specific BaseLoader implementations based on user input or predefined settings, triggering data retrieval and processing.

Related Classes/Methods: None

External Data Sources

Represents various external APIs and file systems (e.g., GitHub API, Strava API, Apple Health export files) from which raw activity data is retrieved by the concrete loader implementations.

Related Classes/Methods: None

Cache/History Files

Represents local files or a caching mechanism used by loaders to store historical data or intermediate results, preventing redundant API calls and enabling incremental updates.

Related Classes/Methods: None