# willrdnk/juros-compostos architecture

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

- Interactive diagram: https://gitdiagram.com/willrdnk/juros-compostos
- Repository: https://github.com/willrdnk/juros-compostos

## Overview

This is a small Chrome extension for calculating compound interest. The user enters a principal, rate, duration (in years or months), and optional monthly contribution; the popup calculates the accumulated amount and displays it as Brazilian currency. The graph follows the React render path and separates the popup’s input, calculation, and result responsibilities. The README documents the extension context and capabilities; implementation details are based on the sampled source files.

Main entry points: [`src/components/Popup/Popup.jsx`](https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.jsx) (Calculator popup), [`src/App.jsx`](https://github.com/willrdnk/juros-compostos/blob/master/src/App.jsx) (App shell), [`src/main.jsx`](https://github.com/willrdnk/juros-compostos/blob/master/src/main.jsx) (React mount)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["React entry"]
  node_main["React mount<br/>[main.jsx]"]
  node_app["App shell<br/>[App.jsx]"]
end

subgraph group_calculator["Calculator popup"]
  node_popup["Calculator popup<br/>[Popup.jsx]"]
  node_inputs["Calculation inputs<br/>[Popup.jsx]"]
  node_calculation["Compound calculation<br/>[Popup.jsx]"]
  node_result["Currency result<br/>[Popup.jsx]"]
end

node_user(("Extension user"))

node_main -->|"renders"| node_app
node_app -->|"renders"| node_popup
node_user -->|"enters values"| node_inputs
node_popup -->|"renders"| node_inputs
node_user -->|"requests calculation"| node_calculation
node_popup -->|"handles click"| node_calculation
node_calculation -->|"sets result"| node_result
node_popup -->|"renders"| node_result

click node_main "https://github.com/willrdnk/juros-compostos/blob/master/src/main.jsx"
click node_app "https://github.com/willrdnk/juros-compostos/blob/master/src/App.jsx"
click node_popup "https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.jsx"
click node_inputs "https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.jsx"
click node_calculation "https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.jsx"
click node_result "https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.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_main,node_app,node_user toneBlue
class node_popup,node_inputs,node_calculation,node_result toneAmber
```

## Components

### React entry

- [React mount](https://github.com/willrdnk/juros-compostos/blob/master/src/main.jsx): `src/main.jsx`
- [App shell](https://github.com/willrdnk/juros-compostos/blob/master/src/App.jsx): `src/App.jsx`

### Calculator popup

- [Calculator popup](https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.jsx): `src/components/Popup/Popup.jsx`
- [Calculation inputs](https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.jsx): `src/components/Popup/Popup.jsx`
- [Compound calculation](https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.jsx): `src/components/Popup/Popup.jsx`
- [Currency result](https://github.com/willrdnk/juros-compostos/blob/master/src/components/Popup/Popup.jsx): `src/components/Popup/Popup.jsx`

### Other components

- **Extension user**

## Connections

- React mount → App shell: renders (evidence: `src/main.jsx`)
- App shell → Calculator popup: renders (evidence: `src/App.jsx`)
- Extension user → Calculation inputs: enters values (evidence: `src/components/Popup/Popup.jsx`)
- Calculator popup → Calculation inputs: renders (evidence: `src/components/Popup/Popup.jsx`)
- Extension user → Compound calculation: requests calculation (evidence: `src/components/Popup/Popup.jsx`)
- Calculator popup → Compound calculation: handles click (evidence: `src/components/Popup/Popup.jsx`)
- Compound calculation → Currency result: sets result (evidence: `src/components/Popup/Popup.jsx`)
- Calculator popup → Currency result: renders (evidence: `src/components/Popup/Popup.jsx`)
