# techupdate427-debug/calcpro-modern architecture

> Architecture diagram of the GitHub repository techupdate427-debug/calcpro-modern, 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/techupdate427-debug/calcpro-modern
- Repository: https://github.com/techupdate427-debug/calcpro-modern

## Overview

CalcPro is a browser-based scientific calculator with an Android/Capacitor project in the repository; the sampled runtime shows the React application, not native calculation logic. A user selects a mode in the tab bar, works in its panel, and receives calculations or visual results. Major modes include scientific calculation, statistics, matrices, solving, calculus, graphing, conversions, finance, geometry, and AI photo solving. The README is an uncustomized Vite template, so capabilities are inferred from the source tree and sampled panels; unsampled panel wiring is not asserted.

Main entry points: [`src/App.jsx`](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/App.jsx) (App coordinator), [`src/utils/math.js`](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/utils/math.js) (Safe math evaluator), [`src/components/panels/IntegralPanel.jsx`](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/IntegralPanel.jsx) (Calculus tools), [`src/components/panels/AIPhotoPanel.jsx`](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/AIPhotoPanel.jsx) (AI photo solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["App coordinator<br/>[App.jsx]"]
  node_tabs["Mode tabs<br/>[Tabs.jsx]"]
  node_topbar["Theme bar<br/>[TopBar.jsx]"]
end

subgraph group_math_modes["Math tools"]
  node_calc["Scientific calculator<br/>[CalcPanel.jsx]"]
  node_stats["Statistics<br/>[StatPanel.jsx]"]
  node_matrix["Matrix operations<br/>[MatrixPanel.jsx]"]
  node_solver["Equation solver<br/>[SolverPanel.jsx]"]
  node_calculus_panel["Calculus tools<br/>[IntegralPanel.jsx]"]
  node_graph["Function graphing<br/>[GraphPanel.jsx]"]
end

subgraph group_special_modes["Specialized tools"]
  node_convert["Unit conversion<br/>[ConvertPanel.jsx]"]
  node_finance["Finance calculator<br/>[FinancePanel.jsx]"]
  node_geometry["Geometry solver<br/>[GeometryPanel.jsx]"]
  node_ai_photo["AI photo solver<br/>[AIPhotoPanel.jsx]"]
  node_constants["Constants reference<br/>[ConstantsPanel.jsx]"]
  node_formulas["Formula reference<br/>[FormulasPanel.jsx]"]
  node_number_theory["Number theory"]
end

subgraph group_calculation["Calculation layer"]
  node_math_eval["Safe math evaluator<br/>[math.js]"]
  node_calculus["Numerical calculus<br/>[calculus.js]"]
end

node_user(("User"))
node_openrouter{{"OpenRouter AI service"}}

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_user -->|"selects mode"| node_tabs
node_app -->|"sets active mode"| node_tabs
node_app -->|"renders"| node_topbar
node_app -->|"renders"| node_calc
node_app -->|"renders"| node_stats
node_app -->|"renders"| node_matrix
node_app -->|"renders"| node_solver
node_app -->|"renders"| node_calculus_panel
node_app -->|"renders"| node_graph
node_app -->|"renders"| node_convert
node_app -->|"renders"| node_finance
node_app -->|"renders"| node_geometry
node_app -->|"renders"| node_ai_photo
node_calc -->|"evaluates expressions"| node_math_eval
node_stats -->|"uses math utilities"| node_math_eval
node_solver -->|"uses math utilities"| node_math_eval
node_graph -->|"compiles functions"| node_math_eval
node_calculus_panel -->|"compiles functions"| node_math_eval
node_calculus_panel -->|"calls numerical methods"| node_calculus
node_calculus -->|"uses evaluator"| node_math_eval
node_ai_photo -->|"requests AI solution"| node_openrouter
node_user -->|"submits photo"| node_ai_photo

click node_entry "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/main.jsx"
click node_app "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/App.jsx"
click node_tabs "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/Tabs.jsx"
click node_topbar "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/TopBar.jsx"
click node_calc "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/CalcPanel.jsx"
click node_stats "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/StatPanel.jsx"
click node_matrix "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/MatrixPanel.jsx"
click node_solver "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/SolverPanel.jsx"
click node_calculus_panel "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/IntegralPanel.jsx"
click node_graph "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/GraphPanel.jsx"
click node_math_eval "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/utils/math.js"
click node_calculus "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/utils/calculus.js"
click node_convert "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/ConvertPanel.jsx"
click node_finance "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/FinancePanel.jsx"
click node_geometry "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/GeometryPanel.jsx"
click node_ai_photo "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/AIPhotoPanel.jsx"
click node_constants "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/ConstantsPanel.jsx"
click node_formulas "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/FormulasPanel.jsx"
click node_number_theory "https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/NumberTheoryPanel.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_entry,node_app,node_tabs,node_topbar,node_user toneBlue
class node_calc,node_stats,node_matrix,node_solver,node_calculus_panel,node_graph toneAmber
class node_convert,node_finance,node_geometry,node_ai_photo,node_constants,node_formulas,node_number_theory,node_openrouter toneMint
class node_math_eval,node_calculus toneRose
```

## Components

### Application shell

- [React entry](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/main.jsx): `src/main.jsx`
- [App coordinator](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/App.jsx): `src/App.jsx`
- [Mode tabs](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/Tabs.jsx): `src/components/Tabs.jsx`
- [Theme bar](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/TopBar.jsx): `src/components/TopBar.jsx`

### Math tools

- [Scientific calculator](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/CalcPanel.jsx): `src/components/panels/CalcPanel.jsx`
- [Statistics](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/StatPanel.jsx): `src/components/panels/StatPanel.jsx`
- [Matrix operations](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/MatrixPanel.jsx): `src/components/panels/MatrixPanel.jsx`
- [Equation solver](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/SolverPanel.jsx): `src/components/panels/SolverPanel.jsx`
- [Calculus tools](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/IntegralPanel.jsx): `src/components/panels/IntegralPanel.jsx`
- [Function graphing](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/GraphPanel.jsx): `src/components/panels/GraphPanel.jsx`

### Specialized tools

- [Unit conversion](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/ConvertPanel.jsx): `src/components/panels/ConvertPanel.jsx`
- [Finance calculator](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/FinancePanel.jsx): `src/components/panels/FinancePanel.jsx`
- [Geometry solver](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/GeometryPanel.jsx): `src/components/panels/GeometryPanel.jsx`
- [AI photo solver](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/AIPhotoPanel.jsx): `src/components/panels/AIPhotoPanel.jsx`
- [Constants reference](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/ConstantsPanel.jsx): `src/components/panels/ConstantsPanel.jsx`
- [Formula reference](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/FormulasPanel.jsx): `src/components/panels/FormulasPanel.jsx`
- [Number theory](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/components/panels/NumberTheoryPanel.jsx): `src/components/panels/NumberTheoryPanel.jsx`

### Calculation layer

- [Safe math evaluator](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/utils/math.js): `src/utils/math.js`
- [Numerical calculus](https://github.com/techupdate427-debug/calcpro-modern/blob/master/src/utils/calculus.js): `src/utils/calculus.js`

### Other components

- **User**
- **OpenRouter AI service**

## Connections

- User → React entry: opens app
- React entry → App coordinator: renders (evidence: `src/main.jsx`)
- User → Mode tabs: selects mode (evidence: `src/components/Tabs.jsx`)
- App coordinator → Mode tabs: sets active mode (evidence: `src/App.jsx`)
- App coordinator → Theme bar: renders (evidence: `src/App.jsx`)
- App coordinator → Scientific calculator: renders (evidence: `src/App.jsx`)
- App coordinator → Statistics: renders (evidence: `src/App.jsx`)
- App coordinator → Matrix operations: renders (evidence: `src/App.jsx`)
- App coordinator → Equation solver: renders (evidence: `src/App.jsx`)
- App coordinator → Calculus tools: renders (evidence: `src/App.jsx`)
- App coordinator → Function graphing: renders (evidence: `src/App.jsx`)
- App coordinator → Unit conversion: renders (evidence: `src/App.jsx`)
- App coordinator → Finance calculator: renders (evidence: `src/App.jsx`)
- App coordinator → Geometry solver: renders (evidence: `src/App.jsx`)
- App coordinator → AI photo solver: renders (evidence: `src/App.jsx`)
- Scientific calculator → Safe math evaluator: evaluates expressions (evidence: `src/components/panels/CalcPanel.jsx`)
- Statistics → Safe math evaluator: uses math utilities (evidence: `src/components/panels/StatPanel.jsx`)
- Equation solver → Safe math evaluator: uses math utilities (evidence: `src/components/panels/SolverPanel.jsx`)
- Function graphing → Safe math evaluator: compiles functions (evidence: `src/components/panels/GraphPanel.jsx`)
- Calculus tools → Safe math evaluator: compiles functions (evidence: `src/components/panels/IntegralPanel.jsx`)
- Calculus tools → Numerical calculus: calls numerical methods (evidence: `src/components/panels/IntegralPanel.jsx`)
- Numerical calculus → Safe math evaluator: uses evaluator (evidence: `src/utils/calculus.js`)
- AI photo solver → OpenRouter AI service: requests AI solution (evidence: `src/components/panels/AIPhotoPanel.jsx`)
- User → AI photo solver: submits photo (evidence: `src/components/panels/AIPhotoPanel.jsx`)
