The successor to NyumatFlix V2. Now including collaboration, multiple servers, and an improved design for heavy usage.
Important
Prerequisites:
- Bun installed on your machine.
- Biome binary installed on your machine.
- A PostgreSQL database.
- A TMDb API key.
- A Resend API key.
- A GitHub OAuth App created.
To run the project on your machine, follow the steps below:
- Clone the repository
git clone https://github.com/Nyumat/NyumatFlix.git
cd NyumatFlix- Next, create a
.env.localfile in the root directory of the project and add the following environment variables:
TMDB_API_KEY=
AUTH_SECRET=
AUTH_RESEND_KEY=
AUTH_URL=
PROD_DATABASE_URL=
DATABASE_URL=I purposely left the API key blank so that you can get your own. You can get one by creating an account on TMDb.
- Install dependencies
bun install- Configure magic strings
There's a few places in the codebase where I'm hardcoding some strings that you might want to change. You can find some of them in lib/constants.ts. Additionally, you might want to modify the email templates in emails/ and metadata objects in app/ and layout/.
If you end up not changing the magic strings, that's fine too, but I'd appreciate credit if you use NyumatFlix without modifications. License
- Set up the database
bun run db:generate
bun run db:push
bun run db:studio # optionalThis will generate the necessary migration files and push the schema to your PostgreSQL database. You can also use bun run db:studio to open Drizzle's database studio to visualize the DB internals.
- Run the development server
bun run dev- Finally, open http://localhost:3000 in your browser to see NyumatFlix in action!
| 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. |
db:generate |
Generate a new migration file based on schema changes. |
db:push |
Push the current schema to the database without a migration file. |
db:studio |
Open Drizzle's database studio for managing the database. |
db:migrate |
Apply pending migrations to the database. |
Contributions, feedback, and suggestions are always welcome. If you have any questions, feel free to open an issue. I can't guarantee I'll be able to address everything as a solo dev (on top of juggling other commitments), but I'll do my best!
If you find NyumatFlix useful, consider buying me a coffee or starring the repo. Lastly, since I know there's a ton of people skidding this repo, please at least mention me as the original pioneer. Thanks!
