Skip to content

KopyTKG/MovieDB

Repository files navigation

MovieDB

MovieDB is a NextJS project to share my plex movie library. It is also use as learning ground for NextJS, caching and MongoDB. MovieDB UI is build in NextUI + FramerMotion and Tailwind.

GitHub License

GitHub package.json version (branch)

Website

Security

See SECURITY.md for information on supported versions.

Deployment

For public use is recomended to use Vercel

for home use it is needed to fill .env file

.env settings

NEXT_PUBLIC_BASE_URL=http://localhost:3000 # change to public URL if uploaded to Vercel
REDIS_URL=redis://user:password@url:port
POSTGRES_URL=postgres://user:password@url:port/db

# Auth settings
SECRET=change-me-please # use 128 char or longer string with upper/lower case letters and numbers  -> Used for core API auth to prevent bots spamming
AUTH_URL=http://localhost:3000 # change for production URL
AUTH_SECRET=change-me-please # for production use `openssl rand -base64 32`

# Providers
GITHUB_ID=gh_id # OAuth id for github
GITHUB_SECRET=gh_secret # OAuth secret for github

It is recomended to use Railway as a DB/Redis provider for easy setup and management.

Self-hosted Installation

  1. clone this repo
  2. navigate into root folder of the repo
  3. fill all required variables in .env
  4. run all commands listed below
npm install
npx prisma db push
npx prisma generate
npm build && npm start