#Rust 🦀 #Solana 💠 #Anchor ⚓ #React ⚛️ #NFT 🖼️ #Web3 🌐
NFT Marketplace Event Ticketing on the Solana Blockchain
This NFT Solana Project is developed by Stephen Damian
Note: I developed the same project with Ethereum / Hardhat
- Project Overview
- Roadmap
- Prerequisites
- Technologies
- Getting Started (Localnet)
- Transition: Localnet to Devnet
- Code Structure
- Various Documentations
- License
NFT Marketplace Event Ticketing - A decentralized application for managing and verifying event tickets as NFTs on the Solana blockchain.
Status: Under development 🚧
See more images here: Images
- ✅ Phantom integration.
- ✅ Homepage.
- ✅ Create event.
- ✅ Event listing.
- ✅ Buy a ticket.
- ✅ Generate NFTs.
- ✅ Verify NFTs.
- ⬜ Integrate other wallets.
- ⬜ Event organizer dashboard.
- Rust
>= 1.75.0(last tested:1.85.0) - You can install Rust here: Rustup. - Solana
>= 1.18.14(last tested:1.18.26) - You can install Solana CLI here: Solana CLI. - Anchor
0.30.1- You can install Anchor here: Anchor. - Node.js
>= 18(last tested:22) and npm - You can install Node.js and npm here: Node.js.
- Back-End: Rust, Solana, Anchor
0.30.1 - Front-End: Next.js
14, React18, TypeScript5, Tailwind CSS - Blockchain Interaction: Solana-Web3.js
- Wallet Integration: Phantom
Configure your Solana CLI to use your localhost validator:
solana config set --url localhostgit clone https://github.com/s-damian/anchor-nft-ticketing.gitcd /<your-path>/anchor-nft-ticketingFor the Anchor Program:
npm installFor the Next.js App:
npm install --prefix ./app/frontend- In
[provider]section, update to:
[provider]
cluster = "localnet"Create a ./app/frontend/.env file (for the Next.js App):
cp ./app/frontend/.env.example ./app/frontend/.envEnsure that the shell scripts are executable:
chmod +x sh/*.shStart the Solana local validator (solana-test-validator) with Metaplex:
npm run ledgerAfter starting the Solana local validator, you will probably need to airdrop SOL to your Localnet wallet:
solana airdrop <amount>Build:
anchor buildDeploy:
anchor deployPS:
anchor deploywill create yourtarget/idl/nft_ticketing.jsonfile.
Automatically update the Program ID in the necessary files:
npm run update-program-idanchor build && anchor deployThis step is crucial after updating the Program ID to ensure that the deployed program matches the updated configuration.
Copy the IDL (Interface Definition Language) file into the Next.js App:
npm run copy-idlIn your Phantom wallet settings, switch to Solana Localnet.
Go to the Next.js App Directory:
cd /<your-path>/anchor-nft-ticketing/app/frontendStart the development server:
npm run devOpen your browser and go to:
http://localhost:3000Preparing for Public Deployment: Transition from Localnet to Devnet
After successfully running your project locally, the next step is to deploy it on the public Devnet. This section guides you through the process of configuring your environment, deploying your program to Devnet, and updating your Front-End to interact with the deployed program on the Devnet.
To switch from the Localnet to Devnet: Localnet-to-Devnet.md
.
├── app
│ └── frontend
│ ├── app
│ │ └── [React pages]
│ ├── src
│ │ ├── components
│ │ │ └── [React components]
│ │ ├── handlers
│ │ │ └── [React handlers]
│ │ ├── idl
│ │ │ └── nft_ticketing.json.
│ │ └── utils
│ │ └── [React utils]
│ ├── .env
│ ├── config-overrides.js
│ ├── package.json
│ └── tailwind.config.ts
├── programs
│ └── nft-ticketing
│ ├── src
│ │ ├── kernel
│ │ │ └── [Program managers]
│ │ └── lib.rs
│ └── Cargo.toml
├── tests
│ └── [Tests]
├── Anchor.toml
├── Cargo.toml
├── package.json
└── README.md-
To switch from the Localnet to Devnet: Localnet-to-Devnet.md
-
See further technical details here: Notes-tech.md
This project is licensed under the MIT License. See the LICENSE file for more details.