# maujabur/box-maker-web architecture

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

- Interactive diagram: https://gitdiagram.com/maujabur/box-maker-web
- Repository: https://github.com/maujabur/box-maker-web

## Overview

Box Maker is a browser-only box-design tool. Users configure box dimensions, material, finger joints, holes, lid/bottom options, and sheet layout; the app builds cutting geometry, previews and nests parts on sheets, then exports SVG, DXF, CSV, or project JSON. A separate 3D view assembles the generated panels with per-piece display and explode controls. The README documents persistence and import/export capabilities; sampled excerpts show the geometry and 3D implementation, but not every app handler, so only evidenced links are drawn.

Main entry points: [`app.js`](https://github.com/maujabur/box-maker-web/blob/main/app.js) (Configuration app), [`geometry.js`](https://github.com/maujabur/box-maker-web/blob/main/geometry.js) (Box geometry), [`view3d.js`](https://github.com/maujabur/box-maker-web/blob/main/view3d.js) (3D assembly view), [`index.html`](https://github.com/maujabur/box-maker-web/blob/main/index.html) (Design settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Configuration and controls"]
  node_app["Configuration app<br/>[app.js]"]
  node_settings["Design settings<br/>[index.html]"]
  node_storage[("Browser settings<br/>[app.js]")]
end

subgraph group_geom["Design and nesting"]
  node_geometry["Box geometry<br/>[geometry.js]"]
  node_panels["Cut panels<br/>[geometry.js]"]
  node_nesting["Sheet nesting<br/>[geometry.js]"]
end

subgraph group_outputs["Preview and exports"]
  node_preview["Sheet preview<br/>[app.js]"]
  node_svg["SVG export<br/>[geometry.js]"]
  node_dxf["DXF export<br/>[geometry.js]"]
  node_csv["Cutlist CSV<br/>[geometry.js]"]
  node_project["Project JSON<br/>[app.js]"]
end

subgraph group_view["3D assembly"]
  node_assembly["3D assembly view<br/>[view3d.js]"]
  node_three["Three.js renderer"]
end

node_user(("Box designer"))

node_user -->|"configures"| node_app
node_settings -->|"supplies controls"| node_app
node_app -->|"builds design"| node_geometry
node_geometry -->|"generates"| node_panels
node_app -->|"organizes sheets"| node_nesting
node_nesting -->|"supplies layouts"| node_preview
node_app -->|"exports"| node_svg
node_app -->|"exports"| node_dxf
node_app -->|"exports"| node_csv
node_app -->|"saves and opens"| node_project
node_app -->|"persists settings"| node_storage
node_app -->|"updates view"| node_assembly
node_assembly -->|"renders with"| node_three
node_geometry -->|"serializes layout"| node_svg
node_geometry -->|"serializes layout"| node_dxf

click node_app "https://github.com/maujabur/box-maker-web/blob/main/app.js"
click node_settings "https://github.com/maujabur/box-maker-web/blob/main/index.html"
click node_geometry "https://github.com/maujabur/box-maker-web/blob/main/geometry.js"
click node_panels "https://github.com/maujabur/box-maker-web/blob/main/geometry.js"
click node_nesting "https://github.com/maujabur/box-maker-web/blob/main/geometry.js"
click node_preview "https://github.com/maujabur/box-maker-web/blob/main/app.js"
click node_svg "https://github.com/maujabur/box-maker-web/blob/main/geometry.js"
click node_dxf "https://github.com/maujabur/box-maker-web/blob/main/geometry.js"
click node_csv "https://github.com/maujabur/box-maker-web/blob/main/geometry.js"
click node_project "https://github.com/maujabur/box-maker-web/blob/main/app.js"
click node_storage "https://github.com/maujabur/box-maker-web/blob/main/app.js"
click node_assembly "https://github.com/maujabur/box-maker-web/blob/main/view3d.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_app,node_settings,node_storage toneBlue
class node_geometry,node_panels,node_nesting toneAmber
class node_preview,node_svg,node_dxf,node_csv,node_project toneMint
class node_assembly,node_three toneRose
class node_user toneIndigo
```

## Components

### Configuration and controls

- [Configuration app](https://github.com/maujabur/box-maker-web/blob/main/app.js): `app.js`
- [Design settings](https://github.com/maujabur/box-maker-web/blob/main/index.html): `index.html`
- [Browser settings](https://github.com/maujabur/box-maker-web/blob/main/app.js): `app.js`

### Design and nesting

- [Box geometry](https://github.com/maujabur/box-maker-web/blob/main/geometry.js): `geometry.js`
- [Cut panels](https://github.com/maujabur/box-maker-web/blob/main/geometry.js): `geometry.js`
- [Sheet nesting](https://github.com/maujabur/box-maker-web/blob/main/geometry.js): `geometry.js`

### Preview and exports

- [Sheet preview](https://github.com/maujabur/box-maker-web/blob/main/app.js): `app.js`
- [SVG export](https://github.com/maujabur/box-maker-web/blob/main/geometry.js): `geometry.js`
- [DXF export](https://github.com/maujabur/box-maker-web/blob/main/geometry.js): `geometry.js`
- [Cutlist CSV](https://github.com/maujabur/box-maker-web/blob/main/geometry.js): `geometry.js`
- [Project JSON](https://github.com/maujabur/box-maker-web/blob/main/app.js): `app.js`

### 3D assembly

- [3D assembly view](https://github.com/maujabur/box-maker-web/blob/main/view3d.js): `view3d.js`
- **Three.js renderer**

### Other components

- **Box designer**

## Connections

- Box designer → Configuration app: configures (evidence: `README.md`)
- Design settings → Configuration app: supplies controls (evidence: `README.md`)
- Configuration app → Box geometry: builds design (evidence: `README.md`)
- Box geometry → Cut panels: generates (evidence: `geometry.js`)
- Configuration app → Sheet nesting: organizes sheets (evidence: `README.md`)
- Sheet nesting → Sheet preview: supplies layouts (evidence: `app.js`)
- Configuration app → SVG export: exports (evidence: `README.md`)
- Configuration app → DXF export: exports (evidence: `README.md`)
- Configuration app → Cutlist CSV: exports (evidence: `README.md`)
- Configuration app → Project JSON: saves and opens (evidence: `README.md`)
- Configuration app → Browser settings: persists settings (evidence: `app.js`)
- Configuration app → 3D assembly view: updates view (evidence: `app.js`)
- 3D assembly view → Three.js renderer: renders with (evidence: `README.md`)
- Box geometry → SVG export: serializes layout (evidence: `geometry.js`)
- Box geometry → DXF export: serializes layout (evidence: `geometry.js`)
