#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.83.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 localhost
git clone https://github.com/s-damian/anchor-nft-ticketing.git
cd /<your-path>/anchor-nft-ticketing
For the Anchor Program:
npm install
For 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/.env
Ensure that the shell scripts are executable:
chmod +x sh/*.sh
Start the Solana local validator (solana-test-validator) with Metaplex:
npm run ledger
After starting the Solana local validator, you will probably need to airdrop SOL to your Localnet wallet:
solana airdrop <amount>
Build:
anchor build
Deploy:
anchor deploy
PS:
anchor deploy
will create yourtarget/idl/nft_ticketing.json
file.
Automatically update the Program ID in the necessary files:
npm run update-program-id
anchor build && anchor deploy
This 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-idl
In your Phantom wallet settings, switch to Solana Localnet.
Go to the Next.js App Directory:
cd /<your-path>/anchor-nft-ticketing/app/frontend
Start the development server:
npm run dev
Open your browser and go to:
http://localhost:3000
Preparing 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.