Skip to content

krishgabani/GrabYourSeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 

Repository files navigation

GrabYourSeat – Fullstack Movie Booking App

🎬 Functionality Overview

  • 👥 User Authentication with Clerk
    Enable secure sign-up via email or phone number. Supports multi-session login to switch profiles without logging out.

  • 🎬 Explore & Book Movies
    Browse movies, watch trailers, add to favorites, view details, and select seats to book tickets.

  • 💳 Online Payments via Stripe
    Secure payment gateway integration. Failed payments hold seats for 10 minutes before auto-release.

  • 📅 Admin Dashboard
    Manage bookings and add shows using live "Now Playing" data from TMDB for quick setup.

  • 📧 Email Notifications with Inngest
    Sends booking confirmations, showtime reminders, and new show announcements automatically.

  • Background Jobs with Inngest
    Handles tasks like delayed seat release and scheduled reminders without blocking main server logic.

🧱 Project Structure

This repository contains the client (frontend) and server (backend) of the GrabYourSeat movie booking platform.

root/
├── client/    # Vite + React frontend
└── server/    # Express backend + Stripe, Inngest, Postgres, Prisma etc.

✅ Prerequisites

  • Postgres Database (e.g. Supabase)
  • Redis (Upstash)
  • Stripe Account
  • Clerk Project
  • Inngest Account
  • TMDB API Key
  • Brevo (Sendinblue) SMTP Account

📦 Setup Instructions

🖥️ To Run Client

cd client
npm install
npm run dev

🛠️ To Run Server

cd server
npm install
npm run server

🗄️ To push schema to DB

npx prisma migrate dev

🛠️ Environment Variables

📁 client/.env

VITE_CLERK_PUBLISHABLE_KEY = your-clerk-publishable-key
VITE_CURRENCY = ₹
VITE_BASE_URL = http://localhost:3000
VITE_TMDB_IMAGE_BASE_URL = https://image.tmdb.org/t/p/original

📁 server/.env

DATABASE_URL = transaction-pooler-URL (port 6543)
DIRECT_URL = session-pooler-URL (port 5432) AND append ?pgbouncer=true
REDIS_URL = upstash-redis-url

CLERK_PUBLISHABLE_KEY = your-clerk-pub-key
CLERK_SECRET_KEY = your-clerk-secret-key

INNGEST_EVENT_KEY = your-inngest-event-key
INNGEST_SIGNING_KEY = your-inngest-signing-key

TMDB_API_KEY = your-tmdb-api-key

STRIPE_PUBLISHABLE_KEY = your-stripe-pub-key
STRIPE_SECRET_KEY = your-stripe-secret-key
STRIPE_WEBHOOK_SECRET = your-stripe-webhook-secret

SENDER_NAME = GrabYourSeat
SENDER_EMAIL = youremail@example.com
SMTP_USER = your-smtp-user@smtp-brevo.com
SMTP_PASSWORD = your-brevo-password

📂 .gitignore Setup

Make sure both client/.gitignore and server/.gitignore contain:

node_modules/
.env

📦 Local Setup

🗄️ Running Postgres Locally (Docker)

docker run --name local-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=grab_your_seat -p 5432:5432 -d postgres:15

Update server/.env:

DATABASE_URL=postgresql://postgres:postgres@localhost:5432/grab_your_seat
DIRECT_URL=postgresql://postgres:postgres@localhost:5432/grab_your_seat

Apply schema:

npx prisma migrate dev

🗄️ Running Redis Locally (Docker)

Update server/.env:

REDIS_URL = redis://127.0.0.1:7379

⚙️ Running Inngest Locally (Background Jobs)

npm run inngest:dev

💳 Running Stripe Locally (Webhooks)

Forward Stripe webhooks to your local server.

stripe login
stripe listen --forward-to localhost:3000/api/stripe

Copy the generated webhook secret and add it to server/.env:

STRIPE_WEBHOOK_SECRET=whsec_XXXX

🔐 Where to Get API Keys

About

Movie Booking App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages