# monsieurluge/later-on architecture

> Architecture diagram of the GitHub repository monsieurluge/later-on, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/monsieurluge/later-on
- Repository: https://github.com/monsieurluge/later-on

## Overview

##### Project Type & Purpose
- This is a client-side, single-page TODO application built with Vue.js.
- It uses Vue Router for navigation, Pinia for state management, and persists data to browser localStorage.
- A plugin subsystem provides theming capabilities.

##### Main Components
a. Browser / User Agent (UI host)
b. Vue Application (SPA)
- Entry Point: main.js
- Core Framework: Vue.js
c. Router Layer
- vue-router (router.js / routes.js)
- Route targets: TasksPage.vue
d. UI Component Hierarchy
- App.vue
- Page: TasksPage.vue
- Reusable Components: AppHeader, TasksList, TaskItem, TaskAddForm, CollectionsNav, etc.
e. State Management
- Pinia Stores: appState.js, tasks.js
- Composables: piniaLocalStorage (persist), taskDropZone
f. Persistence
g. Plugins / Extensions
- theme-editor plugin (modules + processors + shared utilities)
- theme and themes plugins
h. Common Utilities
- src/common: taskSizes.js, utils.js

##### Relationships & Data Flows
- User interacts with UI components → events emit to components → components call Pinia store actions.
- Pinia actions update state → state is reactive → UI re-renders.
- piniaLocalStorage plugin hooks into store lifecycle → reads/writes state to localStorage.
- Router intercepts navigation events → loads the correct page component.
- theme-editor plugin provides a UI overlay (or editor) that manipulates CSS variables; its processors convert HSL/HEX and update DOM.

##### Important Patterns & Principles
- SPA architecture: clear separation of routing, UI, and state.
- Component-driven design: break UI into small, reusable Vue components.
- Unidirectional data flow via Pinia (similar to Vuex patterns).
- Local persistence plugin abstracts localStorage read/write.
- Plugin subsystem for extensibility (theme-editor).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Browser
    Browser["Browser (User)"]:::external
    click Browser "https://github.com/monsieurluge/later-on/blob/main/src/main.js"

    %% Vue SPA Container
    subgraph "Vue SPA (main.js)"
        Main["main.js"]:::core
        click Main "https://github.com/monsieurluge/later-on/blob/main/src/main.js"

        %% Router Layer
        subgraph "Router Layer"
            RouterConfig["router.js"]:::router
            click RouterConfig "https://github.com/monsieurluge/later-on/blob/main/src/router.js"
            RouteDefs["routes.js"]:::router
            click RouteDefs "https://github.com/monsieurluge/later-on/blob/main/src/routes.js"
        end

        %% UI Components Layer
        subgraph "UI Components Layer"
            App["App.vue"]:::ui
            click App "https://github.com/monsieurluge/later-on/blob/main/src/App.vue"
            TasksPage["TasksPage.vue"]:::ui
            click TasksPage "https://github.com/monsieurluge/later-on/blob/main/src/pages/TasksPage.vue"
            AppHeader["AppHeader.vue"]:::ui
            click AppHeader "https://github.com/monsieurluge/later-on/blob/main/src/components/AppHeader.vue"
            TasksList["TasksList.vue"]:::ui
            click TasksList "https://github.com/monsieurluge/later-on/blob/main/src/components/TasksList.vue"
            TaskItem["TaskItem.vue"]:::ui
            click TaskItem "https://github.com/monsieurluge/later-on/blob/main/src/components/TaskItem.vue"
            TaskAddForm["TaskAddForm.vue"]:::ui
            click TaskAddForm "https://github.com/monsieurluge/later-on/blob/main/src/components/TaskAddForm.vue"
            CollectionsNav["CollectionsNav.vue"]:::ui
            click CollectionsNav "https://github.com/monsieurluge/later-on/blob/main/src/components/CollectionsNav.vue"
            ActionButton["ActionButton.vue"]:::ui
            click ActionButton "https://github.com/monsieurluge/later-on/blob/main/src/components/ActionButton.vue"
            CollectionsNavAddButton["CollectionsNavAddButton.vue"]:::ui
            click CollectionsNavAddButton "https://github.com/monsieurluge/later-on/blob/main/src/components/CollectionsNavAddButton.vue"
            CollectionsNavLink["CollectionsNavLink.vue"]:::ui
            click CollectionsNavLink "https://github.com/monsieurluge/later-on/blob/main/src/components/CollectionsNavLink.vue"
            DummyTaskItem["DummyTaskItem.vue"]:::ui
            click DummyTaskItem "https://github.com/monsieurluge/later-on/blob/main/src/components/DummyTaskItem.vue"
            FakeTaskItem["FakeTaskItem.vue"]:::ui
            click FakeTaskItem "https://github.com/monsieurluge/later-on/blob/main/src/components/FakeTaskItem.vue"
            FullSizeButton["FullSizeButton.vue"]:::ui
            click FullSizeButton "https://github.com/monsieurluge/later-on/blob/main/src/components/FullSizeButton.vue"
            ItemIcon["ItemIcon.vue"]:::ui
            click ItemIcon "https://github.com/monsieurluge/later-on/blob/main/src/components/ItemIcon.vue"
            TaskItemInput["TaskItemInput.vue"]:::ui
            click TaskItemInput "https://github.com/monsieurluge/later-on/blob/main/src/components/TaskItemInput.vue"
            TaskListHeaderDropZone["TaskListHeaderDropZone.vue"]:::ui
            click TaskListHeaderDropZone "https://github.com/monsieurluge/later-on/blob/main/src/components/TaskListHeaderDropZone.vue"
            TasksListHeader["TasksListHeader.vue"]:::ui
            click TasksListHeader "https://github.com/monsieurluge/later-on/blob/main/src/components/TasksListHeader.vue"
        end

        %% State Layer
        subgraph "State Layer"
            AppState["appState.js"]:::state
            click AppState "https://github.com/monsieurluge/later-on/blob/main/src/stores/appState.js"
            TasksStore["tasks.js"]:::state
            click TasksStore "https://github.com/monsieurluge/later-on/blob/main/src/stores/tasks.js"
            piniaLocalStorage["piniaLocalStorage.js"]:::persistence
            click piniaLocalStorage "https://github.com/monsieurluge/later-on/blob/main/src/composables/piniaLocalStorage.js"
            taskDropZone["taskDropZone.js"]:::state
            click taskDropZone "https://github.com/monsieurluge/later-on/blob/main/src/composables/taskDropZone.js"
        end

        %% Plugin Layer
        subgraph "Plugin Layer"
            subgraph "theme-editor"
                themeEditorCore["theme-editor.js"]:::plugin
                click themeEditorCore "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme-editor/theme-editor.js"
                colorScheme["color-scheme-display.module.js"]:::plugin
                click colorScheme "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme-editor/color-scheme-display.module.js"
                rotaryEncoder["rotary-encoder.module.js"]:::plugin
                click rotaryEncoder "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme-editor/rotary-encoder.module.js"
                hexProcessor["hex-converter.processor.js"]:::plugin
                click hexProcessor "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme-editor/hex-converter.processor.js"
                hslProcessor["hsl-converter.processor.js"]:::plugin
                click hslProcessor "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme-editor/hsl-converter.processor.js"
                sharedColor["shared/color.js"]:::plugin
                click sharedColor "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme-editor/shared/color.js"
                sharedDOM["shared/dom-element.js"]:::plugin
                click sharedDOM "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme-editor/shared/dom-element.js"
                styleCSS["style.css"]:::plugin
                click styleCSS "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme-editor/style.css"
            end
            themePlugin["theme.js"]:::plugin
            click themePlugin "https://github.com/monsieurluge/later-on/blob/main/src/plugins/theme.js"
            themesPlugin["themes.js"]:::plugin
            click themesPlugin "https://github.com/monsieurluge/later-on/blob/main/src/plugins/themes.js"
        end
    end

    %% Persistence
    LocalStorage[(localStorage)]:::persistence

    %% Common Utilities
    subgraph "Common Utilities"
        TaskSizes["taskSizes.js"]:::utility
        click TaskSizes "https://github.com/monsieurluge/later-on/blob/main/src/common/taskSizes.js"
        Utils["utils.js"]:::utility
        click Utils "https://github.com/monsieurluge/later-on/blob/main/src/common/utils.js"
    end

    %% Assets
    subgraph "Assets"
        Styles["styles.css"]:::asset
        click Styles "https://github.com/monsieurluge/later-on/blob/main/src/assets/styles.css"
        Font["Holen Vintage.otf"]:::asset
        click Font "https://github.com/monsieurluge/later-on/blob/main/src/assets/Holen Vintage.otf"
    end

    %% Connections
    Browser --> Main
    Main --> RouterConfig
    Main --> RouteDefs
    RouterConfig --> TasksPage
    App --> TasksPage
    TasksPage --> TasksList
    TasksPage --> TaskAddForm
    TasksPage --> CollectionsNav
    TaskAddForm --> TasksStore
    TasksStore --> TasksList
    AppState --> piniaLocalStorage
    TasksStore --> piniaLocalStorage
    piniaLocalStorage --> AppState
    piniaLocalStorage --> TasksStore
    TasksStore --> TaskListHeaderDropZone
    TaskListHeaderDropZone --> taskDropZone
    AppHeader --> themeEditorCore
    themeEditorCore --> hexProcessor
    themeEditorCore --> hslProcessor
    themePlugin --> themeEditorCore
    themesPlugin --> themeEditorCore
    TasksStore --> Utils
    themeEditorCore --> Utils
    RouterConfig --> Utils
    TaskSizes --> TaskItem
    LocalStorage <-- piniaLocalStorage
    piniaLocalStorage --> LocalStorage

    %% Styles
    classDef ui fill:#D0E8FF,stroke:#000
    classDef state fill:#DFFFD0,stroke:#000
    classDef persistence fill:#EEEEEE,stroke:#000
    classDef plugin fill:#FFD8A8,stroke:#000
    classDef router fill:#E0E0FF,stroke:#000
    classDef core fill:#CCCCFF,stroke:#000
    classDef external fill:#FFCCCC,stroke:#000
    classDef utility fill:#F0F0F0,stroke:#000
    classDef asset fill:#F8F0FF,stroke:#000
```
