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.
- ποΈ 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
- Frontend: React, Privy Auth, Web3 Integration
- Blockchain: Ethereum, Solidity Smart Contracts
- Database: Supabase
- Styling: Custom CSS with Klack theme
- Node.js 16+ and npm
- MetaMask browser extension
- Git
-
Clone the Repository
git clone https://github.com/YOUR_USERNAME/web3-tickets.git cd web3-tickets -
Install Dependencies
npm install
-
Set Up Environment Variables
cp .env.example .env
Edit
.envand 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
-
Start Development Server
npm start
-
Deploy Smart Contract (Optional - for local development)
npx hardhat node npx hardhat run scripts/deploy.js --network localhost
- Go to Privy Dashboard
- Create a new app
- Copy your App ID to
.env
- Create a Supabase project
- Copy URL and anon key to
.env - Run the SQL schema from
supabase-schema.sql(if available)
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
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
# Run tests
npm test
# Run tests with coverage
npm run test:coverage- Build the project:
npm run build - Deploy the
buildfolder to your hosting service - Set environment variables in your hosting dashboard
# Deploy to Sepolia testnet
npx hardhat run scripts/deploy.js --network sepolia
# Verify contract on Etherscan
npx hardhat verify --network sepolia DEPLOYED_CONTRACT_ADDRESS- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenZeppelin for secure smart contract libraries
- Privy for seamless Web3 authentication
- Supabase for backend infrastructure
- React for the frontend framework
If you have any questions or need help, please:
- Open an issue on GitHub
- Check the documentation
- Join our community discussions