# pihu-5399/to-do-list architecture

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

- Interactive diagram: https://gitdiagram.com/pihu-5399/to-do-list
- Repository: https://github.com/pihu-5399/to-do-list

## Overview

This is a small React to-do list application. Users add, edit, and delete tasks; the central TodoMain component initializes task state from the context and supplies reducer dispatch to the input and task-list views. The reducer updates the task list and persists mutations in browser localStorage, which the context reads when providing initial data. The excerpts show these application paths, but no separate backend or other product capabilities are documented.

Main entry points: [`src/App.jsx`](https://github.com/pihu-5399/to-do-list/blob/master/src/App.jsx) (App shell), [`src/component/Todomain.jsx`](https://github.com/pihu-5399/to-do-list/blob/master/src/component/Todomain.jsx) (TodoMain), [`src/component/TaskDisplay.jsx`](https://github.com/pihu-5399/to-do-list/blob/master/src/component/TaskDisplay.jsx) (Task display), [`src/reducers/TodoReducers.jsx`](https://github.com/pihu-5399/to-do-list/blob/master/src/reducers/TodoReducers.jsx) (Todo reducer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Task interface"]
  node_app["App shell<br/>[App.jsx]"]
  node_navbar["Task navbar<br/>[Navbar.jsx]"]
  node_main["TodoMain<br/>[Todomain.jsx]"]
  node_input["Task input<br/>[Taskinput.jsx]"]
  node_display["Task display<br/>[TaskDisplay.jsx]"]
  node_modal["Edit modal<br/>[EditModal.jsx]"]
end

subgraph group_state["Task state"]
  node_context["Todo context<br/>[TodoContext.jsx]"]
  node_reducer["Todo reducer<br/>[TodoReducers.jsx]"]
end

node_user(("User"))
node_entry["React entry<br/>[main.jsx]"]
node_storage[("Browser storage")]

node_user -->|"enters tasks"| node_input
node_user -->|"selects actions"| node_display
node_entry -->|"renders"| node_app
node_app -->|"provides state"| node_context
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_main
node_main -->|"reads initial tasks"| node_context
node_main -->|"passes dispatch"| node_input
node_main -->|"passes tasks"| node_display
node_display -->|"renders editor"| node_modal
node_input -->|"dispatches add"| node_reducer
node_display -->|"dispatches delete"| node_reducer
node_modal -->|"dispatches edit"| node_reducer
node_context -->|"reads task list"| node_storage
node_reducer -->|"persists changes"| node_storage

click node_entry "https://github.com/pihu-5399/to-do-list/blob/master/src/main.jsx"
click node_app "https://github.com/pihu-5399/to-do-list/blob/master/src/App.jsx"
click node_navbar "https://github.com/pihu-5399/to-do-list/blob/master/src/component/Navbar.jsx"
click node_main "https://github.com/pihu-5399/to-do-list/blob/master/src/component/Todomain.jsx"
click node_input "https://github.com/pihu-5399/to-do-list/blob/master/src/component/Taskinput.jsx"
click node_display "https://github.com/pihu-5399/to-do-list/blob/master/src/component/TaskDisplay.jsx"
click node_modal "https://github.com/pihu-5399/to-do-list/blob/master/src/component/EditModal.jsx"
click node_context "https://github.com/pihu-5399/to-do-list/blob/master/src/context/TodoContext.jsx"
click node_reducer "https://github.com/pihu-5399/to-do-list/blob/master/src/reducers/TodoReducers.jsx"

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_app,node_navbar,node_main,node_input,node_display,node_modal,node_user toneBlue
class node_context,node_reducer,node_storage toneAmber
class node_entry toneTeal
```

## Components

### Task interface

- [App shell](https://github.com/pihu-5399/to-do-list/blob/master/src/App.jsx): `src/App.jsx`
- [Task navbar](https://github.com/pihu-5399/to-do-list/blob/master/src/component/Navbar.jsx): `src/component/Navbar.jsx`
- [TodoMain](https://github.com/pihu-5399/to-do-list/blob/master/src/component/Todomain.jsx): `src/component/Todomain.jsx`
- [Task input](https://github.com/pihu-5399/to-do-list/blob/master/src/component/Taskinput.jsx): `src/component/Taskinput.jsx`
- [Task display](https://github.com/pihu-5399/to-do-list/blob/master/src/component/TaskDisplay.jsx): `src/component/TaskDisplay.jsx`
- [Edit modal](https://github.com/pihu-5399/to-do-list/blob/master/src/component/EditModal.jsx): `src/component/EditModal.jsx`

### Task state

- [Todo context](https://github.com/pihu-5399/to-do-list/blob/master/src/context/TodoContext.jsx): `src/context/TodoContext.jsx`
- [Todo reducer](https://github.com/pihu-5399/to-do-list/blob/master/src/reducers/TodoReducers.jsx): `src/reducers/TodoReducers.jsx`

### Other components

- **User**
- [React entry](https://github.com/pihu-5399/to-do-list/blob/master/src/main.jsx): `src/main.jsx`
- **Browser storage**

## Connections

- User → Task input: enters tasks (evidence: `src/component/Taskinput.jsx`)
- User → Task display: selects actions (evidence: `src/component/TaskDisplay.jsx`)
- React entry → App shell: renders (evidence: `src/main.jsx`)
- App shell → Todo context: provides state (evidence: `src/App.jsx`)
- App shell → Task navbar: renders (evidence: `src/App.jsx`)
- App shell → TodoMain: renders (evidence: `src/App.jsx`)
- TodoMain → Todo context: reads initial tasks (evidence: `src/component/Todomain.jsx`)
- TodoMain → Task input: passes dispatch (evidence: `src/component/Todomain.jsx`)
- TodoMain → Task display: passes tasks (evidence: `src/component/Todomain.jsx`)
- Task display → Edit modal: renders editor (evidence: `src/component/TaskDisplay.jsx`)
- Task input → Todo reducer: dispatches add (evidence: `src/component/Taskinput.jsx`)
- Task display → Todo reducer: dispatches delete (evidence: `src/component/TaskDisplay.jsx`)
- Edit modal → Todo reducer: dispatches edit (evidence: `src/component/EditModal.jsx`)
- Todo context → Browser storage: reads task list (evidence: `src/context/TodoContext.jsx`)
- Todo reducer → Browser storage: persists changes (evidence: `src/reducers/TodoReducers.jsx`)
