A decentralized event ticketing system built on Solana using SPL tokens.
- Node.js (v18+)
- Rust
- Solana CLI
- Anchor CLI
# Clone and setup
git clone https://github.com/MrKBoodram/g7NftSystem
cd g7NftSystem
# Install dependencies
npm run install-all
# Setup Solana
solana config set --url devnet
solana-keygen new
solana airdrop 2
# Build and deploy program
npm run build-program
npm run deploy-program
# Start frontend
npm run dev-frontendsoltix/
├── anchor-program/ # Solana program
│ ├── programs/
│ ├── tests/
│ └── Anchor.toml
├── frontend/ # Next.js frontend
│ ├── src/
│ └── package.json
└── README.md
- Program Lead: Implement smart contract logic in
anchor-program/ - Frontend Team: Build UI components in
frontend/src/ - Integration: Connect frontend to deployed program
- Event Creation: Organizers create events with unique SPL tokens
- Ticket Minting: Users mint tickets as tokens to their wallets
- QR Verification: Scan QR codes to verify ticket ownership
- Fraud Prevention: Cryptographically secure and verifiable
npm run build-program- Build Anchor programnpm run deploy-program- Deploy to devnetnpm run test-program- Run program testsnpm run dev-frontend- Start frontend development server
- Event account structure
- Basic program instructions
- SPL token integration
- Next.js with JavaScript
- Wallet adapter integration
- Basic UI structure
- Create event page/modal
- Connect page to call create_event instruction
- Create event page/modal
- Connect page to call create_event instruction
- Issue #2: Implement create_event instruction
- Issue #3: Implement mint_ticket instruction
- Issue #9: Feature-specific components
https://explorer.solana.com/tx/nXakeyGzbun
Execute the following command:
cd anchor-program
node scripts/create-event.js "Encode solana bootcamp" "2024-07-01"
The result should be similar:
🎫 Creating event: "Encode solana bootcamp" on 2024-07-01
👤 Organizer: 7kimE1HfzKk4abxCodufXK7Y2HxUfAx2YCBmxWEjfLap
📋 Program ID: 5M5gc4khWwyba2iz9bAmUV2j9SaG5ki1BFvV1tsnoEQg
📍 Event PDA: EnjEvhRnc3Y3brbudW1DMm66eH9HgUPxWEtXmB45u21j
🪙 Token Mint PDA: 6rp2uyWFgKVmMZ1wcFqy4HteSNYkR6o7i7TMkxGFT8oW
💰 Balance: 2.29 SOL
🚀 Sending transaction...
✅ Event created successfully!
📋 Transaction: jTzd47BSPQoYKpWjLByQB6oZKhFXvjRPPz6fcvhzpDMf19qG4p43h4evUeXt3QyRxpyuuvFmTW7r91KcvPvQGsq
🔗 Explorer: https://explorer.solana.com/tx/jTzd47BSPQoYKpWjLByQB6oZKhFXvjRPPz6fcvhzpDMf19qG4p43h4evUeXt3QyRxpyuuvFmTW7r91KcvPvQGsq?cluster=devnet
🎫 Event Explorer: https://explorer.solana.com/address/EnjEvhRnc3Y3brbudW1DMm66eH9HgUPxWEtXmB45u21j?cluster=devnet
📊 Event Details:
Name: "Encode solana bootcamp"
Date: 2024-07-01
Organizer: 7kimE1HfzKk4abxCodufXK7Y2HxUfAx2YCBmxWEjfLap
Token Mint: 6rp2uyWFgKVmMZ1wcFqy4HteSNYkR6o7i7TMkxGFT8oW
Execute the following command:
cd anchor-program
node scripts/list-events.js
The result should be something like:
🔍 Fetching all SolTix events...
📋 Program ID: 5M5gc4khWwyba2iz9bAmUV2j9SaG5ki1BFvV1tsnoEQg
🌐 Network: Devnet
👤 Current Wallet: 7kimE1HfzKk4abxCodufXK7Y2HxUfAx2YCBmxWEjfLap
✅ Found 3 event(s):
══════════════════════════════════════════════════════════════════════════════════════════
🎫 Event #1:
📅 Name: "Summer Festival"
📆 Date: 2024-08-15
👤 Organizer: 7kimE1HfzKk4abxCodufXK7Y2HxUfAx2YCBmxWEjfLap
🪙 Token Mint: qj7kzEwTSrX9mWAmGzVrPQqn4WZspRiUzKVyXUx3eLW
📍 Event PDA: BHhNQCuA5v7tSyX92TiDCg852NCKuomLCEh3njGDnLHn
🔗 Event Explorer: https://explorer.solana.com/address/BHhNQCuA5v7tSyX92TiDCg852NCKuomLCEh3njGDnLHn?cluster=devnet
🎨 Token Explorer: https://explorer.solana.com/address/qj7kzEwTSrX9mWAmGzVrPQqn4WZspRiUzKVyXUx3eLW?cluster=devnet
👑 You are the organizer of this event
─────────────────────────────────────────────────────────────────────────────────────
🎫 Event #2:
📅 Name: "Encode solana bootcamp"
📆 Date: 2024-07-01
👤 Organizer: 7kimE1HfzKk4abxCodufXK7Y2HxUfAx2YCBmxWEjfLap
🪙 Token Mint: 6rp2uyWFgKVmMZ1wcFqy4HteSNYkR6o7i7TMkxGFT8oW
📍 Event PDA: EnjEvhRnc3Y3brbudW1DMm66eH9HgUPxWEtXmB45u21j
🔗 Event Explorer: https://explorer.solana.com/address/EnjEvhRnc3Y3brbudW1DMm66eH9HgUPxWEtXmB45u21j?cluster=devnet
🎨 Token Explorer: https://explorer.solana.com/address/6rp2uyWFgKVmMZ1wcFqy4HteSNYkR6o7i7TMkxGFT8oW?cluster=devnet
👑 You are the organizer of this event
....