# jaevibing/dnredeem architecture

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

- Interactive diagram: https://gitdiagram.com/jaevibing/dnredeem
- Repository: https://github.com/jaevibing/dnredeem

## Overview

DNRedeem is a Chromium extension for scambaiting: it intercepts Google Play’s redeem interface and simulates a gift-card redemption without adding real account balance. The principal flow is a user entering a 16-character code, seeing a confirmation with a value inferred from its suffix, then seeing a fabricated success result. The sampled runtime also masks the displayed email and changes the displayed balance label. The source excerpt shows these behaviors in one file; extension loading and styling details were not inspected.

Main entry points: [`googlePlay/main.js`](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js) (DOM observer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_page["Page interaction"]
  node_observer["DOM observer<br/>[main.js]"]
  node_redeem["Redeem interception<br/>[main.js]"]
  node_exit["Exit navigation<br/>[main.js]"]
end

subgraph group_simulation["Redemption simulation"]
  node_value["Code value rules<br/>[main.js]"]
  node_confirmation["Confirmation UI<br/>[main.js]"]
  node_fake_result["Fake result flow<br/>[main.js]"]
end

subgraph group_presentation["Account presentation"]
  node_email["Email masking<br/>[main.js]"]
  node_balance["Balance label edit<br/>[main.js]"]
end

node_user(("User"))
node_googleplay["Google Play page"]

node_user -->|"uses"| node_googleplay
node_googleplay -.->|"hosts"| node_observer
node_observer -->|"detects buttons"| node_redeem
node_observer -->|"calls masking"| node_email
node_redeem -->|"handles click"| node_confirmation
node_confirmation -->|"maps suffix"| node_value
node_confirmation -->|"sets handler"| node_fake_result
node_fake_result -->|"sets exit handler"| node_exit
node_balance -->|"edits page text"| node_googleplay

click node_observer "https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js"
click node_redeem "https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js"
click node_value "https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js"
click node_confirmation "https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js"
click node_fake_result "https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js"
click node_email "https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js"
click node_balance "https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js"
click node_exit "https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.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_observer,node_redeem,node_exit,node_user toneBlue
class node_value,node_confirmation,node_fake_result toneAmber
class node_email,node_balance toneMint
class node_googleplay toneIndigo
```

## Components

### Page interaction

- [DOM observer](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js): `googlePlay/main.js`
- [Redeem interception](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js): `googlePlay/main.js`
- [Exit navigation](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js): `googlePlay/main.js`

### Redemption simulation

- [Code value rules](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js): `googlePlay/main.js`
- [Confirmation UI](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js): `googlePlay/main.js`
- [Fake result flow](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js): `googlePlay/main.js`

### Account presentation

- [Email masking](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js): `googlePlay/main.js`
- [Balance label edit](https://github.com/jaevibing/dnredeem/blob/master/googlePlay/main.js): `googlePlay/main.js`

### Other components

- **User**
- **Google Play page**

## Connections

- User → Google Play page: uses (evidence: `README.md`)
- Google Play page → DOM observer: hosts
- DOM observer → Redeem interception: detects buttons (evidence: `googlePlay/main.js`)
- DOM observer → Email masking: calls masking (evidence: `googlePlay/main.js`)
- Redeem interception → Confirmation UI: handles click (evidence: `googlePlay/main.js`)
- Confirmation UI → Code value rules: maps suffix (evidence: `googlePlay/main.js`)
- Confirmation UI → Fake result flow: sets handler (evidence: `googlePlay/main.js`)
- Fake result flow → Exit navigation: sets exit handler (evidence: `googlePlay/main.js`)
- Balance label edit → Google Play page: edits page text (evidence: `googlePlay/main.js`)
