# nikhilyadav551/metal_weight_calculator architecture

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

- Interactive diagram: https://gitdiagram.com/nikhilyadav551/metal_weight_calculator
- Repository: https://github.com/nikhilyadav551/metal_weight_calculator

## Overview

The product is a Tkinter desktop calculator: users enter material, shape, dimensions, units, and quantity; the app validates inputs, computes volume and weight, and displays results. The README also mentions a coding assistant, but no corresponding files appear in the supplied tree, so it is not mapped. The app excerpt is partial; the graph shows only evidenced calculation and data relationships.

Main entry points: [`app.py`](https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/app.py) (GUI and calculation), [`shapes.py`](https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/shapes.py) (Shape catalog and formulas), [`metals.py`](https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/metals.py) (Metal densities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_app["GUI and calculation<br/>[app.py]"]
  node_results["Weight and volume results<br/>[app.py]"]
end

subgraph group_calculation["Calculation domain"]
  node_metals["Metal densities<br/>[metals.py]"]
  node_shapes["Shape catalog and formulas<br/>[shapes.py]"]
end

node_user(("Calculator user"))

node_user -->|"enters inputs"| node_app
node_app -->|"reads densities"| node_metals
node_app -->|"reads shapes"| node_shapes
node_app -->|"calculates volume"| node_shapes
node_app -->|"displays results"| node_results

click node_app "https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/app.py"
click node_metals "https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/metals.py"
click node_shapes "https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/shapes.py"
click node_results "https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/app.py"

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_app,node_results,node_user toneBlue
class node_metals,node_shapes toneAmber
```

## Components

### Desktop interface

- [GUI and calculation](https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/app.py): `app.py`
- [Weight and volume results](https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/app.py): `app.py`

### Calculation domain

- [Metal densities](https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/metals.py): `metals.py`
- [Shape catalog and formulas](https://github.com/nikhilyadav551/metal_weight_calculator/blob/main/shapes.py): `shapes.py`

### Other components

- **Calculator user**

## Connections

- Calculator user → GUI and calculation: enters inputs
- GUI and calculation → Metal densities: reads densities
- GUI and calculation → Shape catalog and formulas: reads shapes
- GUI and calculation → Shape catalog and formulas: calculates volume
- GUI and calculation → Weight and volume results: displays results
