A modern, blockchain-powered ticket booking system built with Solidity smart contracts and React frontend. BookIt enables secure, transparent event ticketing with normal and VIP ticket options.
- Secure Ticket Purchasing: Buy normal and VIP tickets with cryptocurrency
- Real-time Stats: Track ticket sales and personal purchases
- Refund System: Easy ticket refund functionality
- Admin Dashboard: Event management tools for organizers
- 3D Interactive UI: Immersive user experience with Spline 3D animations
- MetaMask Integration: Seamless Web3 wallet connectivity
- Solidity - Smart contract development
- OpenZeppelin - Security standards and access control
- Ethereum/Sepolia - Blockchain network
- React - UI framework
- Chakra UI - Component library
- Web3.js - Blockchain interaction
- Spline - 3D animations and interactive elements
solidity/
├── dapp1/
│ ├── frontend/
| | ├──public/
| | | ├──golden-ticket.png
| | | ├──gradient.png
│ │ ├── src/
│ │ ├── component/ # UI components
│ │ │ ├── navbar.jsx
│ │ │ ├── buyticket.jsx
│ │ │ ├── stats.jsx
│ │ │ ├── refund.jsx
│ │ │ ├── admin.jsx
│ │ │ └── footer.jsx
│ │ ├── interface/ # Web3 integration
│ │ │ └── web3.js
│ │ ├── App.jsx
| | ├── index.jsx
│ │ # Static assets
│ ├── contracts/
| | ├── event.sol # Smart contracts
| ├──scripts/
| ├── deploy-counter.ts
├── README.md
├── requirement.md
- Node.js (v16+)
- MetaMask wallet extension
- Git
-
Clone the repository
git clone <your-repo-url> cd solidity/dapp1/frontend
-
Install dependencies
npm install
-
Install required packages
npm install @chakra-ui/react @emotion/react @emotion/styled npm install @splinetool/react-spline npm install web3
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000
-
Using Remix IDE (Recommended for testing)
- Visit remix.ethereum.org
- Upload
first.sol - Compile with Solidity 0.8.0+
- Deploy to Sepolia testnet
- Update contract address in
web3.js
-
Using Hardhat (For local development)
npm install --save-dev hardhat npx hardhat init # Follow setup instructions npx hardhat run scripts/deploy.js --network sepolia
- Connect Wallet: Link your MetaMask to the platform
- Buy Tickets: Choose between normal (0.001 ETH) or VIP (0.004 ETH) tickets
- View Stats: Track your purchases and total sales
- Request Refunds: Easy refund process for purchased tickets
- Set Prices: Configure ticket pricing
- Manage Events: Set event dates and details
- Withdraw Funds: Access collected ticket revenue
Update the contract address in /src/interface/web3.js:
const CONTRACT_ADDRESS = "YOUR_DEPLOYED_CONTRACT_ADDRESS";Ensure you're connected to the Sepolia testnet in MetaMask.
payforticket()- Purchase normal ticketsBuyvipseats()- Purchase VIP ticketsrefund()- Refund normal ticketsrefundforvip()- Refund VIP ticketswithdraw()- Admin fund withdrawal (owner only)
- Navbar: Wallet connection and branding
- BuyTicket: Ticket purchase interface
- Stats: Sales analytics and user data
- Refund: Ticket refund functionality
- Admin: Event management (owner only)
npm run build
# Deploy dist/ folder to your hosting platform- Get mainnet ETH for gas fees
- Deploy via Remix or Hardhat to Ethereum mainnet
- Update frontend contract address
- Verify contract on Etherscan
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to 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.
- Demo: Live Demo
- Contract: View on Etherscan
- Documentation: Full Docs
Ritesh*
- GitHub: ritesh
- Twitter: RVanivdekar
- OpenZeppelin for security standards
- Chakra UI for beautiful components
- Spline for 3D animations
- MetaMask for Web3 integration