A complete blockchain-powered event ticketing platform built with React, Supabase, and smart contracts on the Nexus Testnet. This project enables event hosts to create events, sell NFT tickets, and verify attendees using QR codes with 3-layer security verification.
EventPravesh is a full-stack NFT ticketing platform that combines modern web technologies with blockchain security. The platform allows:
- Event Hosts: Create events, manage staff, and track ticket sales
- Attendees: Purchase NFT tickets and access events via QR codes
- Staff: Verify tickets using a secure 3-layer verification system
- Blockchain Integration: Real NFT minting on Nexus Testnet with ERC721 smart contracts
- React 18 with TypeScript
- Tailwind CSS for styling
- Lucide React for icons
- React QR Code for QR generation
- HTML5 QR Code for scanning
- Single-file application (
EventPravesh.jsx)
- Supabase for authentication, database, and storage
- Edge Functions for server-side logic
- Row Level Security (RLS) for data protection
- Database triggers for automated wallet generation
- Nexus Testnet for NFT minting
- ERC721 Smart Contract deployed at
0x80948605d70Ffe40786AafC68c24bfd1a786B59D - Ethers.js for blockchain interactions
- Custodial wallet system for seamless user experience
- Create events with comprehensive details and multiple images
- Upload banner, card, and additional images to Supabase Storage
- Manage event details (title, date, location, description)
- Event type selection (Online/Offline)
- Total seats management
- Contact information (email, mobile in Indian format)
- Venue links for easy navigation
- Multiple ticket types with different pricing
- Free and paid event options
- Edit existing events with full functionality
- Real blockchain NFT minting on Nexus Testnet
- Automatic wallet generation for users
- Transaction hash tracking with clickable links to Nexus Explorer
- Blockchain verification for ticket authenticity
- Transparent transaction viewing
- Email-based staff accounts
- Event-specific staff permissions
- Secure password hashing with
btoa() - Persistent login sessions (24-hour duration)
- Proper logout functionality
- Cryptographically signed QR codes
- 3-layer security verification:
- Signature Verification: Ensures QR code authenticity
- Database Check: Verifies ticket hasn't been used
- Blockchain Check: Confirms NFT ownership on-chain
- Clean, professional UI
- Responsive design
- Real-time feedback
- Error handling and fallbacks
EventPravesh/
โโโ src/
โ โโโ EventPravesh.jsx # Main React application
โโโ supabase/
โ โโโ functions/ # Edge Functions
โ โ โโโ buy-ticket/ # NFT minting and ticket creation
โ โ โโโ get-qr-data/ # QR code generation with signatures
โ โ โโโ verify-ticket/ # 3-layer ticket verification
โ โ โโโ create-staff/ # Staff account creation
โ โ โโโ staff-login/ # Staff authentication
โ โ โโโ create-custodial-wallet/ # Automatic wallet generation
โ โโโ migrations/ # Database schema migrations
โโโ Contract Source Code/ # Smart contract source
โโโ package.json # Dependencies and scripts
- React 18 with TypeScript
- Tailwind CSS
- Lucide React (icons)
- React QR Code
- HTML5 QR Code
- Supabase Client
- Supabase (Auth, Database, Storage, Edge Functions)
- Deno Runtime for Edge Functions
- Ethers.js for blockchain interactions
- Row Level Security (RLS)
- Nexus Testnet
- ERC721 Smart Contract
- Ethers.js v6.13.4
- Node.js 18+
- Supabase account
- Nexus Testnet access
git clone <repository-url>
cd EventPravesh
npm installCreate .env file in the root directory:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_keySet these in your Supabase project settings:
PLATFORM_PRIVATE_KEY=your_platform_wallet_private_key
NEXUS_RPC_URL=https://rpc.nexus.xyz
SIGNER_PRIVATE_KEY=your_signer_private_key_for_qr_signatures
SUPABASE_SERVICE_ROLE_KEY=your_service_role_keyRun the migrations in order:
20251025152452_create_eventpravesh_schema.sql20251025190000_add_blockchain_fields_to_tickets.sql20251026000000_add_encrypted_private_key_to_profiles.sql20251026000001_create_trigger_on_new_user_for_wallet.sql20251026000002_add_rls_policies_for_event_staff.sql20251026000003_make_username_nullable_and_add_email_to_event_staff.sql
Deploy all Edge Functions to your Supabase project:
buy-ticketget-qr-dataverify-ticketcreate-staffstaff-logincreate-custodial-wallet
npm run dev- Sign Up/Login: Create an account with
is_host: true - Create Event:
- Go to Host Dashboard โ Create Event
- Upload banner (1200x400px) and card (600x400px) images
- Fill event details
- Manage Staff:
- Go to Manage Event โ Manage Staff
- Create staff accounts with email and password
- Track Sales: View ticket sales and analytics
- Browse Events: View available events on the homepage
- Sign Up: Create an account (wallet generated automatically)
- Buy Tickets: Click "Buy Ticket" โ "Bypass Payment (Demo)"
- Access QR Code: Go to My Profile โ View QR Code
- Attend Event: Show QR code to staff for verification
- Staff Login: Use the "Staff Login" button in the header
- Enter Credentials: Use email and password provided by host
- Scan QR Codes: Use the camera scanner to verify tickets
- Verification Results: See green (valid) or red (invalid) results
- Comprehensive profile editing with modal interface
- Age, mobile number (Indian format), and bio fields
- Real-time profile updates
- Clean, user-friendly editing experience
- Hosts cannot purchase tickets for their own events
- Clear messaging for host restrictions
- Separate host and attendee workflows
- QR codes are signed with
SIGNER_PRIVATE_KEY - Prevents QR code forgery
- Ensures authenticity
- Signature Check: Verifies QR code authenticity
- Database Check: Ensures ticket hasn't been used
- Blockchain Check: Confirms NFT ownership on-chain
- Database access controlled by RLS policies
- User data isolation
- Secure staff management
- Users don't need to manage private keys
- Automatic wallet generation
- Seamless blockchain interaction
Host Account:
- Email:
[email protected] - Password:
host123
Mobile Number Format: +919876543210 (Indian format)
Currency: All prices displayed in Indian Rupees (โน)
- Role: Event Host
Staff Account:
- Email:
[email protected] - Password:
staff123 - Role: Event Staff
Attendee Account:
- Email:
[email protected] - Password:
User123 - Role: Regular User
- Create Event: Login as host, create a test event
- Create Staff: Add staff member for the event
- Buy Ticket: Login as attendee, purchase ticket
- Verify Ticket: Login as staff, scan QR code
- Check Blockchain: Verify NFT exists on Nexus Testnet
-
"Edge Function returned non-2xx status code"
- Check environment variables are set
- Verify Edge Functions are deployed
- Check Supabase logs
-
"Invalid ticket" during verification
- Ensure ticket was purchased with real blockchain minting
- Check if token ID exists on blockchain
- Verify signature keys are correct
-
Staff login issues
- Use email instead of username
- Ensure staff account exists for the event
- Check password is correct
-
QR code not generating
- Verify ticket exists in database
- Check
SIGNER_PRIVATE_KEYis set - Ensure ticket hasn't been used
- Check Supabase Edge Function logs
- Verify environment variables
- Test blockchain connectivity
- Check database records
- Validate smart contract interactions
- Frontend: Edit
src/EventPravesh.jsx - Backend: Update Edge Functions in
supabase/functions/ - Database: Create new migrations
- Deploy: Update Edge Functions and run migrations
- All changes tracked in Git
- Edge Functions versioned automatically
- Database migrations are sequential
- Smart contract deployed once
- Single-file React application for fast loading
- Edge Functions for server-side processing
- Efficient database queries with RLS
- Optimized image uploads to Supabase Storage
- Supabase Edge Function logs
- Database query performance
- Blockchain transaction monitoring
- User interaction analytics
- Payment Integration: Real payment processing
- Analytics Dashboard: Detailed event analytics
- Mobile App: React Native version
- Multi-chain Support: Support for other blockchains
- Advanced Security: Additional verification layers
- Event Templates: Pre-built event configurations
- Caching: Implement Redis caching
- CDN: Global content delivery
- Monitoring: Advanced error tracking
- Testing: Comprehensive test suite
- Documentation: API documentation
Built by Team 412 for CBIT Hacktoberfest 2025
- Chethan Vasthaw Tippani
- Giridhar Reddy
- Satyam Mishra
- Ashish Kumar
- Krishnaji Mutyala
This project is developed for educational purposes as part of CBIT Hacktoberfest 2025.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the troubleshooting section
EventPravesh - Revolutionizing event ticketing with blockchain technology! ๐ซโจ