# hueiboi/nft_ticketing architecture

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

- Interactive diagram: https://gitdiagram.com/hueiboi/nft_ticketing
- Repository: https://github.com/hueiboi/nft_ticketing

## Overview

NFTix combines a React wallet-connected frontend with ERC-721 event contracts. Organizers create events, manage sale/check-in stages, staff and revenue; attendees discover events, buy tickets and retrieve short-lived signed QR codes; gate staff verify QR data and submit on-chain check-ins. The README documents the contract’s factory, minting, usage and revenue capabilities. The sampled source confirms frontend QR creation and verification, but the Solidity implementation was not sampled, so contract behavior links rely on README evidence; unsampled frontend details are not inferred beyond documented capabilities.

Main entry points: [`frontend/src/components/Dapp.js`](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/Dapp.js) (Wallet app shell), [`contracts/Event.sol`](https://github.com/hueiboi/nft_ticketing/blob/main/contracts/Event.sol) (Event factory and NFT), [`frontend/src/components/tabs/EntryGate.js`](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/EntryGate.js) (Entry gate), [`frontend/src/components/tabs/BuyTickets.js`](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/BuyTickets.js) (Event discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Wallet application"]
  node_entry["React entry<br/>[index.js]"]
  node_dapp["Wallet app shell<br/>[Dapp.js]"]
  node_theme["UI theme<br/>[theme.js]"]
  node_networkerr["Network errors"]
  node_txsuccess["Transaction success<br/>[TxSuccessModal.js]"]
  node_waiting["Transaction waiting"]
  node_txerror["Transaction errors"]
end

subgraph group_ticketing["Ticketing journeys"]
  node_buy["Event discovery<br/>[BuyTickets.js]"]
  node_create["Event creation<br/>[CreateEvent.js]"]
  node_myevents["Organizer controls<br/>[MyEvents.js]"]
  node_mytickets["Owned tickets<br/>[MyTickets.js]"]
  node_cover["Event artwork<br/>[eventCover.js]"]
  node_qrmodal["Ticket QR modal<br/>[TicketQrModal.js]"]
end

subgraph group_gate["QR check-in"]
  node_qrutils["QR signing and checks<br/>[ticketQr.js]"]
  node_scanner["QR camera scanner<br/>[QrScanner.js]"]
  node_gateui["Entry gate<br/>[EntryGate.js]"]
end

subgraph group_chain["Contracts and chain"]
  node_contract["Event factory and NFT<br/>[Event.sol]"]
  node_eventabi["Event contract ABI<br/>[Event.json]"]
  node_factoryabi["Factory ABI<br/>[EventCreator.json]"]
  node_address["Deployed addresses"]
end

node_attendee(("Attendee"))
node_organizer(("Organizer / staff"))
node_wallet["MetaMask wallet"]
node_chainnode[("Local blockchain")]

node_entry -->|"renders"| node_dapp
node_entry -->|"configures"| node_theme
node_organizer -->|"connects"| node_wallet
node_attendee -->|"connects"| node_wallet
node_dapp -->|"reads account"| node_wallet
node_dapp -->|"reads chain"| node_chainnode
node_dapp -->|"loads events"| node_contract
node_dapp -->|"routes tab"| node_buy
node_dapp -->|"routes tab"| node_create
node_dapp -->|"routes tab"| node_myevents
node_dapp -->|"routes tab"| node_mytickets
node_dapp -->|"routes tab"| node_gateui
node_dapp -->|"renders"| node_networkerr
node_buy -->|"offers events"| node_attendee
node_buy -->|"gets artwork"| node_cover
node_buy -->|"buys ticket"| node_contract
node_create -->|"creates event"| node_contract
node_myevents -->|"manages event"| node_contract
node_myevents -.->|"shows result"| node_txsuccess
node_mytickets -->|"reads ownership"| node_contract
node_mytickets -->|"gets artwork"| node_cover
node_mytickets -->|"opens QR"| node_qrmodal
node_qrmodal -->|"creates payload"| node_qrutils
node_qrutils -->|"requests signature"| node_wallet
node_gateui -->|"renders scanner"| node_scanner
node_gateui -->|"verifies payload"| node_qrutils
node_gateui -->|"submits check-in"| node_contract
node_organizer -->|"manages events"| node_myevents
node_attendee -->|"discovers tickets"| node_buy
node_attendee -->|"views tickets"| node_mytickets
node_organizer -->|"checks tickets"| node_gateui
node_contract -->|"runs on"| node_chainnode
node_dapp -->|"loads ABI"| node_eventabi
node_dapp -->|"loads ABI"| node_factoryabi
node_dapp -->|"loads address"| node_address
node_contract -.->|"described by"| node_eventabi
node_contract -.->|"described by"| node_factoryabi
node_gateui -.->|"shows pending"| node_waiting
node_gateui -.->|"shows failures"| node_txerror

click node_entry "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/index.js"
click node_dapp "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/Dapp.js"
click node_theme "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/theme.js"
click node_networkerr "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/error_handling/NetworkErrorMessage.js"
click node_txsuccess "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/TxSuccessModal.js"
click node_buy "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/BuyTickets.js"
click node_create "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/CreateEvent.js"
click node_myevents "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/MyEvents.js"
click node_mytickets "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/MyTickets.js"
click node_cover "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/utils/eventCover.js"
click node_qrmodal "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/TicketQrModal.js"
click node_qrutils "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/utils/ticketQr.js"
click node_scanner "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/QrScanner.js"
click node_gateui "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/EntryGate.js"
click node_contract "https://github.com/hueiboi/nft_ticketing/blob/main/contracts/Event.sol"
click node_eventabi "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/contracts/Event.json"
click node_factoryabi "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/contracts/EventCreator.json"
click node_address "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/contracts/contract-address.json"
click node_waiting "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/error_handling/WaitingForTransactionMessage.js"
click node_txerror "https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/error_handling/TransactionErrorMessage.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_dapp,node_theme,node_networkerr,node_txsuccess,node_waiting,node_txerror toneBlue
class node_buy,node_create,node_myevents,node_mytickets,node_cover,node_qrmodal,node_chainnode toneAmber
class node_qrutils,node_scanner,node_gateui toneMint
class node_contract,node_eventabi,node_factoryabi,node_address toneRose
class node_attendee,node_organizer,node_wallet toneIndigo
```

## Components

### Wallet application

- [React entry](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/index.js): `frontend/src/index.js`
- [Wallet app shell](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/Dapp.js): `frontend/src/components/Dapp.js`
- [UI theme](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/theme.js): `frontend/src/theme.js`
- [Network errors](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/error_handling/NetworkErrorMessage.js): `frontend/src/components/error_handling/NetworkErrorMessage.js`
- [Transaction success](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/TxSuccessModal.js): `frontend/src/components/TxSuccessModal.js`
- [Transaction waiting](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/error_handling/WaitingForTransactionMessage.js): `frontend/src/components/error_handling/WaitingForTransactionMessage.js`
- [Transaction errors](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/error_handling/TransactionErrorMessage.js): `frontend/src/components/error_handling/TransactionErrorMessage.js`

### Ticketing journeys

- [Event discovery](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/BuyTickets.js): `frontend/src/components/tabs/BuyTickets.js`
- [Event creation](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/CreateEvent.js): `frontend/src/components/tabs/CreateEvent.js`
- [Organizer controls](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/MyEvents.js): `frontend/src/components/tabs/MyEvents.js`
- [Owned tickets](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/MyTickets.js): `frontend/src/components/tabs/MyTickets.js`
- [Event artwork](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/utils/eventCover.js): `frontend/src/utils/eventCover.js`
- [Ticket QR modal](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/TicketQrModal.js): `frontend/src/components/TicketQrModal.js`

### QR check-in

- [QR signing and checks](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/utils/ticketQr.js): `frontend/src/utils/ticketQr.js`
- [QR camera scanner](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/QrScanner.js): `frontend/src/components/QrScanner.js`
- [Entry gate](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/components/tabs/EntryGate.js): `frontend/src/components/tabs/EntryGate.js`

### Contracts and chain

- [Event factory and NFT](https://github.com/hueiboi/nft_ticketing/blob/main/contracts/Event.sol): `contracts/Event.sol`
- [Event contract ABI](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/contracts/Event.json): `frontend/src/contracts/Event.json`
- [Factory ABI](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/contracts/EventCreator.json): `frontend/src/contracts/EventCreator.json`
- [Deployed addresses](https://github.com/hueiboi/nft_ticketing/blob/main/frontend/src/contracts/contract-address.json): `frontend/src/contracts/contract-address.json`

### Other components

- **Attendee**
- **Organizer / staff**
- **MetaMask wallet**
- **Local blockchain**

## Connections

- React entry → Wallet app shell: renders (evidence: `frontend/src/index.js`)
- React entry → UI theme: configures (evidence: `frontend/src/index.js`)
- Organizer / staff → MetaMask wallet: connects (evidence: `README.md`)
- Attendee → MetaMask wallet: connects (evidence: `README.md`)
- Wallet app shell → MetaMask wallet: reads account (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Local blockchain: reads chain (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Event factory and NFT: loads events (evidence: `README.md`)
- Wallet app shell → Event discovery: routes tab (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Event creation: routes tab (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Organizer controls: routes tab (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Owned tickets: routes tab (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Entry gate: routes tab (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Network errors: renders (evidence: `frontend/src/components/Dapp.js`)
- Event discovery → Attendee: offers events (evidence: `README.md`)
- Event discovery → Event artwork: gets artwork (evidence: `frontend/src/components/tabs/BuyTickets.js`)
- Event discovery → Event factory and NFT: buys ticket (evidence: `README.md`)
- Event creation → Event factory and NFT: creates event (evidence: `README.md`)
- Organizer controls → Event factory and NFT: manages event (evidence: `README.md`)
- Organizer controls → Transaction success: shows result
- Owned tickets → Event factory and NFT: reads ownership (evidence: `README.md`)
- Owned tickets → Event artwork: gets artwork (evidence: `frontend/src/components/tabs/MyTickets.js`)
- Owned tickets → Ticket QR modal: opens QR (evidence: `frontend/src/components/TicketQrModal.js`)
- Ticket QR modal → QR signing and checks: creates payload (evidence: `frontend/src/components/TicketQrModal.js`)
- QR signing and checks → MetaMask wallet: requests signature (evidence: `frontend/src/utils/ticketQr.js`)
- Entry gate → QR camera scanner: renders scanner (evidence: `frontend/src/components/tabs/EntryGate.js`)
- Entry gate → QR signing and checks: verifies payload (evidence: `frontend/src/components/tabs/EntryGate.js`)
- Entry gate → Event factory and NFT: submits check-in (evidence: `frontend/src/components/tabs/EntryGate.js`)
- Organizer / staff → Organizer controls: manages events (evidence: `README.md`)
- Attendee → Event discovery: discovers tickets (evidence: `README.md`)
- Attendee → Owned tickets: views tickets (evidence: `README.md`)
- Organizer / staff → Entry gate: checks tickets (evidence: `README.md`)
- Event factory and NFT → Local blockchain: runs on (evidence: `README.md`)
- Wallet app shell → Event contract ABI: loads ABI (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Factory ABI: loads ABI (evidence: `frontend/src/components/Dapp.js`)
- Wallet app shell → Deployed addresses: loads address (evidence: `frontend/src/components/Dapp.js`)
- Event factory and NFT → Event contract ABI: described by
- Event factory and NFT → Factory ABI: described by
- Entry gate → Transaction waiting: shows pending
- Entry gate → Transaction errors: shows failures
