# iman-adams/calculator architecture

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

- Interactive diagram: https://gitdiagram.com/iman-adams/calculator
- Repository: https://github.com/iman-adams/calculator

## Overview

This is a small browser calculator with basic and scientific modes. The JavaScript selects display and mode elements, updates the display, evaluates expressions, and toggles mode visibility. The HTML and CSS are present in the tree, but their contents were not sampled, so their detailed controls and styling relationships cannot be confirmed.

Main entry points: [`Calculator/index.html`](https://github.com/iman-adams/calculator/blob/main/Calculator/index.html) (Calculator interface), [`Calculator/script.js`](https://github.com/iman-adams/calculator/blob/main/Calculator/script.js) (Calculator logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_interface["Calculator interface<br/>[index.html]"]
node_logic["Calculator logic<br/>[script.js]"]

node_user -.->|"uses"| node_interface
node_logic -->|"updates DOM"| node_interface

click node_interface "https://github.com/iman-adams/calculator/blob/main/Calculator/index.html"
click node_logic "https://github.com/iman-adams/calculator/blob/main/Calculator/script.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_user toneBlue
class node_interface,node_logic toneTeal
```

## Components

### Other components

- **User**
- [Calculator interface](https://github.com/iman-adams/calculator/blob/main/Calculator/index.html): `Calculator/index.html`
- [Calculator logic](https://github.com/iman-adams/calculator/blob/main/Calculator/script.js): `Calculator/script.js`

## Connections

- User → Calculator interface: uses
- Calculator logic → Calculator interface: updates DOM (evidence: `Calculator/script.js`)
