# pradeep11022004/calculator-app architecture

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

- Interactive diagram: https://gitdiagram.com/pradeep11022004/calculator-app
- Repository: https://github.com/pradeep11022004/calculator-app

## Overview

This is a small browser calculator. The user enters arithmetic through the page; JavaScript updates the display, clears input, and evaluates expressions with `eval()`, showing `ERROR` when evaluation throws. The README also documents percentage, decimals, `00`, and clear controls. The HTML and CSS are present in the tree but were not sampled, so their event and styling wiring is not verified.

Main entry points: [`index.html`](https://github.com/pradeep11022004/calculator-app/blob/main/index.html) (Calculator page), [`calculator.js`](https://github.com/pradeep11022004/calculator-app/blob/main/calculator.js) (Calculator logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_page["Calculator page<br/>[index.html]"]
node_logic["Calculator logic<br/>[calculator.js]"]
node_styles["Responsive styling<br/>[calculator.css]"]

node_user -->|"enters values"| node_page
node_page -.->|"triggers controls"| node_logic
node_logic -->|"updates display"| node_page

click node_page "https://github.com/pradeep11022004/calculator-app/blob/main/index.html"
click node_logic "https://github.com/pradeep11022004/calculator-app/blob/main/calculator.js"
click node_styles "https://github.com/pradeep11022004/calculator-app/blob/main/calculator.css"

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_user toneBlue
class node_page,node_logic,node_styles toneTeal
```

## Components

### Other components

- **User**
- [Calculator page](https://github.com/pradeep11022004/calculator-app/blob/main/index.html): `index.html`
- [Calculator logic](https://github.com/pradeep11022004/calculator-app/blob/main/calculator.js): `calculator.js`
- [Responsive styling](https://github.com/pradeep11022004/calculator-app/blob/main/calculator.css): `calculator.css`

## Connections

- User → Calculator page: enters values (evidence: `README.md`)
- Calculator page → Calculator logic: triggers controls
- Calculator logic → Calculator page: updates display (evidence: `calculator.js`)
