# shah-shivam-410/image-resizer-app architecture

> Architecture diagram of the GitHub repository shah-shivam-410/image-resizer-app, 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/shah-shivam-410/image-resizer-app
- Repository: https://github.com/shah-shivam-410/image-resizer-app

## Overview

Image-Resizer-App is a browser-only image resizing and compression tool. Users select an image, choose a preset or enter dimensions and DPI, set an output format and target size, process locally, preview the result, and download it. The editor coordinates upload and processing state; image processing resamples with Pica and encodes toward the requested size. The README documents privacy and major capabilities; connections for unsampled components are shown only where the README or SOURCE INDEX supports them.

Main entry points: [`src/pages/EditorPage.jsx`](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/pages/EditorPage.jsx) (Editor page), [`src/components/OutputPanel.jsx`](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/OutputPanel.jsx) (Output and download), [`src/hooks/useImageUpload.js`](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/hooks/useImageUpload.js) (Upload state), [`src/components/ResizeControls.jsx`](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ResizeControls.jsx) (Resize controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App entry<br/>[App.jsx]"]
  node_editor["Editor page<br/>[EditorPage.jsx]"]
  node_original_preview["Original preview<br/>[ImagePreview.jsx]"]
  node_progress["Progress display<br/>[ProgressBar.jsx]"]
  node_output_panel["Output and download<br/>[OutputPanel.jsx]"]
  node_output_preview["Result preview<br/>[ImagePreview.jsx]"]
  node_button["Action button<br/>[Button.jsx]"]
end

subgraph group_upload["Image intake"]
  node_dropzone["Image dropzone<br/>[Dropzone.jsx]"]
  node_upload_state["Upload state<br/>[useImageUpload.js]"]
  node_validation["File validation<br/>[validation.js]"]
  node_image_meta["Image metadata<br/>[imageMeta.js]"]
end

subgraph group_settings["Resize settings"]
  node_resize_controls["Resize controls<br/>[ResizeControls.jsx]"]
  node_presets["Resize presets<br/>[presets.js]"]
  node_dimensions["Dimension conversion<br/>[dimensions.js]"]
  node_compression_controls["Compression controls"]
end

subgraph group_processing["Local processing"]
  node_processor_hook["Processing state"]
  node_image_processor["Image processing<br/>[imageProcessor.js]"]
  node_file_utils["File utilities<br/>[fileUtils.js]"]
end

node_user(("Image user"))

node_user -->|"uses"| node_editor
node_app -->|"renders"| node_editor
node_editor -->|"renders"| node_dropzone
node_editor -->|"selects files"| node_upload_state
node_upload_state -->|"validates"| node_validation
node_upload_state -->|"reads dimensions"| node_image_meta
node_editor -->|"renders"| node_original_preview
node_dropzone -->|"uses types"| node_presets
node_editor -->|"renders"| node_resize_controls
node_resize_controls -->|"applies presets"| node_presets
node_resize_controls -->|"converts units"| node_dimensions
node_editor -->|"renders"| node_compression_controls
node_editor -->|"starts processing"| node_processor_hook
node_processor_hook -->|"calls processor"| node_image_processor
node_image_processor -->|"decodes image"| node_image_meta
node_image_processor -->|"converts sizes"| node_file_utils
node_editor -->|"renders progress"| node_progress
node_editor -->|"renders result"| node_output_panel
node_output_panel -->|"renders preview"| node_output_preview
node_output_panel -->|"uses actions"| node_button
node_output_panel -->|"names download"| node_file_utils
node_output_preview -->|"formats size"| node_file_utils

click node_app "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/App.jsx"
click node_editor "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/pages/EditorPage.jsx"
click node_dropzone "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/Dropzone.jsx"
click node_upload_state "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/hooks/useImageUpload.js"
click node_validation "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/utils/validation.js"
click node_image_meta "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/utils/imageMeta.js"
click node_original_preview "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ImagePreview.jsx"
click node_resize_controls "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ResizeControls.jsx"
click node_presets "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/constants/presets.js"
click node_dimensions "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/utils/dimensions.js"
click node_compression_controls "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/CompressionControls.jsx"
click node_processor_hook "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/hooks/useImageProcessor.js"
click node_image_processor "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/services/imageProcessor.js"
click node_file_utils "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/utils/fileUtils.js"
click node_progress "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ProgressBar.jsx"
click node_output_panel "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/OutputPanel.jsx"
click node_output_preview "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ImagePreview.jsx"
click node_button "https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/Button.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_app,node_editor,node_original_preview,node_progress,node_output_panel,node_output_preview,node_button,node_user toneBlue
class node_dropzone,node_upload_state,node_validation,node_image_meta toneAmber
class node_resize_controls,node_presets,node_dimensions,node_compression_controls toneMint
class node_processor_hook,node_image_processor,node_file_utils toneRose
```

## Components

### App experience

- [App entry](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/App.jsx): `src/App.jsx`
- [Editor page](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/pages/EditorPage.jsx): `src/pages/EditorPage.jsx`
- [Original preview](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ImagePreview.jsx): `src/components/ImagePreview.jsx`
- [Progress display](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ProgressBar.jsx): `src/components/ProgressBar.jsx`
- [Output and download](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/OutputPanel.jsx): `src/components/OutputPanel.jsx`
- [Result preview](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ImagePreview.jsx): `src/components/ImagePreview.jsx`
- [Action button](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/Button.jsx): `src/components/Button.jsx`

### Image intake

- [Image dropzone](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/Dropzone.jsx): `src/components/Dropzone.jsx`
- [Upload state](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/hooks/useImageUpload.js): `src/hooks/useImageUpload.js`
- [File validation](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/utils/validation.js): `src/utils/validation.js`
- [Image metadata](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/utils/imageMeta.js): `src/utils/imageMeta.js`

### Resize settings

- [Resize controls](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/ResizeControls.jsx): `src/components/ResizeControls.jsx`
- [Resize presets](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/constants/presets.js): `src/constants/presets.js`
- [Dimension conversion](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/utils/dimensions.js): `src/utils/dimensions.js`
- [Compression controls](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/components/CompressionControls.jsx): `src/components/CompressionControls.jsx`

### Local processing

- [Processing state](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/hooks/useImageProcessor.js): `src/hooks/useImageProcessor.js`
- [Image processing](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/services/imageProcessor.js): `src/services/imageProcessor.js`
- [File utilities](https://github.com/shah-shivam-410/image-resizer-app/blob/main/src/utils/fileUtils.js): `src/utils/fileUtils.js`

### Other components

- **Image user**

## Connections

- Image user → Editor page: uses (evidence: `README.md`)
- App entry → Editor page: renders (evidence: `src/App.jsx`)
- Editor page → Image dropzone: renders (evidence: `src/pages/EditorPage.jsx`)
- Editor page → Upload state: selects files (evidence: `src/pages/EditorPage.jsx`)
- Upload state → File validation: validates (evidence: `src/hooks/useImageUpload.js`)
- Upload state → Image metadata: reads dimensions (evidence: `src/hooks/useImageUpload.js`)
- Editor page → Original preview: renders (evidence: `src/pages/EditorPage.jsx`)
- Image dropzone → Resize presets: uses types (evidence: `src/components/Dropzone.jsx`)
- Editor page → Resize controls: renders (evidence: `src/pages/EditorPage.jsx`)
- Resize controls → Resize presets: applies presets (evidence: `src/components/ResizeControls.jsx`)
- Resize controls → Dimension conversion: converts units (evidence: `src/components/ResizeControls.jsx`)
- Editor page → Compression controls: renders (evidence: `src/pages/EditorPage.jsx`)
- Editor page → Processing state: starts processing (evidence: `src/pages/EditorPage.jsx`)
- Processing state → Image processing: calls processor (evidence: `src/hooks/useImageProcessor.js`)
- Image processing → Image metadata: decodes image (evidence: `src/services/imageProcessor.js`)
- Image processing → File utilities: converts sizes (evidence: `src/services/imageProcessor.js`)
- Editor page → Progress display: renders progress (evidence: `src/pages/EditorPage.jsx`)
- Editor page → Output and download: renders result (evidence: `src/pages/EditorPage.jsx`)
- Output and download → Result preview: renders preview (evidence: `src/components/OutputPanel.jsx`)
- Output and download → Action button: uses actions (evidence: `src/components/OutputPanel.jsx`)
- Output and download → File utilities: names download (evidence: `src/components/OutputPanel.jsx`)
- Result preview → File utilities: formats size (evidence: `src/components/ImagePreview.jsx`)
