# harshana25/todo_list-react architecture

> Architecture diagram of the GitHub repository harshana25/todo_list-react, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harshana25/todo_list-react
- Repository: https://github.com/harshana25/todo_list-react

## Overview

This React todo app lets a user add tasks, mark them complete, remove them, or clear the list. The input and list dispatch actions through the reducer owned by App; App also renders total, completed, and remaining counts. The sampled entry point mounts App, and imports the global stylesheet. Edges reflect these visible calls and dispatches; no persistence or external services are shown.

Main entry points: [`src/App.jsx`](https://github.com/harshana25/todo_list-react/blob/main/src/App.jsx) (Todo app), [`src/reducer/todoReducer.js`](https://github.com/harshana25/todo_list-react/blob/main/src/reducer/todoReducer.js) (Todo reducer), [`src/components/TodoInput.jsx`](https://github.com/harshana25/todo_list-react/blob/main/src/components/TodoInput.jsx) (Todo input), [`src/components/TodoList.jsx`](https://github.com/harshana25/todo_list-react/blob/main/src/components/TodoList.jsx) (Todo list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bootstrap["App bootstrap"]
  node_mount["React mount<br/>[main.jsx]"]
  node_styles["Global styles<br/>[index.css]"]
end

subgraph group_interface["Todo interface"]
  node_app["Todo app<br/>[App.jsx]"]
  node_input["Todo input<br/>[TodoInput.jsx]"]
  node_list["Todo list<br/>[TodoList.jsx]"]
end

subgraph group_state["Todo state"]
  node_reducer["Todo reducer<br/>[todoReducer.js]"]
end

node_user(("User"))

node_mount -->|"renders"| node_app
node_mount -->|"imports"| node_styles
node_app -->|"initializes state"| node_reducer
node_app -->|"renders"| node_input
node_app -->|"renders"| node_list
node_user -->|"adds tasks"| node_input
node_input -->|"dispatches add"| node_reducer
node_user -->|"manages tasks"| node_list
node_list -->|"dispatches changes"| node_reducer
node_user -->|"clears tasks"| node_app
node_app -->|"dispatches clear"| node_reducer

click node_mount "https://github.com/harshana25/todo_list-react/blob/main/src/main.jsx"
click node_app "https://github.com/harshana25/todo_list-react/blob/main/src/App.jsx"
click node_styles "https://github.com/harshana25/todo_list-react/blob/main/src/index.css"
click node_input "https://github.com/harshana25/todo_list-react/blob/main/src/components/TodoInput.jsx"
click node_list "https://github.com/harshana25/todo_list-react/blob/main/src/components/TodoList.jsx"
click node_reducer "https://github.com/harshana25/todo_list-react/blob/main/src/reducer/todoReducer.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_mount,node_styles,node_user toneBlue
class node_app,node_input,node_list toneAmber
class node_reducer toneMint
```

## Components

### App bootstrap

- [React mount](https://github.com/harshana25/todo_list-react/blob/main/src/main.jsx): `src/main.jsx`
- [Global styles](https://github.com/harshana25/todo_list-react/blob/main/src/index.css): `src/index.css`

### Todo interface

- [Todo app](https://github.com/harshana25/todo_list-react/blob/main/src/App.jsx): `src/App.jsx`
- [Todo input](https://github.com/harshana25/todo_list-react/blob/main/src/components/TodoInput.jsx): `src/components/TodoInput.jsx`
- [Todo list](https://github.com/harshana25/todo_list-react/blob/main/src/components/TodoList.jsx): `src/components/TodoList.jsx`

### Todo state

- [Todo reducer](https://github.com/harshana25/todo_list-react/blob/main/src/reducer/todoReducer.js): `src/reducer/todoReducer.js`

### Other components

- **User**

## Connections

- React mount → Todo app: renders (evidence: `src/main.jsx`)
- React mount → Global styles: imports (evidence: `src/main.jsx`)
- Todo app → Todo reducer: initializes state (evidence: `src/App.jsx`)
- Todo app → Todo input: renders (evidence: `src/App.jsx`)
- Todo app → Todo list: renders (evidence: `src/App.jsx`)
- User → Todo input: adds tasks (evidence: `src/components/TodoInput.jsx`)
- Todo input → Todo reducer: dispatches add (evidence: `src/components/TodoInput.jsx`)
- User → Todo list: manages tasks (evidence: `src/components/TodoList.jsx`)
- Todo list → Todo reducer: dispatches changes (evidence: `src/components/TodoList.jsx`)
- User → Todo app: clears tasks (evidence: `src/App.jsx`)
- Todo app → Todo reducer: dispatches clear (evidence: `src/App.jsx`)
