An open API service indexing awesome lists of open source software.

https://github.com/nitindevspace/entrify

๐ŸŽŸ๏ธ Full-stack ticket booking platform for movies, events, and shows. Built with React, Node.js, Express, MongoDB, and Stripe payments.
https://github.com/nitindevspace/entrify

antd express fullstack jwt-authentication mern mongodb nodejs react react-router stripe-payments tailwindcss ticket-booking

Last synced: 3 months ago
JSON representation

๐ŸŽŸ๏ธ Full-stack ticket booking platform for movies, events, and shows. Built with React, Node.js, Express, MongoDB, and Stripe payments.

Awesome Lists containing this project

README

          

# Entrify

Entrify is a full-stack event and movie booking platform inspired by BookMyShow, but extended to support SaaS features for venue partners. This project demonstrates secure authentication, payment processing, seat selection, and role-based access control.

## ๐Ÿ—๏ธ Project Structure

```
entrify/
โ”œโ”€โ”€ client/ # Frontend (React + Vite)
โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”œโ”€โ”€ components/
โ”‚ โ”‚ โ”œโ”€โ”€ pages/
โ”‚ โ”‚ โ”œโ”€โ”€ services/ # Axios API calls
โ”‚ โ”‚ โ”œโ”€โ”€ App.jsx
โ”‚ โ”‚ โ””โ”€โ”€ main.jsx
โ”‚ โ”œโ”€โ”€ index.html
โ”‚ โ””โ”€โ”€ tailwind.config.js
โ”œโ”€โ”€ server/ # Backend (Node.js + Express + Mongoose)
โ”‚ โ”œโ”€โ”€ controllers/
โ”‚ โ”œโ”€โ”€ models/
โ”‚ โ”œโ”€โ”€ routes/
โ”‚ โ”œโ”€โ”€ stripeWebhook.js
โ”‚ โ”œโ”€โ”€ server.js
โ”‚ โ””โ”€โ”€ .env
โ””โ”€โ”€ README.md
```

## ๐Ÿš€ Features

โœ… User Registration & Login
โœ… JWT Authentication (stored in cookies)
โœ… Role-based authorization (Admin/User)
โœ… Movies, Theatres, Shows CRUD (Admin only)
โœ… Seat selection with dynamic booking
โœ… Stripe Checkout Integration
โœ… Webhook to finalize bookings after payment success
โœ… Email notifications with nodemailer
โœ… Rate limiting to prevent abuse

## ๐Ÿ›ก๏ธ Security Measures

- Passwords hashed with bcrypt
- JWT tokens stored securely in cookies
- `express-rate-limit` to prevent abuse
- `helmet` for HTTP header protection
- Input validation on backend
- Mongoose schema validation

## ๐Ÿงพ How to Run Locally

1๏ธโƒฃ **Clone the repository**

```bash
git clone https://github.com/YOUR_USERNAME/entrify.git
cd entrify
```

2๏ธโƒฃ **Install backend dependencies**

```bash
cd server
npm install
```

3๏ธโƒฃ **Install frontend dependencies**

```bash
cd ../client
npm install
```

4๏ธโƒฃ **Configure environment variables**

Create a `.env` file in the `server/` directory:

```
PORT=8080
MONGO_URL=mongodb+srv://...
JWT_SECRET=your_jwt_secret
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
```

5๏ธโƒฃ **Run backend**

```bash
cd server
npm run dev
```

6๏ธโƒฃ **Run frontend**

```bash
cd ../client
npm run dev
```

The frontend will be served on `http://localhost:5173` and the backend on `http://localhost:8080`.

## ๐Ÿ’ณ Stripe Integration

- On payment, Stripe Checkout session is created.
- Webhook endpoint listens for `checkout.session.completed` events.
- Booking is saved only after payment succeeds.
- Email confirmation is sent to the user.

## โœ‰๏ธ Email Sending

- Nodemailer configured with Gmail or any SMTP service.
- Used to send OTPs and booking confirmations.

## ๐ŸŽฏ Rate Limiting

- Limits requests to 40 per 5 minutes per IP.
- Returns a dynamic message showing minutes remaining.

## ๐Ÿงฉ Technologies Used

- **Frontend:** React, TailwindCSS, Ant Design, Axios, React Router
- **Backend:** Node.js, Express, Mongoose
- **Database:** MongoDB Atlas
- **Payments:** Stripe
- **Email:** Nodemailer

## ๐ŸŒŸ Why Entrify?

This project showcases a full production-like workflow:
- Authentication & authorization
- Payment processing with Stripe webhooks
- Role-based dashboards
- Real-world security practices
- Clean UI built with Tailwind and Ant Design

It demonstrates an end-to-end application suitable for production, but built as a learning project.

---

Feel free to explore the code, run it locally, and try the features!