All Projects → mah51 → ScuffedMDB

mah51 / ScuffedMDB

Licence: MIT license
An open-source website to rate movies watched with friends, made with next.js & chakra-ui. Hosted on vercel.com.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to ScuffedMDB

Moviecontentfilter
Watch movies with the freedom (not) to filter
Stars: ✭ 126 (+26%)
Mutual labels:  movie, rating
Movie
Personalized real-time movie recommendation system
Stars: ✭ 37 (-63%)
Mutual labels:  movie, rating
Flaskmovie
【正在改版开发中,请勿使用!】Flask电影网站前台+后台管理。
Stars: ✭ 221 (+121%)
Mutual labels:  movie
esp32 ST7735 Movie
Movie Player on esp32 and ST7735
Stars: ✭ 38 (-62%)
Mutual labels:  movie
rater-js
Star rating widget for the browser. Unlimited number of stars. No dependencies. No Jquery required.
Stars: ✭ 66 (-34%)
Mutual labels:  rating
Qnapi
Qt-based, multi-engine, multi-platform subtitle downloader
Stars: ✭ 226 (+126%)
Mutual labels:  movie
loopple
Drag & drop dashboard builder
Stars: ✭ 180 (+80%)
Mutual labels:  chakra-ui
Moviehunt
Movie Android App written in Kotlin, MVVM, RxJava, Android Architecture Components.
Stars: ✭ 199 (+99%)
Mutual labels:  movie
hyperglass
hyperglass is the network looking glass that tries to make the internet better.
Stars: ✭ 478 (+378%)
Mutual labels:  chakra-ui
recipes-next-hasura
A lightweight app to explore and create recipes - Built with Next.js, Hasura, and Chakra-UI
Stars: ✭ 30 (-70%)
Mutual labels:  chakra-ui
openskill.py
Multiplayer rating system. Better than Elo.
Stars: ✭ 175 (+75%)
Mutual labels:  rating
vnstat-client
GUI Client for vnStat Network Monitor for Linux or GNU/Linux
Stars: ✭ 122 (+22%)
Mutual labels:  chakra-ui
Douban
React-native 仿豆瓣电影 app
Stars: ✭ 236 (+136%)
Mutual labels:  movie
nextarter-chakra
battery packed template / boilerplate to initialize Next.js app with Chakra UI & Typescript setup ✨
Stars: ✭ 616 (+516%)
Mutual labels:  chakra-ui
Ombi
Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
Stars: ✭ 2,711 (+2611%)
Mutual labels:  movie
members
Managing People (Members), CRUD with Dashboard
Stars: ✭ 36 (-64%)
Mutual labels:  chakra-ui
Filmsys
一个使用Vue全家桶和后台Express框架结合Mysql数据库搭建起来的移动端电影售票和管理系统,实现了热映、即将上映、电影和影院全局搜索、评论、选座、购票、点赞、收藏、订单等一系列购票和管理流程功能
Stars: ✭ 217 (+117%)
Mutual labels:  movie
react-blog
Medium wanna be project.
Stars: ✭ 26 (-74%)
Mutual labels:  chakra-ui
Random-Plex-Movie
Python App which chooses a random movie from your Plex Library.
Stars: ✭ 17 (-83%)
Mutual labels:  movie
torrent-indexer
Yet another node.js torrent scraper made especially for movie, series, anime and music (scrape from 1337x, eztv, limetorrents, rarbg, skytorrents, thepiratebay, torrentproject, yts and zooqle)
Stars: ✭ 50 (-50%)
Mutual labels:  movie

ScuffedMDB

Version

Issues contributors Github Stars Checks Passing License

Table of Contents

Click to expand

Introduction

Welcome to ScuffedMDB's™ code repository. This website is designed to be used by friend groups to rate movies watched together :).

To follow any updates there is a Changelog

This repo is licensed under an MIT license, and can therefore be modified and distributed as stated. However, if you do host this yourself, please include some creditation to my github somwhere on the page as a link to this repo / or my homepage. Not only will this help me out, but it allows others to host their own versions if they wish!

Thank you to @olig89 for all of the ideas and user testing!

Environment variables

Required

Name Description Example
NEXT_PUBLIC_APP_URI The URI of the app https://smdb.mikeroph.one
OWNER_ID Owner's discord ID 234908230323
CLIENT_ID Discord Application CLIENT_ID on console 2398040239849
CLIENT_SECRET Discord Application CLIENT_SECRET on console \_adsiojweiurnAWeAFDS23
JWT_H512 Used to sign token -> jose newkey -s 256 -t oct -a HS512 {"kty":"oct","kid":"-token-","alg":"HS512","k":"-token-"}
JWT_CODE Random string used to encode token dsajoi234opiasdijofp
MONGODB_URI Connection string to mongoDB mongodb://localhost:27017/scuffedmdb
MOVIE_API_KEY TMDB v3 Api Key q9uqq9emdasDejwo4

Not required

Name Description Example
ALLOWED_USERS A comma separated list of discord ids representing users that can log into the website. If left blank, all users can login. 234908230323,234908230324
WEBHOOK_URL Endpoint for the discord_bot webhook https://bot.mikeroph.one
WEBHOOK_TOKEN Random string used to authenticate movie websites request, required if using the webhook dsajoi234opiasdijofp
COLOR_THEME Color theme for the website, options: chakra docs purple
SECONDARY_COLOR_THEME Secondary accent color of the website, same options as COLOR_THEME cyan
NEXT_PUBLIC_SITE_NAME Name of the website, default is ScuffedMDB ScuffedMDB
NEXT_PUBLIC_SHORT_SITE_NAME Short name of the website, default is SMDB SMDB

How to host this yourself:

Setting up the local environment

Click to expand It is beneficial to set up a local environment to make quick changes without having to wait for the website to rebuild on vercel.
  1. Fork this repository at the top right of this page.

  2. Clone to your computer

git clone https://github.com/<YOUR GITHUB USERNAME>/scuffedmdb

cd scuffedmdb

  1. Rename .env.example, to .env.local and enter the local address: http://localhost:3000 n.b Do not include a / at the end of your domain

.env.local NEXT_PUBLIC_APP_URI=http://localhost:3000

  1. Create an account on discord.com and go to the developer console.
  2. Create a new application and copy and past Client ID and client secret into the respective fields in .env.local
CLIENT_SECRET=_H8z9NKhasaido_diddada4SgqjQj
CLIENT_ID=24534589043255834

(these aren't mine before you try -_-)

  1. Go to the oauth tab of your new discord application and add your production and development callback urls to the redirect tab. For example mine are: http://localhost:3000/api/auth/callback/discord and https://smdb.mikeroph.one/api/auth/callback/discord - /api/auth/callback/discord
  2. Return to your .env.local file and enter a random string into JWT_CODE which is kept secret (just to encrypt the user data in the cookie).

JWT_CODE=SlOQwlMMnwVY3ypfNLFOtlEauH5Ra2DE

and again

  1. I recommend using cloud atlas to host your mongo database, but just create an account and a m.0 db, (Vercel does not allow you to set location on the free plan, and its normally in NA, I recommend setting the mongo server to NA as well, it is slightly snappier). Also ensure the the ip address in network access is set to 0.0.0.0, as this will allow any server to connect (also why you need to create a user with a strong password), this is because we dont know the IP of the vercel instance that our server will be booted up on. Next copy the connection uri and paste into the .env.local file and append the database name.

MONGODB_URI=<connection string>/local-movie-database

  1. Go to https://tmdb.org and create an account, then go to the api settings under your profile and copy the v3 key and paste it into your .env.local file under MOVIE_API_KEY

MOVIE_API_KEY=<TMDB API KEY>

  1. Run npm run dev in your terminal in the project directory.

  2. Stonks! ... if you are having trouble feel free to submit an issue

Setting up the production environment

Click to expand

Make sure you have a fork of the repository by clicking the fork button top right

  1. Login to https://vercel.com/ with your github.

  2. Go to the homepage and create new project, select 'ScuffedMDB' and click import.

  3. All the default settings are as should be, just click deploy. (Be warned it wont work just yet, we still need to provide our environment variables!)

  4. Once deployed, click the big 'Go to dashboard' button, follow the tabs at the top to 'settings', then click environment variables on the left hand menu. Here you can add all of the environment variables from your .env.local file, one at a time using the box at the top.

  5. CLIENT_ID, CLIENT_SECRET, OWNER_ID, NEXTAUTH_URL, and MOVIE_API_KEY will be the same as your local environment.

  6. MONGO_URI should use a production database that is not the same as your local environment so set the database to a different name.

MONGODB_URI=<connection string>/production-movie-database

  1. NEXT_PUBLIC_APP_URI needs to be the domain of your project on vercel. You can set a custom domain as shown in vercels' docs, but you need to click on your project to see the default domain, normally something like https://scuffedmdb.vercel.com (refer to 6 of setting up local environment to add domain to discord callback if you havent already)

NEXT_PUBLIC_APP_URI=https://smdb.mikeroph.one

  1. Create a HS512 compliant code using the following command:

npm install -g node-jose-tools

jose newkey -s 256 -t oct -a HS512

Copy the whole output and paste into the .env.local file under 'JWT_HS512'.

  1. Finally generate a random string for the JWT_CODE env variable for production and enter into the Vercel settings panel.

  2. Go back to the overview tab and click redeploy.

  3. Thats it! your very own live movie rating website. The world is yours ... and everytime you push a change to your repo, it automatically redeploys (<3 vercel).

Using the discord bot with the website:

Visit the repo - ScuffedMDB-Bot containing the bots code and use the readme to integrate with the website. (Make sure the website is setup and working before trying this out).

N.B The bot does not run on vercel, you have to find your own host, self-hosting is a good option if you have a computer running 24/7, if not I would recommend a cheap VPS.

TODO:

  • Fix bunch of errors to do with incorrect hook usage & react-table. ;(
  • Add pagination to the API & FrontEnd cards
  • Add tests if you wanna learn how to do em.

Contributors

Thanks goes to these wonderful people (emoji key):


Michael Hall

💻 🖋 📖 🎨 🚧 👀

Oli Gill

🐛 🤔 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].