Devflix is a movie database website with a machine learning-powered recommendation system that provides relavant movie suggestions.
- Frontend: Next.js, TailwindCSS, shadcn/ui
- Backend: Django, Django REST framework
- Databases: PostgreSQL
- ORM: Prisma
- Auth: NextAuth
- Machine learning: scikit-learn
- Deployment: AWS EC2, GitHub Actions, Vercel
- UI Light/Dark modes
- SEO optimization with Next.js Server-side Rendering
- Movies recommendation model built with scikit-learn
- Python
- Node.js
- Docker (includes Docker Compose)
- APIs:
- Google OAuth 2.0 credentials (Client ID and Client Secret)
- TMDB API (API Key)
Clone the DevFlix repository to your local machine: bash Copy code
git clone https://github.com/devltt404/devflix
cd devflix-
Navigate to server folder
cd server
Note
Optional: It's a good practice to create a virtual environment to manage dependencies for your project:
python -m venv venv
source venv/bin/activate-
Install Required Python Libraries
pip install -r requirements.txt
-
Setup env variables
Copy the
.env.exampleto.envand update the variables.cp .env.example .env
We use Docker Compose to set up and run PostgreSQL locally.
-
Start services
docker-compose -f docker-compose.local.yml up -d
-
Verify running Containers
docker ps
You should see the following services listed:
- postgres on port
5433
- postgres on port
python manage.py makemigrations
python manage.py migratepython manage.py build-modelNote: This step might take a few minutes. Please wait until it completes.
-
Navigate to the
clientfolder:cd ../client -
Install Dependencies
npm i
-
Setup env variables
Copy the
.env.exampleto.env.cp .env.example .env
Important
You must provide values for TMDB_API_KEY, GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
-
Run Prisma migrations to set up your database schema:
npx prisma migrate dev
-
Generate Prisma Client
npx prisma generate
-
Seed sample movie data to the database
npm run seed
npm run web-devAccess the website through your browser at: http://localhost:5173
