# husainmade/margincalculator architecture

> Architecture diagram of the GitHub repository husainmade/margincalculator, 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/husainmade/margincalculator
- Repository: https://github.com/husainmade/margincalculator

## Overview

Margin Calculator is an offline Android product-pricing app. Its main workflow takes price inputs, calculates profitability, applies discount and GST adjustments, and presents a breakdown; users can also save and review calculations or consult the built-in guide. The repository contains no application source, so component paths and implementation-level calls cannot be verified. The documented relationships below are based on the README only.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pricing["Pricing workflow"]
  node_calculator["Calculator"]
  node_profitability["Profitability calculations"]
  node_discount["Discount adjustment"]
  node_gst["GST adjustment"]
  node_breakdown["Price breakdown"]
end

subgraph group_reference["Saved reference"]
  node_history["Calculation history"]
  node_saved["Saved calculations"]
  node_guide["Margin markup guide"]
end

subgraph group_experience["App experience"]
  node_appearance["Appearance settings"]
  node_dynamic["Dynamic color"]
end

node_user(("App user"))

node_user -->|"enters prices"| node_calculator
node_calculator -->|"calculates values"| node_profitability
node_calculator -->|"applies discount"| node_discount
node_discount -->|"precedes GST"| node_gst
node_calculator -->|"adjusts GST"| node_gst
node_calculator -->|"shows breakdown"| node_breakdown
node_user -->|"manages saves"| node_history
node_history -->|"stores locally"| node_saved
node_user -->|"opens guide"| node_guide
node_user -->|"chooses theme"| node_appearance
node_appearance -->|"supports color"| node_dynamic

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_calculator,node_profitability,node_discount,node_gst,node_breakdown,node_user toneBlue
class node_history,node_saved,node_guide toneAmber
class node_appearance,node_dynamic toneMint
```

## Components

### Pricing workflow

- **Calculator**
- **Profitability calculations**
- **Discount adjustment**
- **GST adjustment**
- **Price breakdown**

### Saved reference

- **Calculation history**
- **Saved calculations**
- **Margin markup guide**

### App experience

- **Appearance settings**
- **Dynamic color**

### Other components

- **App user**

## Connections

- App user → Calculator: enters prices (evidence: `README.md`)
- Calculator → Profitability calculations: calculates values (evidence: `README.md`)
- Calculator → Discount adjustment: applies discount (evidence: `README.md`)
- Discount adjustment → GST adjustment: precedes GST (evidence: `README.md`)
- Calculator → GST adjustment: adjusts GST (evidence: `README.md`)
- Calculator → Price breakdown: shows breakdown (evidence: `README.md`)
- App user → Calculation history: manages saves (evidence: `README.md`)
- Calculation history → Saved calculations: stores locally (evidence: `README.md`)
- App user → Margin markup guide: opens guide (evidence: `README.md`)
- App user → Appearance settings: chooses theme (evidence: `README.md`)
- Appearance settings → Dynamic color: supports color (evidence: `README.md`)
