A React-based movie discovery and video streaming web application built with Vite. Search for movies using the OMDb API and maintain your personal video collection with cloud and local video support.
Visit: https://pranayy1.github.io/Flix/
Repository: https://github.com/Pranayy1/Flix
- Movie Search: Discover movies using the OMDb API
- Movie Details: View comprehensive information including ratings, cast, plot, and more
- Video Collection: Maintain a personal collection of videos
- Cloud Video Support: Stream videos from Google Drive, Dropbox, and direct URLs
- Fullscreen Playback: Enjoy immersive fullscreen video experience
- Responsive Design: Works seamlessly on desktop and mobile devices
- Node.js (v18 or higher)
- npm or yarn
- OMDb API key (get it from omdbapi.com)
- Clone the repository:
git clone https://github.com/Pranayy1/Flix.git
cd Flix- Install dependencies:
npm install- Create a
.envfile in the root directory:
VITE_OMDB_API_KEY=your_omdb_api_key_here
- Start the development server:
npm run devThe app will be available at http://localhost:5173
npm run buildThe built files will be in the dist directory.
- Ensure your
package.jsonhas the correcthomepagefield:
"homepage": "https://yourusername.github.io/Flix"- Deploy:
npm run deployThis will build the app and push to the gh-pages branch.
- Click "➕ Add Cloud Video" on your live site
- Enter video title
- Paste Google Drive or direct video link
- Click "Add Video to Collection"
- Video appears instantly (note: won't persist after refresh)
- Upload video to your preferred hosting service
- Get the shareable link
- Edit
src/components/LocalMovies.jsx - Add to the
INITIAL_LOCAL_MOVIESarray:
{
id: 'cloud-1',
title: 'Your Video Title',
url: 'https://drive.google.com/file/d/YOUR_FILE_ID/preview',
type: 'googledrive'
}- Cloudflare R2 - $0.015/GB, excellent for video streaming
- GitHub Releases - Free for public videos
- Vercel Blob - 5GB free, great for web apps
- AWS S3 - Industry standard, reliable
- Google Drive - Free, works with iframe embedding
- Dropbox - Use
?raw=1in share links - OneDrive - Works with iframe embedding
- Best Formats: MP4 (H.264), WebM, MOV
- Avoid: AVI, MKV (limited browser support)
- Optimal Size: Keep under 500MB for smooth streaming
- Check the URL: Paste it directly in a new browser tab
- Check the format: Ensure it's MP4, WebM, or MOV
- Check CORS: Some servers block cross-origin requests
- Try iframe mode: For Google Drive/OneDrive links
- Share → "Anyone with the link"
- Use the format:
https://drive.google.com/file/d/FILE_ID/preview - Videos will open in embedded player
- Use appropriate video quality (720p or 1080p is sufficient)
- Compress videos using tools like HandBrake
- Use CDN-based storage for better performance
Flix/
├── public/ # Static assets
├── src/
│ ├── assets/ # Images and media
│ ├── components/ # React components
│ │ ├── Container.jsx
│ │ ├── LocalMovies.jsx
│ │ └── MovieSearch.jsx
│ ├── App.jsx # Main app component
│ ├── App.css # App styles
│ ├── index.css # Global styles
│ └── main.jsx # Entry point
├── index.html
├── package.json
└── vite.config.js
- React 19 - UI library
- Vite - Build tool and dev server
- OMDb API - Movie database API
- CSS3 - Styling with modern features
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run preview- Preview production buildnpm run deploy- Deploy to GitHub Pages
- API keys are exposed in frontend code (acceptable for OMDb free tier)
- For production applications, consider using a backend proxy
- Never commit
.envfiles containing sensitive data
This project is open source. Feel free to use it for learning or as a template for your own projects.
If you encounter issues:
- Check browser console (F12 → Console) for error messages
- Verify your video URLs are accessible
- Ensure you have a valid OMDb API key
- Check that all dependencies are installed correctly
Happy Streaming! 🎬✨