# avivijay19/hash-generator architecture

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

- Interactive diagram: https://gitdiagram.com/avivijay19/hash-generator
- Repository: https://github.com/avivijay19/hash-generator

## Overview

Hash Generator is an Android app for generating MD5 and SHA-family hashes, then copying or sharing the resulting text. The documented user journey is hash generation followed by result actions; the README also identifies an MVVM design and Android Navigation components. Source excerpts were not provided, so internal calls and screen routing cannot be verified; dashed, unverified links indicate likely flow rather than inspected implementation.

Main entry points: [`app/src/main/java/com/example/hashgenerator/SuccessFragment.kt`](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/SuccessFragment.kt) (Hash result screen), [`app/src/main/java/com/example/hashgenerator/HomeFragment.kt`](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/HomeFragment.kt) (Hash input screen), [`app/src/main/res/navigation/my_graph.xml`](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/res/navigation/my_graph.xml) (Navigation graph), [`app/src/main/java/com/example/hashgenerator/HomeViewModel.kt`](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/HomeViewModel.kt) (Home view model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["App interface"]
  node_home["Hash input screen<br/>[HomeFragment.kt]"]
  node_viewmodel["Home view model<br/>[HomeViewModel.kt]"]
  node_navigation["Navigation graph<br/>[my_graph.xml]"]
  node_activity["Main activity<br/>[MainActivity.kt]"]
end

subgraph group_hashing["Hash generation"]
  node_hashing_util["Hash utilities<br/>[Utils.kt]"]
end

subgraph group_results["Result actions"]
  node_success["Hash result screen<br/>[SuccessFragment.kt]"]
  node_clipboard["Android clipboard"]
  node_share_target(("Share destination"))
end

node_user(("App user"))

node_user -.->|"enters input"| node_home
node_home -.->|"delegates to"| node_viewmodel
node_viewmodel -.->|"requests hash"| node_hashing_util
node_home -.->|"uses navigation"| node_navigation
node_activity -.->|"hosts navigation"| node_navigation
node_navigation -.->|"routes to"| node_success
node_hashing_util -.->|"provides result"| node_success
node_success -->|"copies text"| node_clipboard
node_success -->|"shares text"| node_share_target

click node_home "https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/HomeFragment.kt"
click node_viewmodel "https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/HomeViewModel.kt"
click node_navigation "https://github.com/avivijay19/hash-generator/blob/master/app/src/main/res/navigation/my_graph.xml"
click node_activity "https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/MainActivity.kt"
click node_hashing_util "https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/Utils.kt"
click node_success "https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/SuccessFragment.kt"

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_home,node_viewmodel,node_navigation,node_activity,node_user toneBlue
class node_hashing_util toneAmber
class node_success,node_clipboard,node_share_target toneMint
```

## Components

### App interface

- [Hash input screen](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/HomeFragment.kt): `app/src/main/java/com/example/hashgenerator/HomeFragment.kt`
- [Home view model](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/HomeViewModel.kt): `app/src/main/java/com/example/hashgenerator/HomeViewModel.kt`
- [Navigation graph](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/res/navigation/my_graph.xml): `app/src/main/res/navigation/my_graph.xml`
- [Main activity](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/MainActivity.kt): `app/src/main/java/com/example/hashgenerator/MainActivity.kt`

### Hash generation

- [Hash utilities](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/Utils.kt): `app/src/main/java/com/example/hashgenerator/Utils.kt`

### Result actions

- [Hash result screen](https://github.com/avivijay19/hash-generator/blob/master/app/src/main/java/com/example/hashgenerator/SuccessFragment.kt): `app/src/main/java/com/example/hashgenerator/SuccessFragment.kt`
- **Android clipboard**
- **Share destination**

### Other components

- **App user**

## Connections

- App user → Hash input screen: enters input
- Hash input screen → Home view model: delegates to
- Home view model → Hash utilities: requests hash
- Hash input screen → Navigation graph: uses navigation
- Main activity → Navigation graph: hosts navigation
- Navigation graph → Hash result screen: routes to
- Hash utilities → Hash result screen: provides result
- Hash result screen → Android clipboard: copies text (evidence: `README.md`)
- Hash result screen → Share destination: shares text (evidence: `README.md`)
