# mehetab-01/monconnect architecture

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

- Interactive diagram: https://gitdiagram.com/mehetab-01/monconnect
- Repository: https://github.com/mehetab-01/monconnect

## Overview

MonConnect is a React/TypeScript dApp for organizer–service-provider collaboration, NFT identity, escrow payments, and jury dispute resolution on Monad. Users choose a role, connect a wallet, and enter a role dashboard; organizers manage work and escrow, providers manage profiles and escrow jobs, and jurors access the dispute experience. The frontend’s chain helpers provide NFT and contract access. The README documents AVS voting, notifications, and an immutable ledger, but their detailed implementation is not shown in the sampled source, so those connections are represented cautiously.

Main entry points: [`src/App.tsx`](https://github.com/mehetab-01/monconnect/blob/main/src/App.tsx) (Role routing), [`src/utils/nft.ts`](https://github.com/mehetab-01/monconnect/blob/main/src/utils/nft.ts) (NFT identity utilities), [`src/pages/OrganizerDashboard.tsx`](https://github.com/mehetab-01/monconnect/blob/main/src/pages/OrganizerDashboard.tsx) (Organizer workspace), [`src/pages/EscrowAndPayments.tsx`](https://github.com/mehetab-01/monconnect/blob/main/src/pages/EscrowAndPayments.tsx) (Escrow and payments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and identity"]
  node_app["Role routing<br/>[App.tsx]"]
  node_organizer_auth["Organizer sign-in<br/>[OrganizerAuth.tsx]"]
  node_provider_auth["Provider sign-in<br/>[ServiceAuth.tsx]"]
  node_identity_guard["NFT access guard<br/>[NFTGuard.tsx]"]
  node_wallet_ui["Wallet controls<br/>[WalletButton.tsx]"]
  node_background["Visual background"]
end

subgraph group_work["Organizer and provider workflow"]
  node_home_dashboard["Dashboard landing<br/>[Dashboard.tsx]"]
  node_organizer_dash["Organizer workspace"]
  node_provider_dash["Provider workspace"]
  node_organizer_escrow["Escrow and payments"]
  node_provider_escrow["Provider escrow jobs"]
end

subgraph group_chain["Blockchain access"]
  node_nft_access["NFT identity utilities<br/>[nft.ts]"]
  node_contract_config["Contract interface<br/>[chainConnectV2.ts]"]
  node_escrow_compat["Escrow compatibility<br/>[escrow.ts]"]
  node_escrow_contract{{"Escrow contract"}}
end

subgraph group_jury["Jury and disputes"]
  node_jury_auth["Jury sign-in<br/>[JuryAuth.tsx]"]
  node_jury_dash["Jury workspace<br/>[JuryDashboard.tsx]"]
end

node_organizer(("Organizer"))
node_provider(("Service provider"))
node_juror(("Juror"))
node_monad{{"Monad network"}}
node_metamask{{"Wallet provider"}}
node_avs{{"AVS validators"}}

node_organizer -->|"chooses role"| node_app
node_provider -->|"chooses role"| node_app
node_juror -->|"chooses role"| node_app
node_app -->|"routes to"| node_organizer_auth
node_app -->|"routes to"| node_provider_auth
node_app -->|"routes to"| node_jury_auth
node_app -->|"routes to"| node_home_dashboard
node_app -->|"routes to"| node_organizer_dash
node_app -->|"routes to"| node_provider_dash
node_app -->|"routes to"| node_jury_dash
node_app -->|"guards routes"| node_identity_guard
node_app -->|"renders"| node_background
node_organizer_auth -->|"checks identity"| node_nft_access
node_provider_auth -->|"checks and mints"| node_nft_access
node_jury_auth -.->|"requests wallet"| node_metamask
node_identity_guard -->|"checks ownership"| node_nft_access
node_wallet_ui -->|"gets provider"| node_nft_access
node_organizer_dash -->|"opens payments"| node_organizer_escrow
node_provider_dash -->|"opens jobs"| node_provider_escrow
node_provider_dash -->|"uses contract"| node_contract_config
node_organizer_dash -->|"uses contract"| node_contract_config
node_organizer_dash -->|"uses escrow interface"| node_escrow_compat
node_provider_escrow -->|"gets provider"| node_nft_access
node_organizer_escrow -->|"uses NFT utilities"| node_nft_access
node_organizer_escrow -->|"uses escrow interface"| node_escrow_compat
node_escrow_compat -->|"re-exports interface"| node_contract_config
node_nft_access -.->|"accesses wallet"| node_metamask
node_contract_config -.->|"configures contract"| node_monad
node_organizer_escrow -.->|"manages escrow"| node_escrow_contract
node_provider_escrow -.->|"reads escrow jobs"| node_escrow_contract
node_jury_dash -.->|"dispute voting"| node_avs
node_avs -.->|"verdict execution"| node_escrow_contract

click node_app "https://github.com/mehetab-01/monconnect/blob/main/src/App.tsx"
click node_organizer_auth "https://github.com/mehetab-01/monconnect/blob/main/src/pages/OrganizerAuth.tsx"
click node_provider_auth "https://github.com/mehetab-01/monconnect/blob/main/src/pages/ServiceAuth.tsx"
click node_jury_auth "https://github.com/mehetab-01/monconnect/blob/main/src/pages/JuryAuth.tsx"
click node_identity_guard "https://github.com/mehetab-01/monconnect/blob/main/src/components/NFTGuard.tsx"
click node_wallet_ui "https://github.com/mehetab-01/monconnect/blob/main/src/components/WalletButton.tsx"
click node_home_dashboard "https://github.com/mehetab-01/monconnect/blob/main/src/pages/Dashboard.tsx"
click node_organizer_dash "https://github.com/mehetab-01/monconnect/blob/main/src/pages/OrganizerDashboard.tsx"
click node_provider_dash "https://github.com/mehetab-01/monconnect/blob/main/src/pages/ServiceProviderDashboard.tsx"
click node_organizer_escrow "https://github.com/mehetab-01/monconnect/blob/main/src/pages/EscrowAndPayments.tsx"
click node_provider_escrow "https://github.com/mehetab-01/monconnect/blob/main/src/pages/ServiceProviderEscrow.tsx"
click node_jury_dash "https://github.com/mehetab-01/monconnect/blob/main/src/pages/JuryDashboard.tsx"
click node_nft_access "https://github.com/mehetab-01/monconnect/blob/main/src/utils/nft.ts"
click node_contract_config "https://github.com/mehetab-01/monconnect/blob/main/src/utils/chainConnectV2.ts"
click node_escrow_compat "https://github.com/mehetab-01/monconnect/blob/main/src/utils/escrow.ts"
click node_background "https://github.com/mehetab-01/monconnect/blob/main/src/components/VantaBackground.tsx"

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_app,node_organizer_auth,node_provider_auth,node_identity_guard,node_wallet_ui,node_background toneBlue
class node_home_dashboard,node_organizer_dash,node_provider_dash,node_organizer_escrow,node_provider_escrow toneAmber
class node_nft_access,node_contract_config,node_escrow_compat,node_escrow_contract toneMint
class node_jury_auth,node_jury_dash toneRose
class node_organizer,node_provider,node_juror,node_monad,node_metamask,node_avs toneIndigo
```

## Components

### App entry and identity

- [Role routing](https://github.com/mehetab-01/monconnect/blob/main/src/App.tsx): `src/App.tsx`
- [Organizer sign-in](https://github.com/mehetab-01/monconnect/blob/main/src/pages/OrganizerAuth.tsx): `src/pages/OrganizerAuth.tsx`
- [Provider sign-in](https://github.com/mehetab-01/monconnect/blob/main/src/pages/ServiceAuth.tsx): `src/pages/ServiceAuth.tsx`
- [NFT access guard](https://github.com/mehetab-01/monconnect/blob/main/src/components/NFTGuard.tsx): `src/components/NFTGuard.tsx`
- [Wallet controls](https://github.com/mehetab-01/monconnect/blob/main/src/components/WalletButton.tsx): `src/components/WalletButton.tsx`
- [Visual background](https://github.com/mehetab-01/monconnect/blob/main/src/components/VantaBackground.tsx): `src/components/VantaBackground.tsx`

### Organizer and provider workflow

- [Dashboard landing](https://github.com/mehetab-01/monconnect/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Organizer workspace](https://github.com/mehetab-01/monconnect/blob/main/src/pages/OrganizerDashboard.tsx): `src/pages/OrganizerDashboard.tsx`
- [Provider workspace](https://github.com/mehetab-01/monconnect/blob/main/src/pages/ServiceProviderDashboard.tsx): `src/pages/ServiceProviderDashboard.tsx`
- [Escrow and payments](https://github.com/mehetab-01/monconnect/blob/main/src/pages/EscrowAndPayments.tsx): `src/pages/EscrowAndPayments.tsx`
- [Provider escrow jobs](https://github.com/mehetab-01/monconnect/blob/main/src/pages/ServiceProviderEscrow.tsx): `src/pages/ServiceProviderEscrow.tsx`

### Blockchain access

- [NFT identity utilities](https://github.com/mehetab-01/monconnect/blob/main/src/utils/nft.ts): `src/utils/nft.ts`
- [Contract interface](https://github.com/mehetab-01/monconnect/blob/main/src/utils/chainConnectV2.ts): `src/utils/chainConnectV2.ts`
- [Escrow compatibility](https://github.com/mehetab-01/monconnect/blob/main/src/utils/escrow.ts): `src/utils/escrow.ts`
- **Escrow contract**

### Jury and disputes

- [Jury sign-in](https://github.com/mehetab-01/monconnect/blob/main/src/pages/JuryAuth.tsx): `src/pages/JuryAuth.tsx`
- [Jury workspace](https://github.com/mehetab-01/monconnect/blob/main/src/pages/JuryDashboard.tsx): `src/pages/JuryDashboard.tsx`

### Other components

- **Organizer**
- **Service provider**
- **Juror**
- **Monad network**
- **Wallet provider**
- **AVS validators**

## Connections

- Organizer → Role routing: chooses role (evidence: `src/App.tsx`)
- Service provider → Role routing: chooses role (evidence: `src/App.tsx`)
- Juror → Role routing: chooses role (evidence: `src/App.tsx`)
- Role routing → Organizer sign-in: routes to (evidence: `src/App.tsx`)
- Role routing → Provider sign-in: routes to (evidence: `src/App.tsx`)
- Role routing → Jury sign-in: routes to (evidence: `src/App.tsx`)
- Role routing → Dashboard landing: routes to (evidence: `src/App.tsx`)
- Role routing → Organizer workspace: routes to (evidence: `src/App.tsx`)
- Role routing → Provider workspace: routes to (evidence: `src/App.tsx`)
- Role routing → Jury workspace: routes to (evidence: `src/App.tsx`)
- Role routing → NFT access guard: guards routes (evidence: `src/App.tsx`)
- Role routing → Visual background: renders (evidence: `src/App.tsx`)
- Organizer sign-in → NFT identity utilities: checks identity (evidence: `src/pages/OrganizerAuth.tsx`)
- Provider sign-in → NFT identity utilities: checks and mints (evidence: `src/pages/ServiceAuth.tsx`)
- Jury sign-in → Wallet provider: requests wallet
- NFT access guard → NFT identity utilities: checks ownership (evidence: `src/components/NFTGuard.tsx`)
- Wallet controls → NFT identity utilities: gets provider (evidence: `src/components/WalletButton.tsx`)
- Organizer workspace → Escrow and payments: opens payments (evidence: `src/pages/OrganizerDashboard.tsx`)
- Provider workspace → Provider escrow jobs: opens jobs (evidence: `src/pages/ServiceProviderDashboard.tsx`)
- Provider workspace → Contract interface: uses contract (evidence: `src/pages/ServiceProviderDashboard.tsx`)
- Organizer workspace → Contract interface: uses contract (evidence: `src/pages/OrganizerDashboard.tsx`)
- Organizer workspace → Escrow compatibility: uses escrow interface (evidence: `src/pages/OrganizerDashboard.tsx`)
- Provider escrow jobs → NFT identity utilities: gets provider (evidence: `src/pages/ServiceProviderEscrow.tsx`)
- Escrow and payments → NFT identity utilities: uses NFT utilities (evidence: `src/pages/EscrowAndPayments.tsx`)
- Escrow and payments → Escrow compatibility: uses escrow interface (evidence: `src/pages/EscrowAndPayments.tsx`)
- Escrow compatibility → Contract interface: re-exports interface (evidence: `src/utils/escrow.ts`)
- NFT identity utilities → Wallet provider: accesses wallet
- Contract interface → Monad network: configures contract
- Escrow and payments → Escrow contract: manages escrow
- Provider escrow jobs → Escrow contract: reads escrow jobs
- Jury workspace → AVS validators: dispute voting
- AVS validators → Escrow contract: verdict execution (evidence: `README.md`)
