Skip to content

neelpote/web3-tickets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎟️ Web3 Tickets - NFT Ticketing Platform

A modern, decentralized ticketing platform built with React and Ethereum smart contracts. Features fraud-proof NFT tickets, anti-scalping protection, and a built-in resale marketplace.

Web3 Tickets React Ethereum License

Features

  • 🎟️ NFT Tickets - Each ticket is a unique ERC-721 token
  • πŸ”’ Fraud Prevention - Blockchain-based authenticity
  • πŸ”„ Resale Marketplace - Safe secondary market with price limits
  • πŸ›‘οΈ Anti-Scalping - Maximum 5 tickets per wallet per event
  • πŸ’° Automatic Refunds - Smart contract handles cancelled events
  • 🎨 Modern UI - Clean cream and black design

Tech Stack

  • Frontend: React, Privy Auth, Web3 Integration
  • Blockchain: Ethereum, Solidity Smart Contracts
  • Database: Supabase
  • Styling: Custom CSS with Klack theme

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm
  • MetaMask browser extension
  • Git

Installation

  1. Clone the Repository

    git clone https://github.com/YOUR_USERNAME/web3-tickets.git
    cd web3-tickets
  2. Install Dependencies

    npm install
  3. Set Up Environment Variables

    cp .env.example .env

    Edit .env and add your configuration:

    REACT_APP_PRIVY_APP_ID=your_privy_app_id_here
    REACT_APP_CONTRACT_ADDRESS=your_contract_address
    REACT_APP_RPC_URL=your_rpc_url
    REACT_APP_CHAIN_ID=your_chain_id
    REACT_APP_SUPABASE_URL=your_supabase_url
    REACT_APP_SUPABASE_ANON_KEY=your_supabase_key
  4. Start Development Server

    npm start
  5. Deploy Smart Contract (Optional - for local development)

    npx hardhat node
    npx hardhat run scripts/deploy.js --network localhost

πŸ”§ Setup Services

Privy Authentication

  1. Go to Privy Dashboard
  2. Create a new app
  3. Copy your App ID to .env

Supabase Database

  1. Create a Supabase project
  2. Copy URL and anon key to .env
  3. Run the SQL schema from supabase-schema.sql (if available)

Project Structure

src/
β”œβ”€β”€ App.jsx                  # Main application router
β”œβ”€β”€ index.js                 # React entry point
β”œβ”€β”€ index.css                # Base styles
β”œβ”€β”€ klack-theme.css          # Custom theme (cream & black)
β”œβ”€β”€ components/              # Reusable UI components
β”‚   β”œβ”€β”€ Navbar.js           # Navigation component
β”‚   β”œβ”€β”€ Footer.js           # Footer component
β”‚   └── index.js            # Component exports
β”œβ”€β”€ pages/                   # Page components
β”‚   β”œβ”€β”€ Home.js             # Landing page
β”‚   β”œβ”€β”€ Login.js            # Authentication page
β”‚   β”œβ”€β”€ Events.js           # Events listing
β”‚   β”œβ”€β”€ CreateEvent.js      # Event creation form
β”‚   β”œβ”€β”€ EventDetails.js     # Individual event page
β”‚   β”œβ”€β”€ Dashboard.js        # User dashboard
β”‚   β”œβ”€β”€ MyTickets.js        # User's tickets
β”‚   β”œβ”€β”€ Marketplace.js      # Resale marketplace
β”‚   β”œβ”€β”€ About.js            # About page
β”‚   └── index.js            # Page exports
β”œβ”€β”€ contexts/                # React contexts
β”‚   β”œβ”€β”€ WalletContext.js    # Wallet & auth state
β”‚   └── ContractContext.js  # Smart contract integration
β”œβ”€β”€ services/                # Business logic
β”‚   β”œβ”€β”€ contractService.js  # Blockchain interactions
β”‚   β”œβ”€β”€ userService.js      # User management
β”‚   └── walletService.js    # Wallet utilities
└── lib/
    └── supabase.js         # Database configuration

Environment Variables

REACT_APP_PRIVY_APP_ID=your_privy_app_id
REACT_APP_CONTRACT_ADDRESS=deployed_contract_address
REACT_APP_RPC_URL=your_rpc_url
REACT_APP_CHAIN_ID=network_chain_id
REACT_APP_SUPABASE_URL=your_supabase_url
REACT_APP_SUPABASE_ANON_KEY=your_supabase_key

🎨 Screenshots

Screenshot 2025-12-15 at 2 36 54β€―PM Screenshot 2025-12-15 at 2 35 12β€―PM Screenshot 2025-12-15 at 2 35 33β€―PM Screenshot 2025-12-15 at 2 35 50β€―PM Screenshot 2025-12-15 at 2 36 40β€―PM

πŸ§ͺ Testing

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

πŸš€ Deployment

Frontend Deployment (Vercel/Netlify)

  1. Build the project: npm run build
  2. Deploy the build folder to your hosting service
  3. Set environment variables in your hosting dashboard

Smart Contract Deployment

# Deploy to Sepolia testnet
npx hardhat run scripts/deploy.js --network sepolia

# Verify contract on Etherscan
npx hardhat verify --network sepolia DEPLOYED_CONTRACT_ADDRESS

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenZeppelin for secure smart contract libraries
  • Privy for seamless Web3 authentication
  • Supabase for backend infrastructure
  • React for the frontend framework

πŸ“ž Support

If you have any questions or need help, please:

  • Open an issue on GitHub
  • Check the documentation
  • Join our community discussions

About

🎟️ Web3 NFT Ticketing Platform - Decentralized event ticketing with anti-scalping protection and beautiful cream & black UI

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors