# ferreiraarth/js architecture

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

- Interactive diagram: https://gitdiagram.com/ferreiraarth/js
- Repository: https://github.com/ferreiraarth/js

## Overview

This repository is a collection of standalone JavaScript learning exercises, not a single integrated application. Its main user-facing work is DOM interaction, including a task manager; other branches demonstrate JavaScript fundamentals and small applied calculations/reports. The task manager’s internal state, filtering, rendering, and browser storage are separated below. The graph reflects the sampled scripts and filenames; many exercises are independent, so no shared runtime pipeline is implied.

Main entry points: [`SitemaDeTarefas/script.js`](https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js) (Task Interactions), [`TestesConjuntos/carrinhoDeCompras.js`](https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/carrinhoDeCompras.js) (Shopping Cart), [`DOM/01/script.js`](https://github.com/ferreiraarth/js/blob/main/DOM/01/script.js) (DOM Basics), [`DOM/02 - Contador/script.js`](https://github.com/ferreiraarth/js/blob/main/DOM/02%20-%20Contador/script.js) (Counter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dom["DOM Exercises"]
  node_dom_basics["DOM Basics<br/>[script.js]"]
  node_counter["Counter<br/>[script.js]"]
  node_input_greeting["Input Greeting<br/>[script.js]"]
  node_theme_toggle["Theme Toggle<br/>[script.js]"]
  node_registration["Registration Form<br/>[script.js]"]
  node_class_toggle["Class Toggle<br/>[script.js]"]
  node_list_challenge["List Challenge<br/>[script.js]"]
  node_product_list["Product List<br/>[script.js]"]
end

subgraph group_tasks["Task Manager"]
  node_task_ui["Task Interactions<br/>[script.js]"]
  node_task_state["Task State<br/>[script.js]"]
  node_task_filter["Task Filtering<br/>[script.js]"]
  node_task_view["Task Rendering<br/>[script.js]"]
  node_task_storage["Task Persistence<br/>[script.js]"]
  node_local_storage[("Browser Storage")]
end

subgraph group_fundamentals["JavaScript Practice"]
  node_array_practice["Array Methods"]
  node_syntax_practice["Syntax Exercises"]
end

subgraph group_applied["Applied Exercises"]
  node_approval["Approval Rules"]
  node_agenda["Agenda Exercise<br/>[agenda.js]"]
  node_shopping_cart["Shopping Cart"]
  node_employee_report["Employee Report"]
  node_spread_rest["Spread and Rest"]
  node_exercise_one["Standalone Exercise<br/>[exercicio1.js]"]
end

node_learner(("Learner"))

node_learner -->|"interacts with"| node_dom_basics
node_learner -->|"interacts with"| node_counter
node_learner -->|"provides input"| node_input_greeting
node_learner -->|"toggles mode"| node_theme_toggle
node_learner -->|"submits form"| node_registration
node_learner -->|"toggles class"| node_class_toggle
node_learner -->|"manages list"| node_list_challenge
node_learner -->|"manages products"| node_product_list
node_learner -->|"manages tasks"| node_task_ui
node_task_ui -->|"updates state"| node_task_state
node_task_ui -->|"requests filtered tasks"| node_task_filter
node_task_ui -->|"requests rendering"| node_task_view
node_task_ui -->|"saves and restores"| node_task_storage
node_task_filter -->|"filters tasks"| node_task_state
node_task_view -->|"requests filtered tasks"| node_task_filter
node_task_storage -->|"reads and writes"| node_local_storage
node_learner -->|"practices methods"| node_array_practice
node_learner -->|"practices syntax"| node_syntax_practice
node_learner -.->|"runs exercise"| node_approval
node_learner -.->|"runs exercise"| node_agenda
node_learner -->|"runs calculation"| node_shopping_cart
node_shopping_cart -->|"prints summary"| node_learner
node_learner -->|"runs report"| node_employee_report
node_learner -.->|"runs exercise"| node_spread_rest
node_learner -.->|"runs exercise"| node_exercise_one

click node_dom_basics "https://github.com/ferreiraarth/js/blob/main/DOM/01/script.js"
click node_counter "https://github.com/ferreiraarth/js/blob/main/DOM/02%20-%20Contador/script.js"
click node_input_greeting "https://github.com/ferreiraarth/js/blob/main/DOM/03%20-%20Input/script.js"
click node_theme_toggle "https://github.com/ferreiraarth/js/blob/main/DOM/04%20-%20Modo%20escuro-claro/script.js"
click node_registration "https://github.com/ferreiraarth/js/blob/main/DOM/05%20-%20formularioCadastro/script.js"
click node_class_toggle "https://github.com/ferreiraarth/js/blob/main/DOM/06%20-%20classList/script.js"
click node_list_challenge "https://github.com/ferreiraarth/js/blob/main/DOM/07%20-%20Desafio/script.js"
click node_product_list "https://github.com/ferreiraarth/js/blob/main/DOM/08%20-%20cadastroProdutoPreco/script.js"
click node_task_ui "https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js"
click node_task_state "https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js"
click node_task_filter "https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js"
click node_task_view "https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js"
click node_task_storage "https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js"
click node_array_practice "https://github.com/ferreiraarth/js/tree/main/TestePassados"
click node_syntax_practice "https://github.com/ferreiraarth/js/tree/main/TestePassados"
click node_approval "https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/SistemadeAprovacao.js"
click node_agenda "https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/agenda.js"
click node_shopping_cart "https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/carrinhoDeCompras.js"
click node_employee_report "https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/relatorioDeFuncionarios.js"
click node_spread_rest "https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/spreadRestFuncao.js"
click node_exercise_one "https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/exercicio1.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_dom_basics,node_counter,node_input_greeting,node_theme_toggle,node_registration,node_class_toggle,node_list_challenge,node_product_list toneBlue
class node_task_ui,node_task_state,node_task_filter,node_task_view,node_task_storage,node_local_storage toneAmber
class node_array_practice,node_syntax_practice toneMint
class node_approval,node_agenda,node_shopping_cart,node_employee_report,node_spread_rest,node_exercise_one toneRose
class node_learner toneIndigo
```

## Components

### DOM Exercises

- [DOM Basics](https://github.com/ferreiraarth/js/blob/main/DOM/01/script.js): `DOM/01/script.js`
- [Counter](https://github.com/ferreiraarth/js/blob/main/DOM/02%20-%20Contador/script.js): `DOM/02 - Contador/script.js`
- [Input Greeting](https://github.com/ferreiraarth/js/blob/main/DOM/03%20-%20Input/script.js): `DOM/03 - Input/script.js`
- [Theme Toggle](https://github.com/ferreiraarth/js/blob/main/DOM/04%20-%20Modo%20escuro-claro/script.js): `DOM/04 - Modo escuro-claro/script.js`
- [Registration Form](https://github.com/ferreiraarth/js/blob/main/DOM/05%20-%20formularioCadastro/script.js): `DOM/05 - formularioCadastro/script.js`
- [Class Toggle](https://github.com/ferreiraarth/js/blob/main/DOM/06%20-%20classList/script.js): `DOM/06 - classList/script.js`
- [List Challenge](https://github.com/ferreiraarth/js/blob/main/DOM/07%20-%20Desafio/script.js): `DOM/07 - Desafio/script.js`
- [Product List](https://github.com/ferreiraarth/js/blob/main/DOM/08%20-%20cadastroProdutoPreco/script.js): `DOM/08 - cadastroProdutoPreco/script.js`

### Task Manager

- [Task Interactions](https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js): `SitemaDeTarefas/script.js`
- [Task State](https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js): `SitemaDeTarefas/script.js`
- [Task Filtering](https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js): `SitemaDeTarefas/script.js`
- [Task Rendering](https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js): `SitemaDeTarefas/script.js`
- [Task Persistence](https://github.com/ferreiraarth/js/blob/main/SitemaDeTarefas/script.js): `SitemaDeTarefas/script.js`
- **Browser Storage**

### JavaScript Practice

- [Array Methods](https://github.com/ferreiraarth/js/tree/main/TestePassados): `TestePassados`
- [Syntax Exercises](https://github.com/ferreiraarth/js/tree/main/TestePassados): `TestePassados`

### Applied Exercises

- [Approval Rules](https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/SistemadeAprovacao.js): `TestesConjuntos/SistemadeAprovacao.js`
- [Agenda Exercise](https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/agenda.js): `TestesConjuntos/agenda.js`
- [Shopping Cart](https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/carrinhoDeCompras.js): `TestesConjuntos/carrinhoDeCompras.js`
- [Employee Report](https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/relatorioDeFuncionarios.js): `TestesConjuntos/relatorioDeFuncionarios.js`
- [Spread and Rest](https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/spreadRestFuncao.js): `TestesConjuntos/spreadRestFuncao.js`
- [Standalone Exercise](https://github.com/ferreiraarth/js/blob/main/TestesConjuntos/exercicio1.js): `TestesConjuntos/exercicio1.js`

### Other components

- **Learner**

## Connections

- Learner → DOM Basics: interacts with (evidence: `DOM/01/script.js`)
- Learner → Counter: interacts with (evidence: `DOM/02 - Contador/script.js`)
- Learner → Input Greeting: provides input (evidence: `DOM/03 - Input/script.js`)
- Learner → Theme Toggle: toggles mode (evidence: `DOM/04 - Modo escuro-claro/script.js`)
- Learner → Registration Form: submits form (evidence: `DOM/05 - formularioCadastro/script.js`)
- Learner → Class Toggle: toggles class (evidence: `DOM/06 - classList/script.js`)
- Learner → List Challenge: manages list (evidence: `DOM/07 - Desafio/script.js`)
- Learner → Product List: manages products (evidence: `DOM/08 - cadastroProdutoPreco/script.js`)
- Learner → Task Interactions: manages tasks (evidence: `SitemaDeTarefas/script.js`)
- Task Interactions → Task State: updates state (evidence: `SitemaDeTarefas/script.js`)
- Task Interactions → Task Filtering: requests filtered tasks (evidence: `SitemaDeTarefas/script.js`)
- Task Interactions → Task Rendering: requests rendering (evidence: `SitemaDeTarefas/script.js`)
- Task Interactions → Task Persistence: saves and restores (evidence: `SitemaDeTarefas/script.js`)
- Task Filtering → Task State: filters tasks (evidence: `SitemaDeTarefas/script.js`)
- Task Rendering → Task Filtering: requests filtered tasks (evidence: `SitemaDeTarefas/script.js`)
- Task Persistence → Browser Storage: reads and writes (evidence: `SitemaDeTarefas/script.js`)
- Learner → Array Methods: practices methods (evidence: `TestePassados/script16-find().js`)
- Learner → Syntax Exercises: practices syntax (evidence: `TestePassados/script8-switch.js`)
- Learner → Approval Rules: runs exercise
- Learner → Agenda Exercise: runs exercise
- Learner → Shopping Cart: runs calculation (evidence: `TestesConjuntos/carrinhoDeCompras.js`)
- Shopping Cart → Learner: prints summary (evidence: `TestesConjuntos/carrinhoDeCompras.js`)
- Learner → Employee Report: runs report (evidence: `TestesConjuntos/relatorioDeFuncionarios.js`)
- Learner → Spread and Rest: runs exercise
- Learner → Standalone Exercise: runs exercise
