This is a web-based Cinema Management System built with Flask, Python, and MySQL. The system allows users to manage customers, movies, ticket bookings, and food items in a cinema environment. It also provides features for movie management, scheduling, and food item management.
-
Customer Management
- Add, update, delete, and search customers.
- Customer login and registration functionality.
- Display a list of all customers.
-
Movie Management
- Add, update, delete, and search movies.
- Display movie details and list of available movies.
- Movie schedule and booking management.
-
Ticket Booking
- Book tickets for movies in different halls.
- Check seat availability for movie shows.
-
Food Management
- Add, update, delete, and search food items available in the cinema.
- Manage food inventory, prices, and quantities.
-
Reporting and Analytics
- View detailed reports such as:
- Total customers and bookings.
- Revenue breakdown by movies and genres.
- Most popular movies, peak revenue days, and hall utilization rate.
- View detailed reports such as:
-
Admin and Cashier Login
- Admin login to manage movies, customers, and food items.
- Cashier login for handling food item management and transactions.
- Flask - Python-based micro web framework used to build the web application.
- MySQL - Database used for storing data related to customers, movies, tickets, and food items.
- SQLAlchemy - ORM for connecting and interacting with MySQL.
- HTML, CSS, Bootstrap - Used for the frontend design and user interface.
- Jinja2 - Template engine used with Flask to generate dynamic content.
The system uses the following database schema:
-
Customer Table
- customer_id (Primary Key)
- customer_name
- customer_phone
- customer_feedback
- customer_password
-
Movie Table
- MovieID (Primary Key)
- MovieName
- Director
- Language
- Genre
- Release_Date
- Duration
- Movie_Description
- PosterPath
- Price
-
Ticket Table
- TicketID (Primary Key)
- MovieID (Foreign Key)
- CustomerID (Foreign Key)
- HallID (Foreign Key)
- ShowDate
- ShowTime
- Price
-
Food Item Table
- item_id (Primary Key)
- Item_name
- Quantity_Available
- Price
-
Hall Table
- Hall_ID (Primary Key)
- Hall_name
- Capacity
-
Movie Show Table
- ShowID (Primary Key)
- MovieID (Foreign Key)
- HallID (Foreign Key)
- ShowDate
- ShowTime
-
Hall Seat Table
- SeatID (Primary Key)
- ShowID (Foreign Key)
- IsBooked
- Seat_Row
- Seat_Column
- Install Python 3.7+ from Python's official website.
- Install MySQL from MySQL's official website.
-
Clone the repository:
git clone https://github.com/your-repository/cinema-management-system.git
-
Install the required Python packages:
cd cinema-management-system pip install -r requirements.txt -
Set up the MySQL database:
-
Create a MySQL database called
cinema:CREATE DATABASE cinema;
-
Import the schema (tables) for the system into the
cinemadatabase.
-
-
Update the
SQLALCHEMY_DATABASE_URIin yourapp.pyfile with your MySQL username and password:app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:your_password@localhost/cinema'
-
Run the Flask application:
python app.py
-
Open the web application in your browser:
http://127.0.0.1:5000/
Here are some important routes available in the application:
/- Home page/next_operation- Page showing movies/add_customer- Add a new customer/list_customers- List all customers/delete_customer/<int:customer_id>- Delete a customer/update_customer/<int:customer_id>- Update customer details/search_customer- Search for a customer/Tlog- Ticket vendor login page/Tmanager- Ticket manager page/movie/<int:movie_id>- Movie details page/movie-schedule/<int:movie_id>- Movie schedule/food_item- Manage food items/report- View system reports
Contributions are welcome! Please fork the repository, create a new branch, and submit a pull request.