Book My Event is a full-featured event management and ticket booking platform built using the MERN stack. It allows users to explore and book events, while organizers can create and manage their shows. Admins oversee event approvals, ensuring a smooth and trusted experience. The platform includes OTP-based login, role-based access, and a clean, responsive UI using modern design principles like glassmorphism.
- Tech Stack
- Features
- Installation and Setup
- Project Structure
- Environment Variables
- Known Issues
- Future Improvements
- About Me
- License
- React + Vite
- Tailwind CSS (with glassmorphism UI)
- React Router DOM
- Context API for state management
- Lucide React, Radix UI, shadcn/ui
- Node.js + Express
- MongoDB + Mongoose
- JWT Authentication
- Axios for HTTP requests
- Browse upcoming events
- Book tickets
- OTP-based login
- View personal bookings
- Register and login as an organizer
- Create and manage event listings
- View booking statistics
- Approve or reject new events
- View and manage platform activity
- Role-based routing and dashboard
- Glassmorphism UI with responsive layout
- Toast notifications and smooth navigation
- Node.js (v14+)
- MongoDB Atlas or local instance
- Clone the Repository
git clone <your-repository-url>
cd book-my-event- Install Dependencies
npm install
cd backend
npm install
cd ../frontend
npm install- Configure Environment
Create one central environment file in the project root:
cp .env.example .envDo not create separate frontend/.env or backend/.env files. The backend loads the root .env, and Vite is configured to read frontend variables from the same root file.
Required local values:
PORT=8000
SERVER_URL=http://localhost:8000
FRONTEND_URL=http://localhost:5173
CLIENT_URL=http://localhost:5173
VITE_API=http://localhost:8000/api
MONGO_URI=mongodb://127.0.0.1:27017/book-my-event
JWT_SECRET=replace-with-a-long-random-secret
QR_SIGNING_SECRET=replace-with-a-long-random-secret
RAZORPAY_KEY=rzp_test_replace_me
RAZORPAY_KEY_SECRET=replace_me
VITE_RAZORPAY_KEY=rzp_test_replace_me
EMAIL=your-email@example.com
PASSWORD=your-email-app-password
GEMINI_API_KEY=replace_me
NODE_ENV=developmentOnly variables prefixed with VITE_ are exposed to the frontend bundle.
- Run Frontend and Backend Together
npm run devThis starts:
- the backend with
nodemon - the frontend with
vite
You can still run each app separately if needed:
npm run dev:backend
npm run dev:frontend