# harytri87/odin-todo-list architecture

> Architecture diagram of the GitHub repository harytri87/odin-todo-list, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harytri87/odin-todo-list
- Repository: https://github.com/harytri87/odin-todo-list

## Overview

Todo List is a browser-based task manager organized around projects and their todos. On startup, the app loads saved projects (or seeds examples), checks recurring reset dates, and renders project categories and tasks. Users can create, edit, complete, and delete projects or todos; those actions update browser storage and refresh the relevant view. Scheduled projects show due dates, while daily, weekly, and monthly projects reset completion state on their respective schedule. The graph follows shown imports and calls; unexcerpted create behavior is included as a capability, but its internal call links are omitted where evidence is unavailable.

Main entry points: [`src/script.js`](https://github.com/harytri87/odin-todo-list/blob/main/src/script.js) (Project and todo state), [`src/index.js`](https://github.com/harytri87/odin-todo-list/blob/main/src/index.js) (DOM startup), [`src/ui-functions/read.js`](https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/read.js) (Project and todo rendering), [`src/ui-functions/trackers.js`](https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/trackers.js) (Navigation and task events)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App startup"]
  node_startup["DOM startup<br/>[index.js]"]
end

subgraph group_domain["Task model and state"]
  node_state["Project and todo state<br/>[script.js]"]
  node_models["Project and todo models<br/>[classes.js]"]
  node_seed["Example projects<br/>[seeder.js]"]
  node_localstorage[("Browser local storage")]
  node_utilities["Date and project helpers<br/>[utilities.js]"]
end

subgraph group_views["Rendering and interaction"]
  node_trackers["Navigation and task events<br/>[trackers.js]"]
  node_create["Project and todo creation<br/>[create.js]"]
  node_edit["Project and todo editing<br/>[edit.js]"]
  node_delete["Project and todo deletion<br/>[delete.js]"]
  node_read["Project and todo rendering<br/>[read.js]"]
  node_template["Todo item template"]
  node_interactive["Interactive UI helper<br/>[interactive-ui.js]"]
end

subgraph group_schedule["Recurring reset"]
  node_reset["Reset date rules<br/>[reset-time.js]"]
end

node_user(("User"))

node_user -->|"uses app"| node_startup
node_startup -->|"checks resets"| node_state
node_startup -->|"renders projects"| node_read
node_startup -->|"registers events"| node_trackers
node_startup -->|"registers listeners"| node_create
node_startup -->|"registers listeners"| node_edit
node_startup -->|"registers listener"| node_delete
node_startup -->|"imports helper"| node_interactive
node_state -->|"loads and saves"| node_localstorage
node_state -->|"defaults to"| node_seed
node_seed -->|"constructs examples"| node_models
node_state -->|"checks schedule"| node_reset
node_reset -->|"saves reset dates"| node_state
node_trackers -->|"looks up and updates"| node_state
node_trackers -->|"renders selected project"| node_read
node_trackers -->|"completes todos"| node_edit
node_trackers -->|"deletes todo"| node_delete
node_edit -->|"updates records"| node_state
node_edit -->|"rerenders completed todo"| node_read
node_delete -->|"deletes records"| node_state
node_delete -->|"refreshes project"| node_read
node_read -->|"reads projects"| node_state
node_read -->|"builds todo items"| node_template
node_read -->|"formats dates"| node_utilities
node_template -->|"formats dates"| node_utilities
node_utilities -->|"finds project"| node_state
node_create -.->|"creates records"| node_state

click node_startup "https://github.com/harytri87/odin-todo-list/blob/main/src/index.js"
click node_state "https://github.com/harytri87/odin-todo-list/blob/main/src/script.js"
click node_models "https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/classes.js"
click node_seed "https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/seeder.js"
click node_reset "https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/reset-time.js"
click node_trackers "https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/trackers.js"
click node_create "https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/create.js"
click node_edit "https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/edit.js"
click node_delete "https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/delete.js"
click node_read "https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/read.js"
click node_template "https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/todo-item-template.js"
click node_utilities "https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/utilities.js"
click node_interactive "https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/interactive-ui.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_startup,node_user toneBlue
class node_state,node_models,node_seed,node_localstorage,node_utilities toneAmber
class node_trackers,node_create,node_edit,node_delete,node_read,node_template,node_interactive toneMint
class node_reset toneRose
```

## Components

### App startup

- [DOM startup](https://github.com/harytri87/odin-todo-list/blob/main/src/index.js): `src/index.js`

### Task model and state

- [Project and todo state](https://github.com/harytri87/odin-todo-list/blob/main/src/script.js): `src/script.js`
- [Project and todo models](https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/classes.js): `src/utilities/classes.js`
- [Example projects](https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/seeder.js): `src/utilities/seeder.js`
- **Browser local storage**
- [Date and project helpers](https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/utilities.js): `src/utilities/utilities.js`

### Rendering and interaction

- [Navigation and task events](https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/trackers.js): `src/ui-functions/trackers.js`
- [Project and todo creation](https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/create.js): `src/ui-functions/create.js`
- [Project and todo editing](https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/edit.js): `src/ui-functions/edit.js`
- [Project and todo deletion](https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/delete.js): `src/ui-functions/delete.js`
- [Project and todo rendering](https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/read.js): `src/ui-functions/read.js`
- [Todo item template](https://github.com/harytri87/odin-todo-list/blob/main/src/ui-functions/todo-item-template.js): `src/ui-functions/todo-item-template.js`
- [Interactive UI helper](https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/interactive-ui.js): `src/utilities/interactive-ui.js`

### Recurring reset

- [Reset date rules](https://github.com/harytri87/odin-todo-list/blob/main/src/utilities/reset-time.js): `src/utilities/reset-time.js`

### Other components

- **User**

## Connections

- User → DOM startup: uses app (evidence: `src/index.js`)
- DOM startup → Project and todo state: checks resets (evidence: `src/index.js`)
- DOM startup → Project and todo rendering: renders projects (evidence: `src/index.js`)
- DOM startup → Navigation and task events: registers events (evidence: `src/index.js`)
- DOM startup → Project and todo creation: registers listeners (evidence: `src/index.js`)
- DOM startup → Project and todo editing: registers listeners (evidence: `src/index.js`)
- DOM startup → Project and todo deletion: registers listener (evidence: `src/index.js`)
- DOM startup → Interactive UI helper: imports helper (evidence: `src/index.js`)
- Project and todo state → Browser local storage: loads and saves (evidence: `src/script.js`)
- Project and todo state → Example projects: defaults to (evidence: `src/script.js`)
- Example projects → Project and todo models: constructs examples (evidence: `src/utilities/seeder.js`)
- Project and todo state → Reset date rules: checks schedule (evidence: `src/script.js`)
- Reset date rules → Project and todo state: saves reset dates (evidence: `src/utilities/reset-time.js`)
- Navigation and task events → Project and todo state: looks up and updates (evidence: `src/ui-functions/trackers.js`)
- Navigation and task events → Project and todo rendering: renders selected project (evidence: `src/ui-functions/trackers.js`)
- Navigation and task events → Project and todo editing: completes todos (evidence: `src/ui-functions/trackers.js`)
- Navigation and task events → Project and todo deletion: deletes todo (evidence: `src/ui-functions/trackers.js`)
- Project and todo editing → Project and todo state: updates records (evidence: `src/ui-functions/edit.js`)
- Project and todo editing → Project and todo rendering: rerenders completed todo (evidence: `src/ui-functions/edit.js`)
- Project and todo deletion → Project and todo state: deletes records (evidence: `src/ui-functions/delete.js`)
- Project and todo deletion → Project and todo rendering: refreshes project (evidence: `src/ui-functions/delete.js`)
- Project and todo rendering → Project and todo state: reads projects (evidence: `src/ui-functions/read.js`)
- Project and todo rendering → Todo item template: builds todo items (evidence: `src/ui-functions/read.js`)
- Project and todo rendering → Date and project helpers: formats dates (evidence: `src/ui-functions/read.js`)
- Todo item template → Date and project helpers: formats dates (evidence: `src/ui-functions/todo-item-template.js`)
- Date and project helpers → Project and todo state: finds project (evidence: `src/utilities/utilities.js`)
- Project and todo creation → Project and todo state: creates records (evidence: `src/ui-functions/create.js`)
