# stevenjm10/class-activity-2 architecture

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

- Interactive diagram: https://gitdiagram.com/stevenjm10/class-activity-2
- Repository: https://github.com/stevenjm10/class-activity-2

## Overview

This is a React calculator app. The browser-mounted application routes `/` to the calculator, where users enter numbers and operations, chain calculations, and see results or a division-by-zero error. Calculator state and button handling live alongside the arithmetic and rounding helpers in one source file; these are separated below to clarify their responsibilities. The README also identifies reset and delete controls. The source excerpts show the routing and calculation calls; styling is connected through the entry module's import.

Main entry points: [`src/pages/Calculator.jsx`](https://github.com/stevenjm10/class-activity-2/blob/main/src/pages/Calculator.jsx) (Calculator interface), [`src/main.jsx`](https://github.com/stevenjm10/class-activity-2/blob/main/src/main.jsx) (React bootstrap), [`src/App.jsx`](https://github.com/stevenjm10/class-activity-2/blob/main/src/App.jsx) (Route selection), [`src/index.css`](https://github.com/stevenjm10/class-activity-2/blob/main/src/index.css) (Global styles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_bootstrap["React bootstrap<br/>[main.jsx]"]
  node_app["Route selection<br/>[App.jsx]"]
  node_styles["Global styles<br/>[index.css]"]
end

subgraph group_calculator["Calculator"]
  node_calc_ui["Calculator interface<br/>[Calculator.jsx]"]
  node_math["Arithmetic helpers<br/>[Calculator.jsx]"]
end

node_user(("User"))

node_bootstrap -->|"renders"| node_app
node_bootstrap -->|"imports styles"| node_styles
node_app -->|"routes to"| node_calc_ui
node_user -->|"presses controls"| node_calc_ui
node_calc_ui -->|"calls calculations"| node_math

click node_bootstrap "https://github.com/stevenjm10/class-activity-2/blob/main/src/main.jsx"
click node_app "https://github.com/stevenjm10/class-activity-2/blob/main/src/App.jsx"
click node_styles "https://github.com/stevenjm10/class-activity-2/blob/main/src/index.css"
click node_calc_ui "https://github.com/stevenjm10/class-activity-2/blob/main/src/pages/Calculator.jsx"
click node_math "https://github.com/stevenjm10/class-activity-2/blob/main/src/pages/Calculator.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_bootstrap,node_app,node_styles,node_user toneBlue
class node_calc_ui,node_math toneAmber
```

## Components

### Application shell

- [React bootstrap](https://github.com/stevenjm10/class-activity-2/blob/main/src/main.jsx): `src/main.jsx`
- [Route selection](https://github.com/stevenjm10/class-activity-2/blob/main/src/App.jsx): `src/App.jsx`
- [Global styles](https://github.com/stevenjm10/class-activity-2/blob/main/src/index.css): `src/index.css`

### Calculator

- [Calculator interface](https://github.com/stevenjm10/class-activity-2/blob/main/src/pages/Calculator.jsx): `src/pages/Calculator.jsx`
- [Arithmetic helpers](https://github.com/stevenjm10/class-activity-2/blob/main/src/pages/Calculator.jsx): `src/pages/Calculator.jsx`

### Other components

- **User**

## Connections

- React bootstrap → Route selection: renders (evidence: `src/main.jsx`)
- React bootstrap → Global styles: imports styles (evidence: `src/main.jsx`)
- Route selection → Calculator interface: routes to (evidence: `src/App.jsx`)
- User → Calculator interface: presses controls (evidence: `src/pages/Calculator.jsx`)
- Calculator interface → Arithmetic helpers: calls calculations (evidence: `src/pages/Calculator.jsx`)
