# icel-ramos/netcalc architecture

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

- Interactive diagram: https://gitdiagram.com/icel-ramos/netcalc
- Repository: https://github.com/icel-ramos/netcalc

## Overview

NetCalc Pro is a static browser-based subnet calculator and network reference tool. Users open the dashboard, then calculate IPv4 subnet details by host count or CIDR, analyze IPv6 prefixes, or consult the CIDR table. The JavaScript handles navigation, calculations, and rendering in the page. The README documents Packet Tracer guidance and several detailed outputs; excerpts show IPv4 and IPv6 calculations and some rendering, but not every rendering step, so those relationships are marked unverified where appropriate.

Main entry points: [`script1.js`](https://github.com/icel-ramos/netcalc/blob/main/script1.js) (Navigation and UI), [`index.html`](https://github.com/icel-ramos/netcalc/blob/main/index.html) (Calculator Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_page["Calculator Dashboard<br/>[index.html]"]
  node_ui["Navigation and UI<br/>[script1.js]"]
end

subgraph group_ipv4["IPv4 Tools"]
  node_v4calc["IPv4 Calculator<br/>[script1.js]"]
  node_v4details["IPv4 Technical Details<br/>[script1.js]"]
  node_neighbors["Neighboring Subnets<br/>[script1.js]"]
  node_packetguide["Packet Tracer Guide<br/>[script1.js]"]
end

subgraph group_ipv6["IPv6 Tools"]
  node_v6calc["IPv6 Calculator<br/>[script1.js]"]
end

subgraph group_reference["Reference Tools"]
  node_cidrtable["CIDR Reference Table<br/>[script1.js]"]
end

node_user(("Network User"))
node_clipboard["Clipboard"]

node_user -->|"opens"| node_page
node_page -->|"initializes"| node_ui
node_ui -->|"submits input"| node_v4calc
node_v4calc -->|"renders details"| node_v4details
node_v4calc -.->|"generates blocks"| node_neighbors
node_v4calc -.->|"generates guide"| node_packetguide
node_ui -->|"submits input"| node_v6calc
node_ui -->|"builds table"| node_cidrtable
node_ui -->|"copies summary"| node_clipboard

click node_page "https://github.com/icel-ramos/netcalc/blob/main/index.html"
click node_ui "https://github.com/icel-ramos/netcalc/blob/main/script1.js"
click node_v4calc "https://github.com/icel-ramos/netcalc/blob/main/script1.js"
click node_v4details "https://github.com/icel-ramos/netcalc/blob/main/script1.js"
click node_neighbors "https://github.com/icel-ramos/netcalc/blob/main/script1.js"
click node_packetguide "https://github.com/icel-ramos/netcalc/blob/main/script1.js"
click node_v6calc "https://github.com/icel-ramos/netcalc/blob/main/script1.js"
click node_cidrtable "https://github.com/icel-ramos/netcalc/blob/main/script1.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_page,node_ui,node_user toneBlue
class node_v4calc,node_v4details,node_neighbors,node_packetguide toneAmber
class node_v6calc toneMint
class node_cidrtable toneRose
class node_clipboard toneIndigo
```

## Components

### Dashboard

- [Calculator Dashboard](https://github.com/icel-ramos/netcalc/blob/main/index.html): `index.html`
- [Navigation and UI](https://github.com/icel-ramos/netcalc/blob/main/script1.js): `script1.js`

### IPv4 Tools

- [IPv4 Calculator](https://github.com/icel-ramos/netcalc/blob/main/script1.js): `script1.js`
- [IPv4 Technical Details](https://github.com/icel-ramos/netcalc/blob/main/script1.js): `script1.js`
- [Neighboring Subnets](https://github.com/icel-ramos/netcalc/blob/main/script1.js): `script1.js`
- [Packet Tracer Guide](https://github.com/icel-ramos/netcalc/blob/main/script1.js): `script1.js`

### IPv6 Tools

- [IPv6 Calculator](https://github.com/icel-ramos/netcalc/blob/main/script1.js): `script1.js`

### Reference Tools

- [CIDR Reference Table](https://github.com/icel-ramos/netcalc/blob/main/script1.js): `script1.js`

### Other components

- **Network User**
- **Clipboard**

## Connections

- Network User → Calculator Dashboard: opens (evidence: `README.md`)
- Calculator Dashboard → Navigation and UI: initializes (evidence: `script1.js`)
- Navigation and UI → IPv4 Calculator: submits input (evidence: `script1.js`)
- IPv4 Calculator → IPv4 Technical Details: renders details (evidence: `script1.js`)
- IPv4 Calculator → Neighboring Subnets: generates blocks (evidence: `script1.js`)
- IPv4 Calculator → Packet Tracer Guide: generates guide (evidence: `script1.js`)
- Navigation and UI → IPv6 Calculator: submits input (evidence: `script1.js`)
- Navigation and UI → CIDR Reference Table: builds table (evidence: `script1.js`)
- Navigation and UI → Clipboard: copies summary (evidence: `script1.js`)
