Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Cinema Online Booking System

A full-stack cinema ticket booking platform built with Django REST Framework & React.js.

License Python Django React MySQL Stripe


πŸ“Œ Overview

Cinema Online Booking System is a complete ticket reservation platform where users can browse movies, view details, choose showtimes, book seats, make secure payments (Stripe), and download QR-coded tickets.

The project includes full authentication, movie management, booking logic, Stripe integration, PDF ticket generation, and a modern React frontend.


πŸš€ Features

πŸŽ₯ Movies & Content

  • View all movies (poster, rating, trailer, genre, actors)
  • Movie detail page with full information
  • Real dataset of 10K+ movies (TMDB based)

πŸ‘€ User System

  • JWT-based login & register
  • Protected endpoints
  • User profile page with previous bookings

πŸͺ‘ Booking System

  • Select showtime
  • Add seats & tickets
  • Book & pay through Stripe
  • Automatic booking confirmation

πŸ’³ Payment Flow

  • Stripe Checkout Session
  • Stripe Webhooks to verify payment
  • Ticket creation on successful payment

🎫 Ticket System

  • Auto-generated PDF ticket
  • QR verification code
  • Movie poster embedded
  • Downloadable from frontend

πŸ€– AI Chatbot (Optional)

  • Powered by Rasa
  • DVD server + Django integration

πŸ—οΈ System Architecture

Frontend (React + Vite)
        |
        | fetch()
        v
Backend API (Django REST)
        |
        | DB ORM
        v
     MySQL DB
        |
        | Celery
        v
Async Workers (Ticket PDF)
        |
        | Payment Status
        v
Stripe Payment Gateway

πŸ“‚ Project Structure

Backend (Django)

/backend
 β”œβ”€β”€ users/
 β”œβ”€β”€ movies/
 β”œβ”€β”€ showtimes/
 β”œβ”€β”€ booking/
 β”œβ”€β”€ chatbot/
 β”œβ”€β”€ tickets/
 β”œβ”€β”€ cinema_backend/
 β”œβ”€β”€ media/
 └── requirements.txt

Frontend (React)

/frontend
 β”œβ”€β”€ src/
 β”‚   β”œβ”€β”€ api/
 β”‚   β”œβ”€β”€ components/
 β”‚   β”œβ”€β”€ context/
 β”‚   β”œβ”€β”€ pages/
 β”‚   β”œβ”€β”€ assets/
 β”‚   └── App.jsx
 └── package.json

πŸ› οΈ Tech Stack

Backend

  • Python 3.11
  • Django 5.x
  • Django REST Framework
  • MySQL
  • Celery + Redis
  • Stripe API
  • Pillow
  • qrcode
  • drf-yasg (Swagger)

Frontend

  • React 18
  • Vite
  • TailwindCSS
  • JWT Auth
  • Axios

βš™οΈ Installation

πŸ”Ή 1. Clone the repository

git clone https://github.com/YOUR_USERNAME/cinema-online-system.git
cd cinema-online-system

πŸ›  Backend Setup (Django)

πŸ”Ή 2. Create virtual environment

python -m venv venv
source venv/bin/activate  # Mac / Linux
venv\Scripts\activate     # Windows

πŸ”Ή 3. Install dependencies

pip install -r requirements.txt

πŸ”Ή 4. Apply migrations

python manage.py migrate

πŸ”Ή 5. Run the server

python manage.py runserver

πŸ–₯ Frontend Setup (React)

πŸ”Ή 1. Install deps

cd frontend
npm install

πŸ”Ή 2. Run frontend

npm run dev

πŸ” Environment Variables

Backend .env

SECRET_KEY=your_secret
DEBUG=True
DB_NAME=cinema_db
DB_USER=root
DB_PASSWORD=password
DB_HOST=127.0.0.1
DB_PORT=3306

STRIPE_SECRET_KEY=your_key
STRIPE_PUBLIC_KEY=your_key
TMDB_KEY=your_key

Frontend .env

VITE_API_URL=http://127.0.0.1:8000/api/

πŸ§ͺ API Documentation

Swagger UI:

http://127.0.0.1:8000/swagger/

πŸ“‘ Main API Endpoints

Movies

GET /api/movies/
GET /api/movies/<id>/

Auth

POST /api/users/register/
POST /api/users/login/
GET  /api/users/profile/

Booking

POST /api/bookings/create/
GET  /api/bookings/user/

Payment

POST /api/stripe/create-checkout-session/
POST /api/stripe/webhook/

Tickets

GET /api/tickets/download/<ticket_id>/

🧩 Future Enhancements

  • Seat selection UI (graphical grid)
  • Movie recommendations system (ML based)
  • Admin dashboard for managing movies & showtimes
  • Push notifications for showtime reminders
  • Multi-language support

πŸ“œ License

This project is MIT Licensed.

About

Online Cinema Reservation System using django rest framework

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages