The Watchlist is a web application designed to allow users to create, manage, and interact with lists of movies and TV shows. The project is built using Meteor, React, and MongoDB, with data sourced from The Movie Database (TMDb).
development_secrets.json
Welcome to The Watchlist project! This application allows users to explore, create, and manage personalised lists of movies and TV shows. As a new developer, you'll be working with a tech stack that includes Meteor, React, and MongoDB. Our codebase follows standard Agile software engineering practices and is structured to facilitate collaboration and continuous integration.
This documentation will guide you through setting up the project on your local machine, understanding our versioning and branching strategies, and contributing code through pull requests. We encourage you to read through this document carefully and reach out to any of the team members listed below if you have questions.
npm install -g meteor
Clone the project repository to your local machine.
git clone https://github.com/Monash-FIT3170/The-Watchlist.git
cd The-Watchlist
Install all the necessary Node.js dependencies.
npm install
You need to set up a development_secrets.json
file for running the project locally. This file contains sensitive information like API keys and should not be committed to version control.
Create a development_secrets.json
file in the root directory with the following structure:
{
"private": {
"github": {
"clientId": "your-github-client-id",
"clientSecret": "your-github-client-secret"
},
"google": {
"clientId": "your-google-client-id",
"clientSecret": "your-google-client-secret"
},
},
"TMDB_API_KEY": "your-tdmb-api-key"
}
Ensure that the values are replaced with your actual API keys.
Alternatively, you can use the provided sample file as a starting point:
cp development_secrets.sample.json development_secrets.json
Then, open development_secrets.json
and replace the placeholder values with your own API keys.
To run the project locally, you have two options:
development_secrets.json
fileIf you have created and filled in the development_secrets.json
file, run the project using:
npm start
This will automatically use the development_secrets.json
file.
development_secrets.json
fileIf you do not need to use the development_secrets.json
file (e.g., for development purposes without requiring external APIs), you can run the project using:
npm run start-nosecrets
This option allows you to start the project without loading any secrets.
These instructions provide flexibility for running the project both with and without the development_secrets.json
file. For typical development, the first option (npm start
) is recommended, as it ensures all necessary configurations are applied.
The application will be accessible at http://localhost:3000.
The Watchlist is deployed at thewatchlist.xyz. The application can be deployed on any platform, so long as it can connect to an external database.
Currently, The Watchlist is deployed using the following ecosystem:
Please note that the entire project can be run with zero cost for ~6 months using an account registered with the GitHub Student Developer Pack. During all the following steps, when registering for an account, connect the account to GitHub if using an SDP account, which will provide free credits to use.
You will also need to obtain a domain name (if you want to deploy to a custom domain). GoDaddy was the domain provider used to deploy thewatchlist.xyz.
A complete deployment, using the above ecosystem, involves three steps:
Register for an account at Heroku.
Go to Profile -> Settings -> Billing. Enable "Eco Dynos Plan". Copy the API key in the section below for future reference.
Create a new app. The name should be watchlist-monash
. The region should be US.
Download the Heroku CLI from Heroku CLI Installation.
In the cloned repository, run the following command in Terminal:
heroku git:remote -a watchlist-monash
This will set up the Heroku remote in your Git repository.
Navigate to your app in the Heroku dashboard. Click on Settings.
In the Config Vars section, click on Reveal Config Vars. Set the following:
METEOR_SETTINGS
: Copy-paste the complete contents of development_secrets.json
(replacing all the values with production credentials).MONGO_URL
: Copy-paste the MongoDB connection URL, including username and password.ROOT_URL
: Set to the domain name you purchased (or set to the Heroku URL provided in the app dashboard).In the Domains section, add the custom domain (if relevant).
Activate automatic SSL management.
HEROKU_API_KEY
. Set the value to your Heroku API key obtained earlier..github/workflows/auto-deploy.yml
, changing the heroku_email
value to the email you registered with Heroku.Finally, to ensure Google OAuth works correctly, update the URL in server/main.js
:
if (Meteor.isProduction){
Meteor.absoluteUrl.defaultOptions.rootUrl = "https://www.thewatchlist.xyz/"; // update this URL
} else if (Meteor.isDevelopment){
Meteor.absoluteUrl.defaultOptions.rootUrl = "http://localhost:3000/";
}
Make sure you are using the correct version of Node.js based on your operating system:
development_secrets.json
This file contains sensitive information and should not be committed to the repository. Ensure that it is added to your .gitignore
file.
Ensure that MongoDB is running and accessible when running the application locally. You can use a local MongoDB instance or a cloud-based MongoDB service like MongoDB Atlas.
The project relies on The Movie Database (TMDb) for movie and TV show data. Ensure that your API usage stays within TMDb's rate limits to avoid disruptions.
With the project reaching its final stages, we are introducing Semantic Versioning 2.0.0 as the official versioning strategy for all future releases. This versioning convention will help developers and contributors understand the nature of changes between releases and ensure a smooth evolution of the project.
Version numbers will follow the format:
MAJOR.MINOR.PATCH
While earlier stages of the project did not strictly adhere to Semantic Versioning, we encourage all future contributors to adopt this strategy to maintain consistency and clarity in the release process.
Starting with the current version, all future releases will be tagged in the Git repository to help track changes effectively. Contributors can find details of each release in the Releases section of the repository.
We recommend including a changelog for each release, listing notable changes, new features, and any potential breaking changes. This will enhance transparency and help developers understand what has changed between versions.
By adopting Semantic Versioning now, we aim to ensure that the project remains easy to maintain, extend, and collaborate on as it grows.
We encourage contributions from the community and strive to make the process as smooth as possible. To maintain code quality and project integrity, please follow the guidelines below when submitting a pull request.
Fork the Repository: Start by forking the main repository to your GitHub account.
git clone https://github.com/your-username/The-Watchlist.git
cd The-Watchlist
Create a Feature Branch: Use a descriptive name for your branch.
git checkout -b feat/your-feature-name
Commit Changes: Make sure to write clear and concise commit messages.
git commit -m "Add feature X that does Y"
Push to Your Fork:
git push origin feat/your-feature-name
your-username:feat/your-feature-name
against Monash-FIT3170:main
).We urge you to use the Gitflow workflow:
develop
.Please ensure your feature branches are up-to-date with the develop
branch before submitting a pull request.
The project's file structure is organized as follows:
.github/ # CI/CD workflows and GitHub-specific configurations
.meteor/ # Meteor configuration files
client/ # Client-side code, including React components and main entry files
data-ingestion/ # Scripts for ingesting and processing data
imports/ # Shared code between client and server, including API methods, database models, and UI components
public/ # Public assets like images and JSON files accessible to the client
server/ # Server-side code, including main server entry point and Meteor methods
tests/ # Test cases and configurations
.gitignore # Specifies files and directories to be ignored by Git
README.md # Project documentation
package.json # Node.js dependencies and project metadata