# noorthistime/bitepix architecture

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

- Interactive diagram: https://gitdiagram.com/noorthistime/bitepix
- Repository: https://github.com/noorthistime/bitepix

## Overview

BitePix is a browser-only image converter with a localStorage-backed account and theme experience. The main workflow is: a user signs in, uploads and validates one image, adjusts output format, quality, and dimensions, then converts it in the browser and previews or downloads the result. ConverterContext coordinates image state and processing; image utilities handle metadata and canvas conversion. Authentication and theme preferences are separate branches. The source excerpts show the principal calls; unsampled UI components are included where README capabilities and the source index support them.

Main entry points: [`src/App.tsx`](https://github.com/noorthistime/bitepix/blob/main/src/App.tsx) (App shell), [`src/context/ConverterContext.tsx`](https://github.com/noorthistime/bitepix/blob/main/src/context/ConverterContext.tsx) (Conversion state), [`src/context/AuthContext.tsx`](https://github.com/noorthistime/bitepix/blob/main/src/context/AuthContext.tsx) (Auth state), [`src/components/ResultCard.tsx`](https://github.com/noorthistime/bitepix/blob/main/src/components/ResultCard.tsx) (Preview and download)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_app["App shell<br/>[App.tsx]"]
  node_theme["Theme preference<br/>[useTheme.ts]"]
  node_topbar["Account topbar<br/>[Topbar.tsx]"]
end

subgraph group_identity["Account and profile"]
  node_authscreen["Auth screen<br/>[AuthScreen.tsx]"]
  node_login["Login form<br/>[LoginForm.tsx]"]
  node_signup["Signup form<br/>[SignupForm.tsx]"]
  node_profile["Profile modal<br/>[ProfileModal.tsx]"]
  node_auth["Auth state<br/>[AuthContext.tsx]"]
  node_browserstore[("Browser localStorage")]
end

subgraph group_intake["Image intake"]
  node_upload["Upload and details<br/>[UploadZone.tsx]"]
  node_fileutils["File validation<br/>[fileUtils.ts]"]
  node_imagedetails["Image details view<br/>[ImageDetails.tsx]"]
end

subgraph group_conversion["Conversion workspace"]
  node_controls["Conversion controls<br/>[ControlPanel.tsx]"]
  node_converter["Conversion state"]
  node_imageutils["Image processing<br/>[imageUtils.ts]"]
  node_progress["Progress feedback<br/>[ProgressCard.tsx]"]
  node_result["Preview and download<br/>[ResultCard.tsx]"]
end

node_user(("Browser user"))

node_user -->|"uses"| node_app
node_app -->|"shows signed out"| node_authscreen
node_app -->|"renders"| node_topbar
node_app -->|"renders"| node_upload
node_app -->|"renders"| node_controls
node_app -->|"renders"| node_result
node_app -->|"renders"| node_profile
node_app -->|"reads theme"| node_theme
node_app -->|"provides auth"| node_auth
node_app -->|"provides conversion state"| node_converter
node_authscreen -->|"renders"| node_login
node_authscreen -->|"renders"| node_signup
node_login -->|"submits credentials"| node_auth
node_signup -->|"registers account"| node_auth
node_profile -->|"updates account"| node_auth
node_topbar -->|"reads session"| node_auth
node_topbar -->|"toggles theme"| node_theme
node_auth -->|"reads and writes"| node_browserstore
node_theme -->|"reads and writes"| node_browserstore
node_user -->|"selects image"| node_upload
node_upload -->|"sets source file"| node_converter
node_upload -->|"formats file size"| node_fileutils
node_converter -->|"validates file"| node_fileutils
node_converter -->|"loads and converts"| node_imageutils
node_controls -->|"updates settings and starts conversion"| node_converter
node_progress -->|"reads progress"| node_converter
node_result -->|"reads converted asset"| node_converter
node_result -->|"names download"| node_imageutils
node_result -->|"formats output size"| node_fileutils
node_user -->|"downloads output"| node_result
node_imagedetails -->|"formats image details"| node_fileutils
node_imagedetails -->|"reads source details"| node_converter

click node_app "https://github.com/noorthistime/bitepix/blob/main/src/App.tsx"
click node_theme "https://github.com/noorthistime/bitepix/blob/main/src/hooks/useTheme.ts"
click node_authscreen "https://github.com/noorthistime/bitepix/blob/main/src/components/AuthScreen.tsx"
click node_login "https://github.com/noorthistime/bitepix/blob/main/src/components/LoginForm.tsx"
click node_signup "https://github.com/noorthistime/bitepix/blob/main/src/components/SignupForm.tsx"
click node_profile "https://github.com/noorthistime/bitepix/blob/main/src/components/ProfileModal.tsx"
click node_auth "https://github.com/noorthistime/bitepix/blob/main/src/context/AuthContext.tsx"
click node_topbar "https://github.com/noorthistime/bitepix/blob/main/src/components/Topbar.tsx"
click node_upload "https://github.com/noorthistime/bitepix/blob/main/src/components/UploadZone.tsx"
click node_fileutils "https://github.com/noorthistime/bitepix/blob/main/src/lib/fileUtils.ts"
click node_imagedetails "https://github.com/noorthistime/bitepix/blob/main/src/components/ImageDetails.tsx"
click node_controls "https://github.com/noorthistime/bitepix/blob/main/src/components/ControlPanel.tsx"
click node_converter "https://github.com/noorthistime/bitepix/blob/main/src/context/ConverterContext.tsx"
click node_imageutils "https://github.com/noorthistime/bitepix/blob/main/src/lib/imageUtils.ts"
click node_progress "https://github.com/noorthistime/bitepix/blob/main/src/components/ProgressCard.tsx"
click node_result "https://github.com/noorthistime/bitepix/blob/main/src/components/ResultCard.tsx"

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_theme,node_topbar,node_user toneBlue
class node_authscreen,node_login,node_signup,node_profile,node_auth,node_browserstore toneAmber
class node_upload,node_fileutils,node_imagedetails toneMint
class node_controls,node_converter,node_imageutils,node_progress,node_result toneRose
```

## Components

### Application shell

- [App shell](https://github.com/noorthistime/bitepix/blob/main/src/App.tsx): `src/App.tsx`
- [Theme preference](https://github.com/noorthistime/bitepix/blob/main/src/hooks/useTheme.ts): `src/hooks/useTheme.ts`
- [Account topbar](https://github.com/noorthistime/bitepix/blob/main/src/components/Topbar.tsx): `src/components/Topbar.tsx`

### Account and profile

- [Auth screen](https://github.com/noorthistime/bitepix/blob/main/src/components/AuthScreen.tsx): `src/components/AuthScreen.tsx`
- [Login form](https://github.com/noorthistime/bitepix/blob/main/src/components/LoginForm.tsx): `src/components/LoginForm.tsx`
- [Signup form](https://github.com/noorthistime/bitepix/blob/main/src/components/SignupForm.tsx): `src/components/SignupForm.tsx`
- [Profile modal](https://github.com/noorthistime/bitepix/blob/main/src/components/ProfileModal.tsx): `src/components/ProfileModal.tsx`
- [Auth state](https://github.com/noorthistime/bitepix/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- **Browser localStorage**

### Image intake

- [Upload and details](https://github.com/noorthistime/bitepix/blob/main/src/components/UploadZone.tsx): `src/components/UploadZone.tsx`
- [File validation](https://github.com/noorthistime/bitepix/blob/main/src/lib/fileUtils.ts): `src/lib/fileUtils.ts`
- [Image details view](https://github.com/noorthistime/bitepix/blob/main/src/components/ImageDetails.tsx): `src/components/ImageDetails.tsx`

### Conversion workspace

- [Conversion controls](https://github.com/noorthistime/bitepix/blob/main/src/components/ControlPanel.tsx): `src/components/ControlPanel.tsx`
- [Conversion state](https://github.com/noorthistime/bitepix/blob/main/src/context/ConverterContext.tsx): `src/context/ConverterContext.tsx`
- [Image processing](https://github.com/noorthistime/bitepix/blob/main/src/lib/imageUtils.ts): `src/lib/imageUtils.ts`
- [Progress feedback](https://github.com/noorthistime/bitepix/blob/main/src/components/ProgressCard.tsx): `src/components/ProgressCard.tsx`
- [Preview and download](https://github.com/noorthistime/bitepix/blob/main/src/components/ResultCard.tsx): `src/components/ResultCard.tsx`

### Other components

- **Browser user**

## Connections

- Browser user → App shell: uses (evidence: `README.md`)
- App shell → Auth screen: shows signed out (evidence: `src/App.tsx`)
- App shell → Account topbar: renders (evidence: `src/App.tsx`)
- App shell → Upload and details: renders (evidence: `src/App.tsx`)
- App shell → Conversion controls: renders (evidence: `src/App.tsx`)
- App shell → Preview and download: renders (evidence: `src/App.tsx`)
- App shell → Profile modal: renders (evidence: `src/App.tsx`)
- App shell → Theme preference: reads theme (evidence: `src/App.tsx`)
- App shell → Auth state: provides auth (evidence: `src/App.tsx`)
- App shell → Conversion state: provides conversion state (evidence: `src/App.tsx`)
- Auth screen → Login form: renders (evidence: `src/components/AuthScreen.tsx`)
- Auth screen → Signup form: renders (evidence: `src/components/AuthScreen.tsx`)
- Login form → Auth state: submits credentials (evidence: `src/components/LoginForm.tsx`)
- Signup form → Auth state: registers account (evidence: `src/components/SignupForm.tsx`)
- Profile modal → Auth state: updates account (evidence: `src/components/ProfileModal.tsx`)
- Account topbar → Auth state: reads session (evidence: `src/components/Topbar.tsx`)
- Account topbar → Theme preference: toggles theme (evidence: `src/components/Topbar.tsx`)
- Auth state → Browser localStorage: reads and writes (evidence: `src/context/AuthContext.tsx`)
- Theme preference → Browser localStorage: reads and writes (evidence: `src/hooks/useTheme.ts`)
- Browser user → Upload and details: selects image (evidence: `README.md`)
- Upload and details → Conversion state: sets source file (evidence: `src/components/UploadZone.tsx`)
- Upload and details → File validation: formats file size (evidence: `src/components/UploadZone.tsx`)
- Conversion state → File validation: validates file (evidence: `src/context/ConverterContext.tsx`)
- Conversion state → Image processing: loads and converts (evidence: `src/context/ConverterContext.tsx`)
- Conversion controls → Conversion state: updates settings and starts conversion (evidence: `src/components/ControlPanel.tsx`)
- Progress feedback → Conversion state: reads progress (evidence: `src/components/ProgressCard.tsx`)
- Preview and download → Conversion state: reads converted asset (evidence: `src/components/ResultCard.tsx`)
- Preview and download → Image processing: names download (evidence: `src/components/ResultCard.tsx`)
- Preview and download → File validation: formats output size (evidence: `src/components/ResultCard.tsx`)
- Browser user → Preview and download: downloads output (evidence: `README.md`)
- Image details view → File validation: formats image details (evidence: `src/components/ImageDetails.tsx`)
- Image details view → Conversion state: reads source details (evidence: `src/components/ImageDetails.tsx`)
