# benenwww/valutakoers-app architecture

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

- Interactive diagram: https://gitdiagram.com/benenwww/valutakoers-app
- Repository: https://github.com/benenwww/valutakoers-app

## Overview

This is a browser-based deposit-return tracker: users count deposit containers by category, see estimated refunds, and export or restore a session. The app also generates a PDF receipt with environmental estimates and reports client and server crashes to file logs. Edges follow visible imports, callbacks, and API handling; the README is empty, so unsampled capabilities and connections are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/benenwww/valutakoers-app/blob/main/src/App.tsx) (Tracker dashboard), [`src/types.ts`](https://github.com/benenwww/valutakoers-app/blob/main/src/types.ts) (Deposit data types), [`src/main.tsx`](https://github.com/benenwww/valutakoers-app/blob/main/src/main.tsx) (React app entry), [`src/components/ItemCard.tsx`](https://github.com/benenwww/valutakoers-app/blob/main/src/components/ItemCard.tsx) (Item counters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tracking["Deposit tracking"]
  node_app["Tracker dashboard<br/>[App.tsx]"]
  node_itemcard["Item counters<br/>[ItemCard.tsx]"]
  node_deposit_types["Deposit data types<br/>[types.ts]"]
end

subgraph group_session["Session handling"]
  node_session_storage[("Browser session storage")]
  node_json_import["JSON session import"]
end

subgraph group_outputs["Receipt outputs"]
  node_pdf["PDF receipt generator<br/>[pdfGenerator.ts]"]
  node_browser_download["Browser file download"]
end

subgraph group_diagnostics["Crash diagnostics"]
  node_app_entry["React app entry<br/>[main.tsx]"]
  node_error_boundary["Render error boundary<br/>[ErrorBoundary.tsx]"]
  node_crash_logger["Client crash reporter<br/>[crashLogger.ts]"]
  node_crash_api["Crash log endpoint<br/>[server.ts]"]
  node_log_files[("Crash log files")]
end

node_user(("User"))

node_user -->|"tracks deposits"| node_app
node_app -->|"renders counters"| node_itemcard
node_itemcard -->|"reports counts"| node_app
node_app -->|"uses data types"| node_deposit_types
node_itemcard -->|"uses data types"| node_deposit_types
node_app -->|"reads and writes"| node_session_storage
node_app -->|"renders importer"| node_json_import
node_json_import -->|"passes imported session"| node_app
node_json_import -->|"uses session type"| node_deposit_types
node_app -->|"generates receipt"| node_pdf
node_pdf -->|"uses item type"| node_deposit_types
node_pdf -->|"saves PDF"| node_browser_download
node_user -->|"exports session"| node_app
node_app_entry -->|"renders"| node_app
node_app_entry -->|"wraps app"| node_error_boundary
node_error_boundary -->|"reports render errors"| node_crash_logger
node_app_entry -->|"reports global errors"| node_crash_logger
node_crash_logger -->|"posts crash details"| node_crash_api
node_crash_api -->|"writes log files"| node_log_files

click node_app "https://github.com/benenwww/valutakoers-app/blob/main/src/App.tsx"
click node_itemcard "https://github.com/benenwww/valutakoers-app/blob/main/src/components/ItemCard.tsx"
click node_deposit_types "https://github.com/benenwww/valutakoers-app/blob/main/src/types.ts"
click node_json_import "https://github.com/benenwww/valutakoers-app/blob/main/src/components/JSONImportDropzone.tsx"
click node_pdf "https://github.com/benenwww/valutakoers-app/blob/main/src/utils/pdfGenerator.ts"
click node_app_entry "https://github.com/benenwww/valutakoers-app/blob/main/src/main.tsx"
click node_error_boundary "https://github.com/benenwww/valutakoers-app/blob/main/src/components/ErrorBoundary.tsx"
click node_crash_logger "https://github.com/benenwww/valutakoers-app/blob/main/src/utils/crashLogger.ts"
click node_crash_api "https://github.com/benenwww/valutakoers-app/blob/main/server.ts"

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_itemcard,node_deposit_types,node_user toneBlue
class node_session_storage,node_json_import toneAmber
class node_pdf,node_browser_download toneMint
class node_app_entry,node_error_boundary,node_crash_logger,node_crash_api,node_log_files toneRose
```

## Components

### Deposit tracking

- [Tracker dashboard](https://github.com/benenwww/valutakoers-app/blob/main/src/App.tsx): `src/App.tsx`
- [Item counters](https://github.com/benenwww/valutakoers-app/blob/main/src/components/ItemCard.tsx): `src/components/ItemCard.tsx`
- [Deposit data types](https://github.com/benenwww/valutakoers-app/blob/main/src/types.ts): `src/types.ts`

### Session handling

- **Browser session storage**
- [JSON session import](https://github.com/benenwww/valutakoers-app/blob/main/src/components/JSONImportDropzone.tsx): `src/components/JSONImportDropzone.tsx`

### Receipt outputs

- [PDF receipt generator](https://github.com/benenwww/valutakoers-app/blob/main/src/utils/pdfGenerator.ts): `src/utils/pdfGenerator.ts`
- **Browser file download**

### Crash diagnostics

- [React app entry](https://github.com/benenwww/valutakoers-app/blob/main/src/main.tsx): `src/main.tsx`
- [Render error boundary](https://github.com/benenwww/valutakoers-app/blob/main/src/components/ErrorBoundary.tsx): `src/components/ErrorBoundary.tsx`
- [Client crash reporter](https://github.com/benenwww/valutakoers-app/blob/main/src/utils/crashLogger.ts): `src/utils/crashLogger.ts`
- [Crash log endpoint](https://github.com/benenwww/valutakoers-app/blob/main/server.ts): `server.ts`
- **Crash log files**

### Other components

- **User**

## Connections

- User → Tracker dashboard: tracks deposits (evidence: `src/App.tsx`)
- Tracker dashboard → Item counters: renders counters (evidence: `src/App.tsx`)
- Item counters → Tracker dashboard: reports counts (evidence: `src/components/ItemCard.tsx`)
- Tracker dashboard → Deposit data types: uses data types (evidence: `src/App.tsx`)
- Item counters → Deposit data types: uses data types (evidence: `src/components/ItemCard.tsx`)
- Tracker dashboard → Browser session storage: reads and writes (evidence: `src/App.tsx`)
- Tracker dashboard → JSON session import: renders importer (evidence: `src/App.tsx`)
- JSON session import → Tracker dashboard: passes imported session (evidence: `src/components/JSONImportDropzone.tsx`)
- JSON session import → Deposit data types: uses session type (evidence: `src/components/JSONImportDropzone.tsx`)
- Tracker dashboard → PDF receipt generator: generates receipt (evidence: `src/App.tsx`)
- PDF receipt generator → Deposit data types: uses item type (evidence: `src/utils/pdfGenerator.ts`)
- PDF receipt generator → Browser file download: saves PDF (evidence: `src/utils/pdfGenerator.ts`)
- User → Tracker dashboard: exports session (evidence: `src/App.tsx`)
- React app entry → Tracker dashboard: renders (evidence: `src/main.tsx`)
- React app entry → Render error boundary: wraps app (evidence: `src/main.tsx`)
- Render error boundary → Client crash reporter: reports render errors (evidence: `src/components/ErrorBoundary.tsx`)
- React app entry → Client crash reporter: reports global errors (evidence: `src/main.tsx`)
- Client crash reporter → Crash log endpoint: posts crash details (evidence: `src/utils/crashLogger.ts`)
- Crash log endpoint → Crash log files: writes log files (evidence: `server.ts`)
