Code Monkey home page Code Monkey logo

antoniosertic23 / cinereserve-the-movie-seat-scheduler Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10.23 MB

CineReserve is a web application I initiated to practice my skills in modern JavaScript after completing courses, aiming to independently develop a moderately complex project. From conceptualization to implementation, I crafted this project from scratch, envisioning a user-friendly interface for reserving movie seats.

HTML 7.30% JavaScript 83.41% CSS 9.28%
async-await css3 firebase firebase-auth firebase-realtime-database html5 javascript javascript-api javascript-dom json model-view-controller mvc mvc-javascript vanilla-javascript omdbapi seat-booking user-authentication movie-seat-booking cinereserve

cinereserve-the-movie-seat-scheduler's Introduction

CineReserve - Movie Seat Scheduler

CineReserve

Description

CineReserve is a web application designed to manage movie theaters, allowing users to reserve seats for various movies. This project aims to provide a user-friendly interface for both administrators and regular users to interact with the system efficiently.

Features

  • User Authentication: Supports user login and signup functionalities.
  • Theater Management: Admins can add, edit, and delete theater information, including seating arrangements.
  • Movie Management: Admins can add, edit, and delete movie details associated with each theater.
  • Seat Reservation: Users can book seats for movies showing in the theaters.

Technologies Used

My Skills

  • Frontend: HTML, CSS, JavaScript
  • Backend: Firebase Realtime Database for data storage
  • Authentication: Firebase Authentication for user authentication

Project Structure

  • src/
    • css/: Contains CSS files for styling.
      • login.css: Styles for the login/signup page.
      • modal.css: Styles for modal components.
      • spinner.css: Styles for the spinner component.
      • style.css: General styles for the application.
      • theatre-display.css: Styles specific to the theater display page.
    • js/
      • controllers/: Contains JavaScript files for controlling different aspects of the application.
        • theaterController.js: Controls theater-related functionality.
        • userController.js: Controls user-related functionality.
      • models/: Contains JavaScript files defining data models used in the application.
        • theaterModel.js: Defines the theater data model.
        • userModel.js: Defines the user data model.
      • views/: Contains JavaScript files for rendering different views in the application.
        • modals/: Contains JavaScript files for modal components used in the application.
          • addMovieModal.js: Modal for adding a movie to a theater.
          • addTheaterModal.js: Modal for adding a new theater.
          • bookSeatsModal.js: Modal for booking seats in a theater.
          • changeMovieModal.js: Modal for changing the movie in a theater.
          • deleteTheaterModal.js: Modal for deleting a theater.
          • editTheaterModal.js: Modal for editing theater details.
          • errorModal.js: JavaScript file for handling error modals.
          • modal.js: Base modal class providing common functionality.
        • theaterView.js: JavaScript file for rendering theater-related views.
      • config.js: Configuration file for Firebase and API keys.
      • firebase.js: Contains Firebase initialization code.
      • helpers.js: Helper functions used throughout the application.
    • img/: Contains image assets used in the application.
  • data.json: JSON file containing sample data for the application.
  • index.html: Main HTML file for the application.
  • login.html: HTML file for the login/signup page.

Application Architecture

The application follows the Model-View-Controller (MVC) pattern, which separates the codebase into three main components:

  • Models: Represent the data and its logic. Located in js/models/, they define the structure and behavior of different data entities, such as theaters and users.

  • Views: Responsible for displaying the data to users and handling user input. Found in js/views/, views render the interface elements and interact with users.

  • Controllers: Act as intermediaries between models and views. Located in js/controllers/, controllers manage user actions, update data in models, and update views accordingly.

By using MVC, the codebase remains organized and modular, facilitating easier understanding, maintenance, and scalability. Each component has a specific responsibility, promoting code reusability and making it easier to add new features or make changes without affecting other parts of the application.

How to Run the Project

  1. Clone the repository to your local machine.
  2. Navigate to the project directory.
  3. Set up your Firebase database by creating a new Firebase project and filling in the FIREBASE_CONFIG object in the config.js file with your Firebase project configuration.
  4. Obtain an API key from OMDB API and add it to the API_KEY constant in the config.js file.
  5. When a user is created, add their user ID as the ADMIN_ID constant in the config.js file to grant them admin privileges.
  6. Import data.json into your Firebase Realtime Database to populate initial data if desired.
  7. Open index.html in a web browser to access the main application.

Getting Started

  • User Authentication:
    • New users can easily sign up for an account or log in with existing credentials.
  • Admin Actions:
    • Administrators gain access to theater management features after logging in.
  • User Actions:
    • Regular users have the ability to browse theaters, check movie schedules, and reserve seats for screenings.

cinereserve-the-movie-seat-scheduler's People

Contributors

antoniosertic23 avatar

Watchers

 avatar

cinereserve-the-movie-seat-scheduler's Issues

#4 Implement Minor Enhancements and Code Maintenance

This task aims to introduce several minor improvements to the application to enhance user experience and maintain code cleanliness.

These improvements include:

  • Displaying user-friendly error messages to inform users about encountered errors.

  • Implementing a loading spinner to indicate when data is being loaded or processed.

  • Adding input validation to enforce constraints on certain input fields.

  • Conducting code cleanup and ensuring codebase integrity by addressing any identified issues or inconsistencies.

Improve usability, reliability, and code quality across the application.

#5 Enhancements for expanding franchise cinema functionality

Description

Several enhancements are proposed to expand the functionality of the franchise cinema ticket reservation application. These enhancements include creating a unique franchise cinema network, where each franchise will have multiple cinemas, each cinema will have multiple halls, and each hall will feature multiple movies.

Proposed Enhancements

  1. Project Renaming: Rename the project to "CineTerra" to reflect the new features and direction of the application.

  2. Franchise Cinema Network: Introduce the concept of a franchise cinema network, allowing for the management of multiple cinemas under a single franchise umbrella.

  3. Multiple Cinemas per Franchise: Enable the ability to add and manage multiple cinemas within each franchise, providing flexibility in catering to diverse geographical locations and audiences.

  4. Multiple Halls per Cinema: Implement the functionality to define and administer multiple halls within each cinema, facilitating efficient scheduling and management of screenings.

  5. Multiple Movies per Hall: Extend the system to support the scheduling and booking of multiple movies within each hall, offering patrons a broader range of viewing options and maximizing revenue potential.

    CineTerra

    Theater Table

    Theater ID Name Address Contact Information Other Details
    1 Cinestar Zagreb Main Street 123 [email protected] ...

    Hall Table

    Hall ID Theater ID Hall Number Capacity Other Details
    1 1 1 100 ...

    Movie Table

    Movie ID Name Duration Description Other Details
    1 The Matrix 120 minutes A computer hacker learns about the true nature of reality. ...

    Projection Table

    Projection ID Movie ID Hall ID Start Time End Time Other Details
    1 1 1 2024-04-23 18:00:00 2024-04-23 20:00:00 ...

    User Table

    User ID User Type First Name Last Name Email Username Password Other Details
    1 Admin John Doe [email protected] john_doe ******** ...
    2 User Jane Smith [email protected] jane_smith ******** ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.