This project manages online cinema reservations, incorporating several noteworthy features such as the ability to rate films and make reservations. Users can score their favorite movies and easily book seats for upcoming screenings, enhancing the overall cinema-going experience.
-
Add / Update / Delete Movies
-
Add / Update / Delete cinema
-
Add / Update / Delete Showtimes
-
Add / Update / Delete users
Follow these steps to set up the project:
git clone https://github.com/CinemaSwift.git
git clone https://github.com/CinemaSwift.git
3- To run the project, execute the following command:
python main.py
4- To start the TCP server, use the following command::
python main.py --runserver
5- To configure the database, execute the following command:
python main.py --configDB
6- Active the virtual environment by this command:
- For windows :
\venv\Scripts\activate
- for Unix or MaxOS:
source venv/bin\activate
7-This command adds an admin user to the system:
- For windows :
python main.py --show-user-manual
8- Displays the user manual with available commands and usage.:
- For windows :
python main.py --show-user-manual
9- Prompts for a username and changes the specified user to an admin.:
- For windows :
python main.py --change-to-admin
10- now use this command to install all of the requirements:
pip install -r requirements.txt
main.py: The main file that contains the TCP server and various commands.
users_module : User management module.
db: The module related to the connection with the database.
intractions: The module contains various commands and interactions with the server.
settings: Holds local settings, such as network configurations.
In this project, the backend development follows the MVC (Model-View-Controller) architecture, where the backend is separated into different parts. Each of these parts will be explained in detail here to provide a comprehensive understanding of the project's structural design and organization.
"The models in this section encapsulate the essential structural components of each database table, providing a clear and organized representation of the data schema. Meanwhile, the database manager, following a singleton design pattern, plays a pivotal role in database interactions. It establishes and maintains connections to the database, ensures data is regularly refreshed, and employs caching mechanisms to optimize data retrieval and storage performance. By effectively managing the interplay between models and the database, this project establishes a robust foundation for data storage and retrieval within the MVC architecture."
"The user module is responsible for defining user profiles with unique attributes, including usernames, emails, phone numbers, passwords, and user IDs. It enforces validation rules for each attribute, such as unique usernames and proper email formats. Additionally, it tracks user registration and login dates, ensuring accurate user activity logs."
"The main module acts as the central hub of the application, orchestrating the flow of user interactions and coordinating the various components of the backend. It houses the core functionalities, including user authentication, cinema session management, and transaction processing. By leveraging a loop that continually awaits and processes user requests, the main module ensures seamless communication with multiple users simultaneously. Additionally, it employs an event-driven model to handle asynchronous tasks efficiently, allowing for real-time updates and responsiveness in user interactions."
The client module simulates a user interacting with the system. Users can log in, perform various actions, and log out. The client module ensures concurrent user interactions without interference.
BUFFOR_SIZE_DATA = 65507 - UDP max packet size to avoid this use TCP instead of UDP
host_ip_adress = '' - localhost by default(127.0.0.1)
host_port = 1024 - free PORT
The CinemaSwift project successfully implements an online cinema reservation system with user authentication, film rating, and reservation functionalities. The MVC architecture ensures a well-organized and modular codebase, promoting code reusability and maintainability. The project's main execution module, users module, and client interaction module work in harmony to provide users with a smooth and efficient experience.
The installation guide facilitates the setup process, ensuring that users can quickly deploy the system on their local machines. By following the outlined steps, users can create a virtual environment, install necessary dependencies, and start exploring the functionalities of CinemaSwift.
Overall, the project showcases effective backend development practices, encapsulating database management, user models, and client interactions in a cohesive structure. The modular design allows for easy extension and modification, making it an excellent foundation for future enhancements and feature additions.
Note: The specific details of individual files are omitted as per your request. The emphasis is on providing guidance for setting up and running the project along with a general overview of its features.
This readme file is primarily intended for project setup and usage. It does not include detailed explanations of individual files. For specific file functionalities, refer to the relevant sections in this readme.