Skip to content

MrKBoodram/g7NftSystem

Repository files navigation

SolTix - Solana Event Ticketing System

A decentralized event ticketing system built on Solana using SPL tokens.

🚀 Quick Start

Prerequisites

  • Node.js (v18+)
  • Rust
  • Solana CLI
  • Anchor CLI

Installation

# 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-frontend

📁 Project Structure

soltix/
├── anchor-program/          # Solana program
│   ├── programs/
│   ├── tests/
│   └── Anchor.toml
├── frontend/                # Next.js frontend
│   ├── src/
│   └── package.json
└── README.md

🏗️ Development Workflow

  1. Program Lead: Implement smart contract logic in anchor-program/
  2. Frontend Team: Build UI components in frontend/src/
  3. Integration: Connect frontend to deployed program

🎯 Key Features

  • 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

🛠️ Available Scripts

  • npm run build-program - Build Anchor program
  • npm run deploy-program - Deploy to devnet
  • npm run test-program - Run program tests
  • npm run dev-frontend - Start frontend development server

📋 Team Tasks

Issue #1 ✅ - Anchor Project Setup (DONE)

  • Event account structure
  • Basic program instructions
  • SPL token integration

Issue #4 ✅ - Frontend Setup (DONE)

  • Next.js with JavaScript
  • Wallet adapter integration
  • Basic UI structure

Issue #5 & #6 ✅ - Event Organizer UI/UX (DONE)

  • Create event page/modal
  • Connect page to call create_event instruction

Issue #7 & #8 ✅ - Attendee UI/UX (DONE)

  • Create event page/modal
  • Connect page to call create_event instruction

Issue #10 & 11 ✅ - Ticket Verification & QR Code (DONE)

Next Steps

  • Issue #2: Implement create_event instruction
  • Issue #3: Implement mint_ticket instruction
  • Issue #9: Feature-specific components

deployment

https://explorer.solana.com/tx/nXakeyGzbun

CLI scripts

create an event

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

list events

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
....

Presentation Deck

https://pitch.com/v/sol-tix-h2czj6

About

Group 7 - Final Project for Solana Bootcamp (NFT Ticketing System)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •