# bmardock/analog-todo architecture

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

## Overview

Project Type: This is a web-based task management application with a focus on analog-style todo cards and habit formation.

##### Main Components

a. Frontend Layer:
- UI Components (templates/)
- Calendar View
- Todo Cards (Today/Next/Someday)
- Goal Management
- Export Interface
- QR Code Generation
- Static Assets
- CSS (calendar.css, todo.css)
- Images (imgs/)

b. Application Logic Layer:
- Task Management (calendar.js)
- Database Operations (database.js)
- Export Functionality (export.js)
- Goal Tracking (goal.js)
- Global Utilities (global.js)

c. Data Layer:
- A component for local storage/browser database
- Data models for:
- Tasks
- Goals
- User Preferences
- Progress Tracking

##### Interaction Flows

- User Interface → JavaScript Modules
- JavaScript Modules → Data Layer
- Data Layer → JavaScript Modules → UI Updates

##### Future Integration Points
- Chatbot Assistant
- Reminder System
- Task Generation AI

##### The integration between different time horizons (Today/Next/Someday)

Remember to maintain a balance between showing the system's simplicity while accurately representing its sophisticated habit-forming and goal-tracking capabilities.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        UI[User Interface]
        CV["Calendar View"]
        TC["Todo Cards"]
        GM["Goal Management"]
        EI["Export Interface"]
        QR["QR Code Generator"]
        
        subgraph StaticAssets
            CSS["Stylesheets"]
            IMG["Images"]
        end
    end

    subgraph AppLogic
        TM["Task Management"]
        DB["Database Operations"]
        EX["Export Module"]
        GT["Goal Tracking"]
        GU["Global Utilities"]
    end

    subgraph DataLayer
        LS[(Local Storage)]
        
        subgraph DataModels
            TKS[Tasks]
            GLS[Goals]
            UP[User Preferences]
            PT[Progress Tracking]
        end
    end

    subgraph FutureV4
        direction TB
        CB["Chatbot Assistant"]:::future
        RS["Reminder System"]:::future
        TG["Task Generation AI"]:::future
    end

    %% Core Feature Sections
    subgraph TaskManagement
        TD["Today Card"]
        NX["Next Card"]
        SD["Someday Card"]
    end

    subgraph GoalFramework
        STG["Short-term Goals"]
        MTG["Mid-term Goals"]
        LTG["Long-term Goals"]
    end

    subgraph TimeManagement
        MIT["Most Important Tasks"]
        QS["4 Quadrant System"]
        FT["Focus Tracking"]
    end

    %% Connections
    UI --> CV & TC & GM & EI & QR
    CV & TC & GM --> TM
    TM --> DB
    DB --> LS
    GT --> GLS
    EI --> EX
    EX --> DB

    %% Click Events
    click CV "https://github.com/bmardock/analog-todo/blob/main/templates/calendar.html"
    click TC "https://github.com/bmardock/analog-todo/blob/main/templates/card.html"
    click GM "https://github.com/bmardock/analog-todo/blob/main/templates/goal.html"
    click EI "https://github.com/bmardock/analog-todo/blob/main/templates/export.html"
    click QR "https://github.com/bmardock/analog-todo/blob/main/templates/qrcode.html"
    click TM "https://github.com/bmardock/analog-todo/blob/main/js/calendar.js"
    click DB "https://github.com/bmardock/analog-todo/blob/main/js/database.js"
    click EX "https://github.com/bmardock/analog-todo/blob/main/js/export.js"
    click GT "https://github.com/bmardock/analog-todo/blob/main/js/goal.js"
    click GU "https://github.com/bmardock/analog-todo/blob/main/js/global.js"
    click RS "https://github.com/bmardock/analog-todo/blob/main/templates/reminder.html"

    %% Styling
    classDef future stroke-dasharray: 5 5
    classDef frontend fill:#a8d1f0
    classDef logic fill:#90EE90
    classDef data fill:#FFE5B4

    class UI,CV,TC,GM,EI,QR,StaticAssets frontend
    class TM,DB,EX,GT,GU logic
    class DataLayer,LS,DataModels,TKS,GLS,UP,PT data
    class CB,RS,TG future

    %% Legend
    subgraph Legend
        L1["Frontend Component"]:::frontend
        L2["Logic Module"]:::logic
        L3["Data Storage"]:::data
        L4["Future Feature"]:::future
    end
```
