# ellouzati-mohammed/blockchain_project architecture

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

- Interactive diagram: https://gitdiagram.com/ellouzati-mohammed/blockchain_project
- Repository: https://github.com/ellouzati-mohammed/blockchain_project

## Overview

This is an educational Ethereum dApp: a user selects a Solidity exercise, the React interface loads its ABI and deployment details, checks the target, then performs a read call or submits a transaction and displays results and events. Solidity exercises are deployed to a local EVM through Truffle; generated artifacts are consumed by the client. The README documents wallet/network status, payable calls, deployment validation and event inspection. App.js is the main runtime boundary; sampled source does not expose every internal handler, so some capability links rely on README evidence.

Main entry points: [`migrations`](https://github.com/ellouzati-mohammed/blockchain_project/tree/main/migrations) (Contract migrations), [`client/src/App.js`](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/client/src/App.js) (dApp interface), [`client/src/index.js`](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/client/src/index.js) (React entry), [`contracts/Exercice7/Rectangle.sol`](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice7/Rectangle.sol) (Rectangle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_entry["React entry<br/>[index.js]"]
  node_app["dApp interface<br/>[App.js]"]
  node_perf["Vitals reporter<br/>[reportWebVitals.js]"]
  node_artifacts["Contract artifacts"]
end

subgraph group_contracts["Solidity exercises"]
  node_addition["Addition<br/>[Exercice1.sol]"]
  node_convert["Convertisseur<br/>[Exercice2.sol]"]
  node_strings["GestionChaines<br/>[Exercice3.sol]"]
  node_positive["Positif<br/>[Exercice4.sol]"]
  node_parity["Parite<br/>[Exercice5.sol]"]
  node_array["Tableau<br/>[Exercice6.sol]"]
  node_form["Forme<br/>[Form.sol]"]
  node_rectangle["Rectangle<br/>[Rectangle.sol]"]
  node_payment["Payment<br/>[Exercice8.sol]"]
end

subgraph group_deployment["Deployment"]
  node_migrations["Contract migrations"]
end

subgraph group_chain["Ethereum network"]
  node_evm[("Local EVM")]
end

node_user(("User / browser"))
node_web3["Web3.js"]
node_metamask["MetaMask"]
node_ganache["Ganache RPC"]

node_user -->|"opens"| node_entry
node_entry -->|"renders"| node_app
node_entry -->|"invokes"| node_perf
node_app -->|"loads ABIs"| node_artifacts
node_app -->|"uses"| node_web3
node_app -.->|"connects optionally"| node_metamask
node_app -->|"falls back to"| node_ganache
node_web3 -->|"reads / submits"| node_evm
node_metamask -.->|"provides access"| node_evm
node_ganache -->|"serves RPC"| node_evm
node_addition -.->|"deployed by"| node_migrations
node_convert -.->|"deployed by"| node_migrations
node_strings -.->|"deployed by"| node_migrations
node_positive -.->|"deployed by"| node_migrations
node_parity -.->|"deployed by"| node_migrations
node_array -.->|"deployed by"| node_migrations
node_rectangle -.->|"deployed by"| node_migrations
node_payment -.->|"deployed by"| node_migrations
node_form -.->|"inherited by"| node_rectangle
node_migrations -.->|"deploys to"| node_evm
node_migrations -->|"generates"| node_artifacts
node_app -->|"checks and inspects"| node_evm

click node_entry "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/client/src/index.js"
click node_app "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/client/src/App.js"
click node_perf "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/client/src/reportWebVitals.js"
click node_artifacts "https://github.com/ellouzati-mohammed/blockchain_project/tree/main/client/src/contracts"
click node_addition "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice1.sol"
click node_convert "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice2.sol"
click node_strings "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice3.sol"
click node_positive "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice4.sol"
click node_parity "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice5.sol"
click node_array "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice6.sol"
click node_form "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice7/Form.sol"
click node_rectangle "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice7/Rectangle.sol"
click node_payment "https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice8.sol"
click node_migrations "https://github.com/ellouzati-mohammed/blockchain_project/tree/main/migrations"

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_perf,node_artifacts,node_user toneBlue
class node_addition,node_convert,node_strings,node_positive,node_parity,node_array,node_form,node_rectangle,node_payment toneAmber
class node_migrations toneMint
class node_evm toneRose
class node_web3,node_metamask,node_ganache toneIndigo
```

## Components

### React client

- [React entry](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/client/src/index.js): `client/src/index.js`
- [dApp interface](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/client/src/App.js): `client/src/App.js`
- [Vitals reporter](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/client/src/reportWebVitals.js): `client/src/reportWebVitals.js`
- [Contract artifacts](https://github.com/ellouzati-mohammed/blockchain_project/tree/main/client/src/contracts): `client/src/contracts`

### Solidity exercises

- [Addition](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice1.sol): `contracts/Exercice1.sol`
- [Convertisseur](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice2.sol): `contracts/Exercice2.sol`
- [GestionChaines](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice3.sol): `contracts/Exercice3.sol`
- [Positif](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice4.sol): `contracts/Exercice4.sol`
- [Parite](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice5.sol): `contracts/Exercice5.sol`
- [Tableau](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice6.sol): `contracts/Exercice6.sol`
- [Forme](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice7/Form.sol): `contracts/Exercice7/Form.sol`
- [Rectangle](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice7/Rectangle.sol): `contracts/Exercice7/Rectangle.sol`
- [Payment](https://github.com/ellouzati-mohammed/blockchain_project/blob/main/contracts/Exercice8.sol): `contracts/Exercice8.sol`

### Deployment

- [Contract migrations](https://github.com/ellouzati-mohammed/blockchain_project/tree/main/migrations): `migrations`

### Ethereum network

- **Local EVM**

### Other components

- **User / browser**
- **Web3.js**
- **MetaMask**
- **Ganache RPC**

## Connections

- User / browser → React entry: opens (evidence: `README.md`)
- React entry → dApp interface: renders (evidence: `client/src/index.js`)
- React entry → Vitals reporter: invokes (evidence: `client/src/index.js`)
- dApp interface → Contract artifacts: loads ABIs (evidence: `client/src/App.js`)
- dApp interface → Web3.js: uses (evidence: `README.md`)
- dApp interface → MetaMask: connects optionally (evidence: `README.md`)
- dApp interface → Ganache RPC: falls back to (evidence: `client/src/App.js`)
- Web3.js → Local EVM: reads / submits (evidence: `README.md`)
- MetaMask → Local EVM: provides access (evidence: `README.md`)
- Ganache RPC → Local EVM: serves RPC (evidence: `README.md`)
- Addition → Contract migrations: deployed by
- Convertisseur → Contract migrations: deployed by
- GestionChaines → Contract migrations: deployed by
- Positif → Contract migrations: deployed by
- Parite → Contract migrations: deployed by
- Tableau → Contract migrations: deployed by
- Rectangle → Contract migrations: deployed by
- Payment → Contract migrations: deployed by
- Forme → Rectangle: inherited by
- Contract migrations → Local EVM: deploys to (evidence: `README.md`)
- Contract migrations → Contract artifacts: generates (evidence: `README.md`)
- dApp interface → Local EVM: checks and inspects (evidence: `README.md`)
