# black-butterfly-codes/eth-daddy architecture

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

- Interactive diagram: https://gitdiagram.com/black-butterfly-codes/eth-daddy
- Repository: https://github.com/black-butterfly-codes/eth-daddy

## Overview

ETH Daddy is an educational Ethereum domain marketplace. The browser entry mounts the React app, which loads network configuration and contract data, then renders navigation, search, and domain listings. Users can connect a wallet and purchase an unowned domain; domain cards read ownership and submit mint transactions. The contract is the on-chain authority for domain listings and ownership. The README documents the Ethers.js/MetaMask interaction model; the sampled app shows Web3Provider and contract calls, but does not expose a separate adapter module. Search is presentational in the sampled source.

Main entry points: [`src/App.js`](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/App.js) (Marketplace App), [`contracts/ETHDaddy.sol`](https://github.com/black-butterfly-codes/eth-daddy/blob/main/contracts/ETHDaddy.sol) (ETHDaddy Contract), [`src/index.js`](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/index.js) (React Entry), [`src/components/Domain.js`](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/components/Domain.js) (Domain Card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React Marketplace"]
  node_entry["React Entry<br/>[index.js]"]
  node_app["Marketplace App<br/>[App.js]"]
  node_navigation["Wallet Navigation<br/>[Navigation.js]"]
  node_search["Domain Search<br/>[Search.js]"]
  node_domain["Domain Card<br/>[Domain.js]"]
end

subgraph group_chain["Ethereum Domain Logic"]
  node_network_config["Network Config<br/>[config.json]"]
  node_contract_abi["Contract ABI<br/>[ETHDaddy.json]"]
  node_contract[("ETHDaddy Contract<br/>[ETHDaddy.sol]")]
end

subgraph group_telemetry["Runtime Reporting"]
  node_reporting["Vitals Reporter<br/>[reportWebVitals.js]"]
end

node_browser_user(("Browser User"))
node_wallet["MetaMask Wallet"]
node_ethereum[("Ethereum Network")]

node_browser_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_entry -->|"invokes"| node_reporting
node_app -->|"renders"| node_navigation
node_app -->|"renders"| node_search
node_app -->|"renders"| node_domain
node_navigation -->|"requests accounts"| node_wallet
node_app -.->|"uses provider"| node_wallet
node_app -->|"selects network"| node_network_config
node_app -->|"loads ABI"| node_contract_abi
node_app -->|"reads domains"| node_contract
node_domain -->|"reads ownership"| node_contract
node_domain -->|"mints domain"| node_contract
node_contract -->|"stores state"| node_ethereum

click node_entry "https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/index.js"
click node_app "https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/App.js"
click node_navigation "https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/components/Navigation.js"
click node_search "https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/components/Search.js"
click node_domain "https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/components/Domain.js"
click node_network_config "https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/config.json"
click node_contract_abi "https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/abis/ETHDaddy.json"
click node_contract "https://github.com/black-butterfly-codes/eth-daddy/blob/main/contracts/ETHDaddy.sol"
click node_reporting "https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/reportWebVitals.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_entry,node_app,node_navigation,node_search,node_domain,node_browser_user toneBlue
class node_network_config,node_contract_abi,node_contract,node_ethereum toneAmber
class node_reporting toneMint
class node_wallet toneIndigo
```

## Components

### React Marketplace

- [React Entry](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/index.js): `src/index.js`
- [Marketplace App](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/App.js): `src/App.js`
- [Wallet Navigation](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/components/Navigation.js): `src/components/Navigation.js`
- [Domain Search](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/components/Search.js): `src/components/Search.js`
- [Domain Card](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/components/Domain.js): `src/components/Domain.js`

### Ethereum Domain Logic

- [Network Config](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/config.json): `src/config.json`
- [Contract ABI](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/abis/ETHDaddy.json): `src/abis/ETHDaddy.json`
- [ETHDaddy Contract](https://github.com/black-butterfly-codes/eth-daddy/blob/main/contracts/ETHDaddy.sol): `contracts/ETHDaddy.sol`

### Runtime Reporting

- [Vitals Reporter](https://github.com/black-butterfly-codes/eth-daddy/blob/main/src/reportWebVitals.js): `src/reportWebVitals.js`

### Other components

- **Browser User**
- **MetaMask Wallet**
- **Ethereum Network**

## Connections

- Browser User → React Entry: opens app (evidence: `README.md`)
- React Entry → Marketplace App: renders (evidence: `src/index.js`)
- React Entry → Vitals Reporter: invokes (evidence: `src/index.js`)
- Marketplace App → Wallet Navigation: renders (evidence: `src/App.js`)
- Marketplace App → Domain Search: renders (evidence: `src/App.js`)
- Marketplace App → Domain Card: renders (evidence: `src/App.js`)
- Wallet Navigation → MetaMask Wallet: requests accounts (evidence: `src/components/Navigation.js`)
- Marketplace App → MetaMask Wallet: uses provider (evidence: `README.md`)
- Marketplace App → Network Config: selects network (evidence: `src/App.js`)
- Marketplace App → Contract ABI: loads ABI (evidence: `src/App.js`)
- Marketplace App → ETHDaddy Contract: reads domains (evidence: `src/App.js`)
- Domain Card → ETHDaddy Contract: reads ownership (evidence: `src/components/Domain.js`)
- Domain Card → ETHDaddy Contract: mints domain (evidence: `src/components/Domain.js`)
- ETHDaddy Contract → Ethereum Network: stores state (evidence: `README.md`)
