# dumbross/snapsend architecture

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

- Interactive diagram: https://gitdiagram.com/dumbross/snapsend
- Repository: https://github.com/dumbross/snapsend

## Overview

SnapSend is a browser-based image submission app: users capture or upload photos, add issue and contact details, choose a branch, optionally request AI summarization, and submit for email delivery. The visible client coordinates the API requests and presents a receipt; photo metadata is extracted during capture. The API route files and service worker are identified by the tree and source index, but their implementation details were not excerpted, so their internal behavior and integrations are not asserted. The README gives no further product-capability detail.

Main entry points: [`src/App.tsx`](https://github.com/dumbross/snapsend/blob/main/src/App.tsx) (App Coordinator), [`src/components/CameraCapture.tsx`](https://github.com/dumbross/snapsend/blob/main/src/components/CameraCapture.tsx) (Camera And Upload), [`api/analyze-issue.ts`](https://github.com/dumbross/snapsend/blob/main/api/analyze-issue.ts) (Issue Analysis Route), [`api/upload.ts`](https://github.com/dumbross/snapsend/blob/main/api/upload.ts) (Image Upload Route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Submission Client"]
  node_app["App Coordinator<br/>[App.tsx]"]
  node_form["Issue Form<br/>[SubmissionForm.tsx]"]
  node_triage["AI Triage Badge<br/>[AiTriageBadge.tsx]"]
  node_receipt["Submission Receipt<br/>[ReceiptModal.tsx]"]
end

subgraph group_capture["Photo Capture"]
  node_camera["Camera And Upload<br/>[CameraCapture.tsx]"]
  node_exif["EXIF Extraction<br/>[exif.ts]"]
end

subgraph group_api["API Routes"]
  node_analyze["Issue Analysis Route<br/>[analyze-issue.ts]"]
  node_upload["Image Upload Route<br/>[upload.ts]"]
  node_health["Health Route<br/>[health.ts]"]
end

subgraph group_settings["Branch And Settings"]
  node_branchdata["Branch Directory<br/>[branches.ts]"]
  node_settingsmodal["Gateway Settings"]
  node_header["Status Header<br/>[Header.tsx]"]
  node_logo["SnapSend Logo<br/>[SnapSendLogo.tsx]"]
end

subgraph group_pwa["PWA Experience"]
  node_pwaprompt["iOS Install Prompt<br/>[IosPwaPrompt.tsx]"]
  node_serviceworker["Service Worker<br/>[sw.js]"]
end

node_user(("Submitter"))
node_smtp["SMTP Mail Service"]
node_gemini["Gemini API"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_camera
node_app -->|"renders"| node_form
node_app -->|"renders"| node_header
node_app -->|"renders"| node_receipt
node_app -->|"renders"| node_settingsmodal
node_app -->|"renders"| node_triage
node_app -->|"renders"| node_pwaprompt
node_camera -->|"extracts metadata"| node_exif
node_header -->|"renders"| node_logo
node_settingsmodal -->|"looks up branch"| node_branchdata
node_app -->|"selects destination"| node_branchdata
node_app -->|"requests status"| node_health
node_app -->|"submits images"| node_upload
node_app -->|"requests analysis"| node_analyze
node_upload -.->|"may dispatch email"| node_smtp
node_analyze -.->|"may request analysis"| node_gemini

click node_app "https://github.com/dumbross/snapsend/blob/main/src/App.tsx"
click node_form "https://github.com/dumbross/snapsend/blob/main/src/components/SubmissionForm.tsx"
click node_triage "https://github.com/dumbross/snapsend/blob/main/src/components/AiTriageBadge.tsx"
click node_receipt "https://github.com/dumbross/snapsend/blob/main/src/components/ReceiptModal.tsx"
click node_camera "https://github.com/dumbross/snapsend/blob/main/src/components/CameraCapture.tsx"
click node_exif "https://github.com/dumbross/snapsend/blob/main/src/lib/exif.ts"
click node_analyze "https://github.com/dumbross/snapsend/blob/main/api/analyze-issue.ts"
click node_upload "https://github.com/dumbross/snapsend/blob/main/api/upload.ts"
click node_health "https://github.com/dumbross/snapsend/blob/main/api/health.ts"
click node_branchdata "https://github.com/dumbross/snapsend/blob/main/src/data/branches.ts"
click node_settingsmodal "https://github.com/dumbross/snapsend/blob/main/src/components/SmtpSettingsModal.tsx"
click node_header "https://github.com/dumbross/snapsend/blob/main/src/components/Header.tsx"
click node_logo "https://github.com/dumbross/snapsend/blob/main/src/components/SnapSendLogo.tsx"
click node_pwaprompt "https://github.com/dumbross/snapsend/blob/main/src/components/IosPwaPrompt.tsx"
click node_serviceworker "https://github.com/dumbross/snapsend/blob/main/public/sw.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_form,node_triage,node_receipt toneBlue
class node_camera,node_exif toneAmber
class node_analyze,node_upload,node_health,node_gemini toneMint
class node_branchdata,node_settingsmodal,node_header,node_logo toneRose
class node_pwaprompt,node_serviceworker,node_user,node_smtp toneIndigo
```

## Components

### Submission Client

- [App Coordinator](https://github.com/dumbross/snapsend/blob/main/src/App.tsx): `src/App.tsx`
- [Issue Form](https://github.com/dumbross/snapsend/blob/main/src/components/SubmissionForm.tsx): `src/components/SubmissionForm.tsx`
- [AI Triage Badge](https://github.com/dumbross/snapsend/blob/main/src/components/AiTriageBadge.tsx): `src/components/AiTriageBadge.tsx`
- [Submission Receipt](https://github.com/dumbross/snapsend/blob/main/src/components/ReceiptModal.tsx): `src/components/ReceiptModal.tsx`

### Photo Capture

- [Camera And Upload](https://github.com/dumbross/snapsend/blob/main/src/components/CameraCapture.tsx): `src/components/CameraCapture.tsx`
- [EXIF Extraction](https://github.com/dumbross/snapsend/blob/main/src/lib/exif.ts): `src/lib/exif.ts`

### API Routes

- [Issue Analysis Route](https://github.com/dumbross/snapsend/blob/main/api/analyze-issue.ts): `api/analyze-issue.ts`
- [Image Upload Route](https://github.com/dumbross/snapsend/blob/main/api/upload.ts): `api/upload.ts`
- [Health Route](https://github.com/dumbross/snapsend/blob/main/api/health.ts): `api/health.ts`

### Branch And Settings

- [Branch Directory](https://github.com/dumbross/snapsend/blob/main/src/data/branches.ts): `src/data/branches.ts`
- [Gateway Settings](https://github.com/dumbross/snapsend/blob/main/src/components/SmtpSettingsModal.tsx): `src/components/SmtpSettingsModal.tsx`
- [Status Header](https://github.com/dumbross/snapsend/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [SnapSend Logo](https://github.com/dumbross/snapsend/blob/main/src/components/SnapSendLogo.tsx): `src/components/SnapSendLogo.tsx`

### PWA Experience

- [iOS Install Prompt](https://github.com/dumbross/snapsend/blob/main/src/components/IosPwaPrompt.tsx): `src/components/IosPwaPrompt.tsx`
- [Service Worker](https://github.com/dumbross/snapsend/blob/main/public/sw.js): `public/sw.js`

### Other components

- **Submitter**
- **SMTP Mail Service**
- **Gemini API**

## Connections

- Submitter → App Coordinator: uses
- App Coordinator → Camera And Upload: renders (evidence: `src/App.tsx`)
- App Coordinator → Issue Form: renders (evidence: `src/App.tsx`)
- App Coordinator → Status Header: renders (evidence: `src/App.tsx`)
- App Coordinator → Submission Receipt: renders (evidence: `src/App.tsx`)
- App Coordinator → Gateway Settings: renders (evidence: `src/App.tsx`)
- App Coordinator → AI Triage Badge: renders (evidence: `src/App.tsx`)
- App Coordinator → iOS Install Prompt: renders (evidence: `src/App.tsx`)
- Camera And Upload → EXIF Extraction: extracts metadata (evidence: `src/components/CameraCapture.tsx`)
- Status Header → SnapSend Logo: renders (evidence: `src/components/Header.tsx`)
- Gateway Settings → Branch Directory: looks up branch (evidence: `src/components/SmtpSettingsModal.tsx`)
- App Coordinator → Branch Directory: selects destination (evidence: `src/App.tsx`)
- App Coordinator → Health Route: requests status (evidence: `src/App.tsx`)
- App Coordinator → Image Upload Route: submits images (evidence: `src/App.tsx`)
- App Coordinator → Issue Analysis Route: requests analysis (evidence: `src/App.tsx`)
- Image Upload Route → SMTP Mail Service: may dispatch email
- Issue Analysis Route → Gemini API: may request analysis
