An open API service indexing awesome lists of open source software.

https://github.com/k4u5h4l/movies-n-stuff

A JAM stack PWA, movie streaming website built with React, Next.js and Prisma ORM.
https://github.com/k4u5h4l/movies-n-stuff

jamstack javascript nextjs prisma react ssr

Last synced: 3 months ago
JSON representation

A JAM stack PWA, movie streaming website built with React, Next.js and Prisma ORM.

Awesome Lists containing this project

README

        

Movies N' Stuff


:clapper: A JAM stack, movie streaming website built with React, Next.js and Prisma ORM. :tv:




built with love
js Badge
k4u5h4L GitHub badge
machine Badge
not bug but feature
spaghetti Badge




toxi-meter logo


## Technologies used:

- React as the UI library.

- Next.js for the as the server.

- Prisma as the ORM.

- NextAuth as the authentication backend with passwordless logins and OAuth.

## To run:

- Clone and cd into the repo.

```
git clone https://github.com/k4u5h4L/movies-n-stuff.git && cd movies-n-stuff
```

- Install the dependencies

```
yarn install
```

- Create a new file called `.env` and fill in variables and keys from different providers.

- Run migrations for the DB (if not present).

```
npx prisma migrate dev --preview-feature
npx prisma generate
```

- Create a folder called `thumbnails/` in the `public/` directory. Add the thumbnails you want to display on those movies. Name them serially as `pic-1.jpg`, `pic-2.jpg`, etc. Stick to `.jpg` format.

- Create a folder called `media/` in the root directory. Here, add the videos/movies you want to be streamed to the client. Name them serially as `video-1.mp4`, `video-2.mp4`, etc. Stick to `.mp4` format.

- Now with all the API keys and media loaded, run development server.

```
yarn dev
```

- Now visit the location [localhost:3000](http://localhost:3000) to check out the site!

## Note:

- This project is made as a hobby and is NOT a commercial application.

- It is for learning purposes only.

- Any contribution is welcome. You may fork the repo and issue a PR.

- It's not good practice to include the thumbnails in your `public/` dir. Instead, you should consider external data buckets like cloundinary, etc. to store images, pics, videos and stuff. This project is just for learning purposes, as mentioned, so this approach doesn't really scale when you have lots of images.