Skip to content

Commit

Permalink
Enhanced movie match page & project documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed Jan 5, 2024
1 parent fa445d5 commit ea8b896
Show file tree
Hide file tree
Showing 21 changed files with 223 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms
# These are supported funding model platforms - auto generated by GitHub

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
Expand Down
8 changes: 4 additions & 4 deletions .netlify/state.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"siteId": "your-netlify-site-id",
"deployId": "your-netlify-deploy-id",
"buildId": "your-netlify-build-id",
"siteId": "your-netlify-site-id-mine-is-not-published-here",
"deployId": "your-netlify-deploy-id-mine-is-not-published-here",
"buildId": "your-netlify-build-id-mine-is-not-published-here",
"context": "production",
"branch": "main",
"commitRef": "your-git-commit-ref"
"commitRef": "your-git-commit-ref-mine-is-not-stated-here"
}
50 changes: 50 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# MovieVerse Project - Code of Conduct

## Introduction

Welcome to the MovieVerse Project! This Code of Conduct outlines our expectations for participants within the community, as well as steps to report unacceptable behavior. We are committed to providing a welcoming and inspiring community for all and expect our Code of Conduct to be honored. Anyone who violates this code of conduct may be banned from the community.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- **Using welcoming and inclusive language**
- **Being respectful of differing viewpoints and experiences**
- **Gracefully accepting constructive criticism**
- **Focusing on what is best for the community**
- **Showing empathy towards other community members**

Examples of unacceptable behavior by participants include:

- **The use of sexualized language or imagery and unwelcome sexual attention or advances**
- **Trolling, insulting/derogatory comments, and personal or political attacks**
- **Public or private harassment**
- **Publishing others' private information, such as a physical or electronic address, without explicit permission**
- **Other conduct which could reasonably be considered inappropriate in a professional setting**

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [insert email address]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version].

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

---

The MovieVerse team is dedicated to making our community a safe, welcoming, and productive environment for everyone. Thank you for helping us to ensure that every member feels valued and respected.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ function movieVerseResponse(message) {
} else if (lowerMessage.includes("movie description") || lowerMessage.includes("tell me about")) {
return "Sure, please provide the movie name you want to learn about, and I'll fetch its description for you!";
} else if (lowerMessage.includes("how many movies")) {
return "MovieVerse has a vast database of millions of movies. You can search for any movie, and I'll try to fetch details for you!";
return "MovieVerse has a vast databases of millions of movies. You can search for any movie, and I'll try to fetch details for you!";
} else if (lowerMessage.includes("latest movies")) {
return "I can provide information on recent movie releases. However, for the most up-to-date releases, consider checking the 'Latest Movies' section of MovieVerse!";
} else if (lowerMessage.includes("recommend a movie") || lowerMessage.includes("suggestion")) {
return "Certainly! How about watching 'Inception'? It's a critically acclaimed movie with a captivating plot!";
} else if (lowerMessage.includes("how does this work") || lowerMessage.includes("how to use")) {
return "Simply type in your query related to a movie, and I'll provide details from our MovieVerse database. You can ask about IMDb ratings, descriptions, and more!";
return "Simply type in your query related to a movie, and I'll provide details from our MovieVerse databases. You can ask about IMDb ratings, descriptions, and more!";
} else if (lowerMessage.includes("who created this") || lowerMessage.includes("developer")) {
return "MovieVerse is the result of the hard work of dedicated developers passionate about movies. We hope you find it helpful!";
} else if (lowerMessage.includes("top rated movies")) {
Expand Down
4 changes: 2 additions & 2 deletions MovieVerse-Mobile/platforms/ios/www/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ function movieVerseResponse(message) {
} else if (lowerMessage.includes("movie description") || lowerMessage.includes("tell me about")) {
return "Sure, please provide the movie name you want to learn about, and I'll fetch its description for you!";
} else if (lowerMessage.includes("how many movies")) {
return "MovieVerse has a vast database of millions of movies. You can search for any movie, and I'll try to fetch details for you!";
return "MovieVerse has a vast databases of millions of movies. You can search for any movie, and I'll try to fetch details for you!";
} else if (lowerMessage.includes("latest movies")) {
return "I can provide information on recent movie releases. However, for the most up-to-date releases, consider checking the 'Latest Movies' section of MovieVerse!";
} else if (lowerMessage.includes("recommend a movie") || lowerMessage.includes("suggestion")) {
return "Certainly! How about watching 'Inception'? It's a critically acclaimed movie with a captivating plot!";
} else if (lowerMessage.includes("how does this work") || lowerMessage.includes("how to use")) {
return "Simply type in your query related to a movie, and I'll provide details from our MovieVerse database. You can ask about IMDb ratings, descriptions, and more!";
return "Simply type in your query related to a movie, and I'll provide details from our MovieVerse databases. You can ask about IMDb ratings, descriptions, and more!";
} else if (lowerMessage.includes("who created this") || lowerMessage.includes("developer")) {
return "MovieVerse is the result of the hard work of dedicated developers passionate about movies. We hope you find it helpful!";
} else if (lowerMessage.includes("top rated movies")) {
Expand Down
4 changes: 2 additions & 2 deletions MovieVerse-Mobile/www/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ function movieVerseResponse(message) {
} else if (lowerMessage.includes("movie description") || lowerMessage.includes("tell me about")) {
return "Sure, please provide the movie name you want to learn about, and I'll fetch its description for you!";
} else if (lowerMessage.includes("how many movies")) {
return "MovieVerse has a vast database of millions of movies. You can search for any movie, and I'll try to fetch details for you!";
return "MovieVerse has a vast databases of millions of movies. You can search for any movie, and I'll try to fetch details for you!";
} else if (lowerMessage.includes("latest movies")) {
return "I can provide information on recent movie releases. However, for the most up-to-date releases, consider checking the 'Latest Movies' section of MovieVerse!";
} else if (lowerMessage.includes("recommend a movie") || lowerMessage.includes("suggestion")) {
return "Certainly! How about watching 'Inception'? It's a critically acclaimed movie with a captivating plot!";
} else if (lowerMessage.includes("how does this work") || lowerMessage.includes("how to use")) {
return "Simply type in your query related to a movie, and I'll provide details from our MovieVerse database. You can ask about IMDb ratings, descriptions, and more!";
return "Simply type in your query related to a movie, and I'll provide details from our MovieVerse databases. You can ask about IMDb ratings, descriptions, and more!";
} else if (lowerMessage.includes("who created this") || lowerMessage.includes("developer")) {
return "MovieVerse is the result of the hard work of dedicated developers passionate about movies. We hope you find it helpful!";
} else if (lowerMessage.includes("top rated movies")) {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions database/movie-user.sql → databases/movie-user.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Create a database (Uncomment if needed)
-- Create a databases (Uncomment if needed)
CREATE DATABASE MovieVerseDB;

-- Switch to the MovieVerseDB database (Uncomment if needed)
-- Switch to the MovieVerseDB databases (Uncomment if needed)
\c MovieVerseDB

-- Create table for storing movie details
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
62 changes: 62 additions & 0 deletions middleware/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# MovieVerse Middleware - README.md

## Overview

Welcome to the Middleware directory of the MovieVerse project! This directory contains crucial middleware components that handle various aspects of the MovieVerse application. These components include authentication, logging, error handling, and data processing for the application's backend.

## Directory Contents

The Middleware directory consists of two primary files:

1. **middleware.js**
2. **app-middleware.py**

### middleware.js

This JavaScript file is built on the Node.js platform using the Express framework. It includes several middleware functions essential for the backend operations of the MovieVerse application.

#### Key Features:

- **Logger Middleware**: Logs every request to the server, including the request method, URL, and timestamp.
- **Authentication Middleware**: Verifies JWT tokens in request headers to authenticate users.
- **Movie Fetcher Middleware**: Retrieves movie details based on the provided movie ID.
- **Error Handling Middleware**: Catches and handles errors occurring during request processing.
- **Movie Data Validation Middleware**: Ensures that all required movie data fields are present in the request.
- **Route-specific Middleware Application**: Demonstrates how to apply middleware to specific routes, such as the route for adding new movies.

#### Usage:

To use this middleware in your Node.js application, include it in your server file and apply it to your Express app instance as shown in the file.

### app-middleware.py

This Python file is created with Flask, a micro web framework. It includes custom middleware implementations suitable for a Flask application.

#### Key Features:

- **Logger Middleware**: A custom middleware that logs details about each request and its response time.
- **Custom Request Processing Middleware**: Inspects incoming requests, logging method, path, content length, type, body, and headers.
- **Custom Response Modification Middleware**: Processes responses after they are generated, providing information about the response status, headers, body, and processing time.
- **Error and Exception Handling Middleware**: Handles specific HTTP errors (e.g., 404 not found) and general exceptions, returning JSON responses.
- **Authentication Middleware**: Demonstrates how to handle routes with POST and GET methods, including a placeholder for authentication logic.

#### Usage:

To integrate this middleware into a Flask application, include it in your Flask server file. The middleware will automatically apply to all routes defined in the Flask app.

## Getting Started

1. **Clone the Repository**: Ensure you have the MovieVerse project repository cloned.
2. **Navigate to the Middleware Directory**: Change your working directory to the Middleware directory within the project.
3. **Install Dependencies**: Install necessary dependencies for Node.js (`npm install`) and Flask (`pip install flask`).
4. **Integrate with Your Application**: Import these middleware modules into your main application server file and apply them as needed.

## Contribution

Contributions to improve or extend the functionality of these middleware components are welcome. Please adhere to the project's contributing guidelines and code of conduct when making contributions.

## License

This entire project is licensed under MIT's license.

---
4 changes: 1 addition & 3 deletions project-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,4 @@ To effectively use these configuration files, it is essential to have a basic un

These files are pre-configured for a standard setup but might require adjustments to fit specific project needs or environments. Always review and customize them according to your project requirements.

---

This README provides a basic overview and should be supplemented with more specific documentation for individual configurations as needed. The settings defined in these files are crucial for the project's performance, security, and maintainability.
---
2 changes: 1 addition & 1 deletion shell-scripts/genEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# This script generates a .env file used by the MovieVerse application
# to set environment variables for different configurations like API keys,
# database URIs, etc. This file is not published to GitHub for security reasons -
# databases URIs, etc. This file is not published to GitHub for security reasons -
# so be sure to replace with your own values.

# Check if .env file already exists
Expand Down
72 changes: 72 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# MovieVerse App - README.md for the `src` directory

Welcome to the MovieVerse app, your ultimate guide to the world of movies! This application is designed to help users explore and learn about their favorite movies, directors, actors, and more. Dive into an immersive experience with our comprehensive directory structure.

## Directory Structure

The MovieVerse app's `src` directory is organized into three primary directories: `css`, `html`, and `js`. Each directory contains specific files that contribute to the functionality and appearance of the app. Here's a detailed overview:

### CSS Directory

This directory contains the Cascading Style Sheets (CSS) files responsible for the styling of the web pages.

- `reset.css`: Resets the browser's default styles to ensure consistency across different browsers.
- `style.css`: The main stylesheet for the app, containing styles that are common across multiple pages.
- `discussions.css`: Styles specific to the discussions page.
- `trivia.css`: Styles for the trivia section of the app.

### HTML Directory

The HTML directory includes all the markup files necessary for the structure of the web pages.

- `about.html`: Contains information about the MovieVerse app.
- `actor-details.html`: A detailed view of actor profiles.
- `company-details.html`: Provides information about movie production companies.
- `director-details.html`: Detailed information about movie directors.
- `discussions.html`: A platform for users to discuss various movie-related topics.
- `favorites.html`: Allows users to view and manage their favorite movies.
- `movie-details.html`: Detailed information about specific movies.
- `movie-match.html`: A feature that helps users find movies matching their mood, genre, and time period preferences.
- `movie-timeline.html`: A timeline view of movies.
- `privacy-policy.html`: Outlines the app's approach to user privacy.
- `settings.html`: Allows users to customize their MovieVerse experience.
- `terms-of-service.html`: The terms governing the use of MovieVerse.
- `trivia.html`: A trivia game to test users' movie knowledge.

### JS Directory

The JavaScript directory contains scripts that add interactivity and functionality to the web pages.

- `actor-details.js`: Handles the dynamic functionality on the actor details page.
- `app.js`: The main JavaScript file that initiates the app.
- `company-details.js`: Script for handling company details functionality.
- `director-details.js`: Manages functionality on the director details page.
- `index.ejs`: A template for the entry point of the app.
- `movie-details.js`: Script for the movie details page.
- `movie-timeline.js`: Manages the timeline functionality for movies.
- `quiz.js`: Handles the trivia quiz functionalities.
- `root-config.js`: Root configuration script for the app.
- `router.js`: Manages routing across the app.
- `settings.js`: Script for handling user settings.
- `single-spa-config.js`: Configuration file for the single-spa framework used in the app.

## Getting Started

To get started with MovieVerse:

1. **Clone the repository**: Use Git to clone the app to your local machine.
2. **Navigate to the app directory**: Change your directory to the MovieVerse folder.
3. **Install dependencies**: If the app requires any dependencies, install them via your package manager.
4. **Run the app**: Start the app on your local server and navigate to the appropriate port to view it.

## Contributing

Contributions to MovieVerse are always welcome. Whether it's bug reports, feature requests, or code contributions, please feel free to contribute. For major changes, please open an issue first to discuss what you would like to change.

## License

This project is licensed under MIT license.

---

Enjoy exploring the MovieVerse and delve into the fascinating world of cinema!
11 changes: 9 additions & 2 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1716,17 +1716,24 @@ textarea {
flex-direction: column;
}

#movies-container1 {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-left: 30px;
}

#movies-container .movie-item {
display: flex;
align-items: center;
margin-bottom: 10px; /* Adjust for spacing between items */
margin-bottom: 10px;
}

.movies-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px; /* Adjust as needed */
gap: 20px;
}

.center-container {
Expand Down
Loading

0 comments on commit ea8b896

Please sign in to comment.