# lea-rn/todo architecture

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

- Interactive diagram: https://gitdiagram.com/lea-rn/todo
- Repository: https://github.com/lea-rn/todo

## Overview

This is a small React to-do app. The entry point mounts the app; users add tasks through a form, then view, edit, complete, or delete them in a list. App owns the in-memory task state and completion counts. The source index shows the entry-point wiring, and the excerpts show component rendering and callbacks. Performance reporting is also initialized at startup; no persistent store or backend is shown.

Main entry points: [`src/App.js`](https://github.com/lea-rn/todo/blob/main/src/App.js) (Task state and stats), [`src/components/TodoForm.jsx`](https://github.com/lea-rn/todo/blob/main/src/components/TodoForm.jsx) (Task form), [`src/index.js`](https://github.com/lea-rn/todo/blob/main/src/index.js) (React entry), [`src/components/TodoList.jsx`](https://github.com/lea-rn/todo/blob/main/src/components/TodoList.jsx) (Task list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["App startup"]
  node_entry["React entry<br/>[index.js]"]
end

subgraph group_tasks["Task management"]
  node_app["Task state and stats<br/>[App.js]"]
  node_form["Task form<br/>[TodoForm.jsx]"]
  node_list["Task list<br/>[TodoList.jsx]"]
  node_item["Task item<br/>[TodoList.jsx]"]
end

subgraph group_telemetry["Performance reporting"]
  node_vitals["Vitals reporter<br/>[reportWebVitals.js]"]
end

node_user(("User"))
node_webvitals["web-vitals package"]

node_entry -->|"mounts"| node_app
node_entry -->|"invokes"| node_vitals
node_user -->|"enters tasks"| node_form
node_form -->|"submits text"| node_app
node_app -->|"renders"| node_form
node_app -->|"renders tasks"| node_list
node_list -->|"renders each"| node_item
node_item -->|"invokes task actions"| node_app
node_vitals -->|"loads metrics"| node_webvitals

click node_entry "https://github.com/lea-rn/todo/blob/main/src/index.js"
click node_app "https://github.com/lea-rn/todo/blob/main/src/App.js"
click node_form "https://github.com/lea-rn/todo/blob/main/src/components/TodoForm.jsx"
click node_list "https://github.com/lea-rn/todo/blob/main/src/components/TodoList.jsx"
click node_item "https://github.com/lea-rn/todo/blob/main/src/components/TodoList.jsx"
click node_vitals "https://github.com/lea-rn/todo/blob/main/src/reportWebVitals.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_entry,node_user toneBlue
class node_app,node_form,node_list,node_item toneAmber
class node_vitals toneMint
class node_webvitals toneIndigo
```

## Components

### App startup

- [React entry](https://github.com/lea-rn/todo/blob/main/src/index.js): `src/index.js`

### Task management

- [Task state and stats](https://github.com/lea-rn/todo/blob/main/src/App.js): `src/App.js`
- [Task form](https://github.com/lea-rn/todo/blob/main/src/components/TodoForm.jsx): `src/components/TodoForm.jsx`
- [Task list](https://github.com/lea-rn/todo/blob/main/src/components/TodoList.jsx): `src/components/TodoList.jsx`
- [Task item](https://github.com/lea-rn/todo/blob/main/src/components/TodoList.jsx): `src/components/TodoList.jsx`

### Performance reporting

- [Vitals reporter](https://github.com/lea-rn/todo/blob/main/src/reportWebVitals.js): `src/reportWebVitals.js`

### Other components

- **User**
- **web-vitals package**

## Connections

- React entry → Task state and stats: mounts (evidence: `src/index.js`)
- React entry → Vitals reporter: invokes (evidence: `src/index.js`)
- User → Task form: enters tasks (evidence: `src/components/TodoForm.jsx`)
- Task form → Task state and stats: submits text (evidence: `src/components/TodoForm.jsx`)
- Task state and stats → Task form: renders (evidence: `src/App.js`)
- Task state and stats → Task list: renders tasks (evidence: `src/App.js`)
- Task list → Task item: renders each (evidence: `src/components/TodoList.jsx`)
- Task item → Task state and stats: invokes task actions (evidence: `src/components/TodoList.jsx`)
- Vitals reporter → web-vitals package: loads metrics (evidence: `src/reportWebVitals.js`)
