Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR] MVP for NyumatFlix Version 2.0 #19

Merged
merged 23 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
env:
browser: true
es2021: true
node: true
extends:
- "eslint:recommended"
- "plugin:@typescript-eslint/recommended"
- "plugin:react/recommended"
- "plugin:react-hooks/recommended"
- "plugin:jsx-a11y/recommended"
- "next"
- "next/core-web-vitals"
parser: "@typescript-eslint/parser"
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: 12
sourceType: module
plugins:
- react
- "@typescript-eslint"
- "jsx-a11y"
rules:
react/react-in-jsx-scope: "off"
react/prop-types: "off"
"@typescript-eslint/no-unused-vars": ["error"]
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

package-lock.json

# local env files
.env*.local

Expand All @@ -34,4 +36,4 @@ yarn-error.log*

# typescript
*.tsbuildinfo
next-env.d.ts
next-env.d.ts
42 changes: 42 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo '🏗️👷 Styling, testing and building NyumatFlix before committing'

# Check Prettier standards
npm run check-format ||
(
echo '🤢🤮🤢🤮 Its F**KING RAW - Your styling looks disgusting. 🤢🤮🤢🤮
Prettier Check Failed. Run npm run format, add changes and try commit again.';
false;
)

# Check ESLint Standards
npm run lint ||
(
echo '😤🏀👋😤 Get that weak s**t out of here! 😤🏀👋😤
ESLint Check Failed. Make the required changes listed above, add changes and try to commit again.'
false;
)

# Check tsconfig standards
npm run type-check ||
(
echo '🤡😂❌🤡 Failed Type check. 🤡😂❌🤡
Are you seriously trying to write that? Make the changes required above.'
false;
)

# If everything passes... Now we can build
echo '🤔🤔🤔🤔... Alright... Code looks good to me... Trying to build now. 🤔🤔🤔🤔'

npm run build ||
(
echo '❌👷🔨❌ Better call Bob... Because your build failed ❌👷🔨❌
Next build failed: View the errors above to see why.
'
false;
)

# If everything passes... Now we can commit
echo 'Hey NyumatFlix Developer...You win this time... I am committing this now. 🛳'
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.next
next-env.d.ts
node_modules
yarn.lock
package-lock.json
public
lodash.d.ts
9 changes: 0 additions & 9 deletions .prettierrc.json

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-2024 [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
90 changes: 83 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,87 @@
# NyumatFlix
<img src="preview.png" alt="NyumatFlix" width="100%"/>

<div>
<a href="https://nyumatflix.herokuapp.com"><img width=500 height=250 src="https://i.ibb.co/jvhnyKz/nyumatflx2-0.png" alt="nyumatflx2-0" border="0"></a>
</div>
# [NyumatFlix](https://nyumatflix.herokuapp.com)

<h3>Presenting NyumatFlix 2.0. An improved, fully-featured successor to <a href="https://github.com/Nyumat/NyumatFlix">NyumatFlix</a>.</h3>
The successor to NyumatFlix V1, but with an all-new design and tech stack.

<h1></h1>
## 🚀 Features 🚀

<h2>(WIP) Coming Soon</h2>
- 🎞️ **Multi-modal Streaming:** Stream your favorite movies and TV shows right from the app.
- 🎬 **Latest Releases:** Stay up to date with the latest movie and TV show releases.
- 🔍 **Search:** Find your favorite movies and TV shows with our powerful search feature.
- 🎭 **Filter by Genre:** Filter movies and TV shows by genre.
- 🎥 **High Quality Streaming:** Enjoy high-quality streaming for an optimal viewing experience.
- 📱 **Responsive Design:** The app is designed to work well on both desktop and mobile devices.

## ⚡️ Tech Stack ⚡️

- [Next.js](https://nextjs.org/)
- [TypeScript](https://www.typescriptlang.org/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Jest](https://jestjs.io/)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [Husky](https://typicode.github.io/husky/#/)
- [Mantine](https://mantine.dev/)
- [Framer Motion](https://www.framer.com/motion/)
- [Tabler Icons](https://tablericons.com/)

## 🏃🏾‍♂️ Run NyumatFlix Locally 🏃🏾‍♂️

To install the project, follow these steps:

1. Clone the repository

```bash
git clone https://github.com/Nyumat/NyumatFlix.git
```

2. Create a `.env.local` file in the root directory of the project and add the following environment variables:

```bash
# The API key for The Movie Database (TMDb)
API_KEY=
# First is for movies, second one is for TV shows. Both are required.
NYUMATFLIX_VPS=
NYUMATFLIX_VPS2=
```

I purposely left the API key blank so that you can get your own. You can get one by creating an account on [TMDb](https://www.themoviedb.org/). For the other two variables, you can get them by checking out [FMHY](https://fmhy.net/).

3. Install dependencies

```bash
npm install
```

4. Run the development server

```bash
npm run dev
```

5. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## 📝 Scripts 📝

| Script | Description |
| -------------- | -------------------------------------------------------------------- |
| `dev` | Run Next.js development server. |
| `build` | Build the Next.js application. |
| `start` | Start the Next.js production server. |
| `preview` | Start the Next.js server on port 3001 for previewing. |
| `format` | Format code using Prettier for specified file patterns. |
| `check-format` | Check if code is formatted correctly using Prettier. |
| `type-check` | Run TypeScript type-checking using the `tsc` compiler. |
| `lint` | Lint code using ESLint for TypeScript and TypeScript React files. |
| `lint:fix` | Fix linting issues using ESLint for TypeScript and TypeScript React. |
| `test-all` | Run type-checking, linting, and code formatting checks. |
| `prepare` | Install Husky Git hooks. |

## 🤝 Contributing 🤝

Contributions are welcome. I'm currently working on a test suite so that contributions can be made easier without breaking NyumatFlix. If you have any questions, feel free to open an issue.

## 📄 License 📄

[MIT](LICENSE)
Loading