A fully responsive full stack Netflix clone backed by Python and nailed in frontend by Next.js. I wanted a full control on some critical parts for me, like the user registration and the auth flow, so I didn't want to rely on "pre-made" backends.
Stars⭐ are welcome ;)
Deployed the backend on a private server. The live web demo is here.
If you don't want to create a new account, you can use these credentials to login: email: main@gmail.com, password: 1234
- Backend
- MySQL server
- Django
- DRF Scrud Viewset (created by me, and released open source)
- Frontend
If you prefer to use your own backend, just skip this part
Python version: 3.8
Navigate to the backend directory, and create a virtual env
cd /backend
python -m venv env
Then install requirements
cd /core
pip install -r requirements.txt
Create a local database netflix-clone
You can change this in
core/core/settings.py
, including other database variables or even the engine (postgres
,sqlite
,mysql
etc...)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'netflix-clone',
'HOST': 'localhost',
'USER': 'root',
'PASSWORD': config('DB_PASS')
}
}
Create a .env file in the root project folder (the one containing manage.py
) and set the variable DB_PASS=YOUR_DB_SERVER_USER_PASSWORD
Once your db configuration is done,
// Activate env
// In backend/ folder
// Linux
source env/bin/activate
// Windows
\env\Scripts\activate
Then migrate models
cd /core
python manage.py makemigrations
python manage.py migrate
Finally, launch the server
python manage.py runserver
If you want to play with the API
python manage.py spectacular --file schema.yml
The API playground should be found at localhost:8000/api/v1/schema/ui/
Testing
The backend tests are in backend/core/tests
You can add your own and run
pytest -rP
cd /frontend/netflix
npm i --save
npm run dev
You're done.
Coming soon
Create a more mobile friendly experience (Done)- Implement the like/dislike functionnality
Feel free to clone, fork, star ⭐, report a bug or get in touch.
© Shuruzer.