# rickoneeleven/gptodoist architecture

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

## Overview

##### Main Components

a) Core Application Layer:

b) Helper Module Layer:
- Task Management Group:
- helper_tasks.py
- helper_todoist_part1.py
- helper_todoist_part2.py
- Time Management Group:
- helper_timesheets.py
- helper_diary.py
- Utility Group:
- helper_general.py
- helper_parse.py
- helper_regex.py

c) External Services Layer:
- Todoist API Integration
- OpenAI API Integration

d) Configuration Layer:
- Environment Variables
- JSON Configuration Files (j_todoist_filters.json)

##### Relationships and Data Flow

- Helper modules → External services (API calls)
- Configuration → Main controller (configuration flow)
- Helper modules → Other helper modules (internal dependencies)

**[Configuration Layer]**
- ↓
**[External Services Layer]**
- ↓
**[Core Application Layer]**
- ↓
**[Helper Module Layer]**

##### Additional Elements

- Component groupings
- Configuration dependencies

##### Technical Details to Highlight

- How the helper modules interact with each other
- Where environment variables are used
- Points where external API calls are made
- Flow of task management and filtering

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef core fill:#2374f7,color:white
    classDef helper fill:#47d147,color:white
    classDef external fill:#ffd700,color:black
    classDef config fill:#808080,color:white
    classDef utility fill:#98FB98,color:black

    %% Configuration Layer
    subgraph ConfigLayer
        ENV[Environment Variables]:::config
        JSON[JSON Configurations]:::config
    end

    %% External Services Layer
    subgraph ExternalServices
        TODOIST[Todoist API]:::external
        OPENAI[OpenAI API]:::external
    end

    %% Core Application Layer
    MAIN[Main Application Controller]:::core
    click MAIN "https://github.com/rickoneeleven/GPTodoist/blob/master/main.py"

    %% Helper Module Layer
    subgraph TaskManagement
        TASKS[Task Handler]:::helper
        TOD1[Todoist Integration Primary]:::helper
        TOD2[Todoist Integration Secondary]:::helper
        click TASKS "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_tasks.py"
        click TOD1 "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_todoist_part1.py"
        click TOD2 "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_todoist_part2.py"
    end

    subgraph TimeManagement
        TIME[Timesheet Handler]:::helper
        DIARY[Diary Handler]:::helper
        click TIME "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_timesheets.py"
        click DIARY "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_diary.py"
    end

    subgraph UtilityModules
        GEN[General Utilities]:::utility
        PARSE[Parse Utilities]:::utility
        REGEX[Regex Utilities]:::utility
        CMD[Command Interface]:::utility
        TRACK[Module Tracking System]:::utility
        click GEN "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_general.py"
        click PARSE "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_parse.py"
        click REGEX "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_regex.py"
        click CMD "https://github.com/rickoneeleven/GPTodoist/blob/master/helper_commands.py"
        click TRACK "https://github.com/rickoneeleven/GPTodoist/blob/master/module_call_counter.py"
    end

    %% Relationships
    ConfigLayer --> MAIN
    MAIN --> TaskManagement
    MAIN --> TimeManagement
    MAIN --> UtilityModules
    
    TASKS --> TOD1
    TOD1 --> TOD2
    TOD1 --> TODOIST
    TOD2 --> TODOIST
    
    TIME --> GEN
    DIARY --> GEN
    
    TASKS --> PARSE
    TASKS --> REGEX
    
    MAIN --> TRACK
    
    TOD1 --> OPENAI
    TOD2 --> OPENAI

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[Helper Modules]:::helper
        L3[External Services]:::external
        L4[Configuration]:::config
        L5[Utility Modules]:::utility
    end
```
