GatePass is a decentralized event ticketing platform that leverages blockchain technology (NFTs) to provide secure, verifiable, and transferable tickets.
Prerequisites
Before you begin, ensure you have the following installed on your system:- Node.js (v18 or higher)
- npm or pnpm package manager
- Git for cloning the repository
Install Dependencies
Install all required dependencies for both frontend and backend:This will install dependencies including:
- Frontend: React, Vite, Tailwind CSS, Shadcn UI, Framer Motion
- Backend: Express, Prisma, Ethers.js, Passport.js
- Smart Contracts: Solidity, Foundry (Forge)
Setup Environment Variables
Copy the environment example files and configure them with your own values:
Environment Variables Reference
Environment Variables Reference
Root
.env file:Paystack and Flutterwave keys are required for fiat payments from the browser. For M-Pesa integration, additional server-side configuration is needed.
Database Setup
Initialize the database with Prisma and seed it with demo data:This command will:
- Create the database schema (Users, Events, Orders, Tickets, CheckIns, etc.)
- Apply all migrations
- Generate the Prisma Client
Seed Demo Data (Optional)
Seed Demo Data (Optional)
To populate your database with sample events for testing:This creates demo events with various ticket tiers and categories.
Run the Application
Start both the backend API server and the frontend development server:Terminal 1 - Backend API:The backend server will start on The frontend will start on
http://localhost:8000Terminal 2 - Frontend (new terminal):http://localhost:5173Create Your First Event
Once the application is running, you can create your first event:Sign Up or Login
Navigate to the login page and create an account using:
- Email/Password
- Google OAuth
- Twitter OAuth
- Web3 Wallet (MetaMask)
Access Organizer Dashboard
From the main navigation, click on “Organizer Dashboard” to access event management features.
Create New Event
Fill in the event creation form with:
- Event title and description
- Venue and location details
- Event date and sale period
- Ticket pricing and supply
- Category and tags
- Event image (optional)
Configure Ticket Tiers
Set up multiple ticket tiers:
- VIP: Premium access with perks
- Regular: Standard admission
- Early Bird: Discounted pricing for early buyers
Deploy Smart Contract
Once your event is configured, deploy the NFT ticket smart contract to Polygon:
- Review gas estimates
- Confirm deployment transaction
- Contract address will be saved to your event
Running Tests
To verify your setup is working correctly:Available Test Commands
Available Test Commands
Troubleshooting
Database Connection Errors
Database Connection Errors
If you encounter database errors, try resetting the database:This will drop the database, recreate it, and run all migrations.
Port Already in Use
Port Already in Use
If ports 8000 (backend) or 5173 (frontend) are already in use:Check for processes:Kill the process:Or change the port in your configuration files.
Dependency Installation Issues
Dependency Installation Issues
If
npm install fails:Prisma Client Not Generated
Prisma Client Not Generated
If you get Prisma Client errors:
Next Steps
Architecture
Understand the system architecture
API Reference
Explore the API endpoints
Smart Contracts
Learn about NFT ticketing contracts
Development Guide
Contribute to GatePass