You can check out the live demo of the NFT marketplace at the following link: Live Demo
- The user uploads their image and details (like title, description) to the platform.
- The system generates an NFT (a unique digital item) based on the uploaded details.
- The user decides to list their minted NFT for sale.
- The user confirms the listing, and the NFT is now available for others to buy.
- A buyer browses the marketplace and selects an NFT they want to purchase.
- The system processes the payment and transfers the NFT to the buyer.
- The buyer completes the transaction, and the NFT is now in their wallet.
A decentralized NFT marketplace on Solana Devnet using Anchor, MPL Core, and Cloudflare Workers.
Program ID: 4WyfhmmEu1MoSMDQfiN2JEbQV28gSo6vhm9idEL7ArtG
-
Minting:
- User uploads image and metadata to Irys (decentralized storage) via the Frontend.
- Frontend sends metadata URI to Backend (
/mint). - Backend creates a mint transaction, signs it with a generated asset signer (partial sign), and returns it.
- User signs the transaction with their wallet and submits it to Solana.
-
Listing (Escrow):
- User requests to list an NFT (
/list). - Backend builds a transaction to initialize an Escrow PDA and deposit the NFT into it.
- User signs and submits. The NFT is now held by the program.
- User requests to list an NFT (
-
Buying:
- Buyer requests to buy an NFT (
/buy). - Backend builds a transaction that transfers SOL to the seller and the NFT to the buyer.
- Buyer signs and submits. The program validates the trade and executes the atomic swap.
- Buyer requests to buy an NFT (
- Frontend: React, Vite, TailwindCSS, Shadcn UI.
- Backend: Cloudflare Workers (Hono), Metaplex Umi.
- Blockchain: Solana (Devnet), Anchor Framework, Metaplex MPL Core.
cd workerbackend
bun install
cp .dev.vars.example .dev.vars
bun run dev
cd frontend
bun install
cp .env.example .env
# VITE_SOLANA_RPC_URL="https://devnet.helius-rpc.com/?api-key=YOUR_API_KEY"
bun run devcd workerbackend
npx wrangler secret put SOLANA_RPC_URL
bun run deployAfter deploying the backend, update frontend/src/services/api.ts with your deployed worker URL.
.dev.vars(backend) and.env(frontend) are git-ignored- Only
.dev.vars.exampleand.env.exampleare committed (without real keys) - For production deployment, use Cloudflare secrets (see step 3 above)

