# yaasiinaxmed/todo-list-smartcontract architecture

> Architecture diagram of the GitHub repository yaasiinaxmed/todo-list-smartcontract, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yaasiinaxmed/todo-list-smartcontract
- Repository: https://github.com/yaasiinaxmed/todo-list-smartcontract

## Overview

##### Project type and purpose
- This is a blockchain “Todo DApp” project focused on a single smart contract backed by the Ethereum Sepolia testnet.
- The repository contains only the on-chain assets (contract source, compilation artifacts, tests), while the UI lives in a separate frontend repo deployed on Vercel.
- Its purpose: let users add, complete, and fetch to-do items via a web frontend that talks to the deployed smart contract.

##### File structure
- Top‐level:
- `.deps/` and `.deps/remix-tests/` → Remix test harness and dependencies
- `artifacts/` → compiled contract JSON (ABI, bytecode, metadata)
- `scenario.json` → test/deployment scenario config
- `README.md` → high-level project description
- `.prettierrc.json` → code formatter rules
- No `src/` or `contracts/` folder shown, but artifacts imply a single `TodoList.sol` source compiled by Remix or a Hardhat‐style tool.
- No backend server code; blockchain is the “server.”

##### README for additional insights
- Contract is deployed at a known Sepolia address.
- Features: add tasks, mark complete, retrieve tasks.
- Frontend reference is an external repo.

##### Elements
- Developer Tools
- Build & Deployment
- Blockchain Network
- Frontend
- External Services
- From code → compiler → artifacts → deployment → blockchain.
- From UI → Web3 provider → Sepolia → contract.
- From blockchain → Etherscan.
- Blue for off-chain (Dev & UI),
- Green for on-chain (Blockchain & Contract),
- Gray for external (RPC, Etherscan).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Tools
    subgraph "Developer Tools"
        direction TB
        IDE["Remix IDE"]:::dev
        ContractSrc["TodoList.sol"]:::dev
        RemixTests["Remix Tests"]:::dev
        Prettier[".prettierrc.json"]:::dev
        Readme["README.md"]:::dev
    end

    %% Build & Deployment
    subgraph "Build & Deployment"
        direction TB
        Compiler["Solidity Compiler"]:::dev
        Artifact["TodoList.json (ABI+Bytecode)"]:::dev
        Metadata["TodoList_metadata.json"]:::dev
        BuildInfo["9ddfb7a4bb5d9f537d67c8c966a5b65e.json"]:::dev
        Scenario["scenario.json"]:::dev
        Deployer["Deployment Script"]:::dev
    end

    %% Blockchain Network
    subgraph "Blockchain Network"
        direction TB
        Sepolia["Sepolia Testnet"]:::chain
        DeployedContract["TodoList Contract"]:::chain
    end

    %% Frontend
    subgraph "Frontend"
        direction TB
        ReactUI["React/Next.js UI"]:::ui
        Vercel["Vercel Hosting"]:::ui
        Wallet["MetaMask"]:::ui
        EthersJS["Ethers.js"]:::ui
    end

    %% External Services
    subgraph "External Services"
        direction TB
        RPC["RPC Provider\n(Infura/Alchemy)"]:::ext
        Etherscan["Etherscan Explorer"]:::ext
    end

    %% Connections
    ContractSrc -->|"compiled by"| Compiler
    RemixTests -->|"run tests on"| ContractSrc
    Prettier -->|"formats"| ContractSrc
    Readme -->|"describes project"| ContractSrc

    Compiler -->|"outputs"| Artifact
    Compiler -->|"outputs"| Metadata
    Compiler -->|"outputs"| BuildInfo
    Scenario -->|"configures"| Deployer
    Artifact -->|"used by"| Deployer
    Metadata -->|"used by"| Deployer
    BuildInfo -->|"used by"| Deployer

    Deployer -->|"deploys via RPC"| Sepolia
    Sepolia -->|"hosts"| DeployedContract

    ReactUI -->|"connects via"| EthersJS
    EthersJS -->|"through"| Wallet
    Wallet -->|"sends tx to"| RPC
    RPC -->|"forwards tx to"| Sepolia
    ReactUI -->|"fetches ABI from"| Artifact

    Sepolia -->|"verifies tx on"| Etherscan
    DeployedContract -->|"state stored on"| Sepolia

    ReactUI -->|"hosted on"| Vercel

    %% Click Events
    click RemixTests "https://github.com/yaasiinaxmed/todo-list-smartcontract/tree/main/.deps/remix-tests"
    click Prettier "https://github.com/yaasiinaxmed/todo-list-smartcontract/blob/main/.prettierrc.json"
    click Readme "https://github.com/yaasiinaxmed/todo-list-smartcontract/blob/main/README.md"
    click Artifact "https://github.com/yaasiinaxmed/todo-list-smartcontract/blob/main/artifacts/TodoList.json"
    click Metadata "https://github.com/yaasiinaxmed/todo-list-smartcontract/blob/main/artifacts/TodoList_metadata.json"
    click BuildInfo "https://github.com/yaasiinaxmed/todo-list-smartcontract/blob/main/artifacts/build-info/9ddfb7a4bb5d9f537d67c8c966a5b65e.json"
    click Scenario "https://github.com/yaasiinaxmed/todo-list-smartcontract/blob/main/scenario.json"

    %% Styles
    classDef dev fill:#D0E1FF,stroke:#0366d6,color:#0366d6,stroke-width:1.5px;
    classDef chain fill:#CFF5D2,stroke:#22863a,color:#22863a,stroke-width:1.5px;
    classDef ui fill:#FFE0B2,stroke:#d2691e,color:#d2691e,stroke-width:1.5px;
    classDef ext fill:#E0E0E0,stroke:#586069,color:#586069,stroke-width:1.5px;
```
