How hemanthghs/sui-nft-marketplace works
Project type and purpose
• This is a full-stack decentralized application (dApp) consisting of:
• A React-based frontend (under frontend/)
• On-chain Move smart contracts (under sources/) deployed to a Sui blockchain
• A local Sui testnet and client interactions (configured via CLI and JSON-RPC)
• Purpose: Build an NFT marketplace on Sui with minting, listing, buying, fees, stats.
File structure
• Top-level:
• frontend/ — UI code (TSX, Vite, networkConfig, wallet integration)
• sources/ — Move modules (nft_marketplace.move, marketplace.move)
• tests/ — Move unit tests for marketplace logic
• Config: Move.toml, Move.lock, .gitignore, README.md
• Patterns:
• Frontend ↔ Sui JSON-RPC calls (no separate REST API)
• On-chain modules use shared object pattern for marketplace state
• Tests exercise Move modules directly
README
• Confirms architecture: React UI calls Sui CLI / JSON-RPC
• Describes modules for NFT creation (nft_marketplace) and trading (marketplace)
• Outlines Sui local testnet environment and step-by-step flows
Detail
• React component (App, CreateNFT, OwnedObjects, WalletStatus) as part of the frontend layer
• networkConfig.ts feeding RPC URLs into the UI
• Move build & publish process (Move.toml → compilation → deployed package ID)
• Fee flow: buyer payment → marketplace fee_balance → seller payout
• Errors and assertions as part of contract logic