A real-time movie watching platform where friends can watch movies together, synchronized across multiple devices with video chat and live chat features.
- 🔐 Authentication: Google OAuth and demo login
- 🏠 Room Management: Create and join movie rooms
- 🎥 Synchronized Playback: Watch movies in perfect sync
- 💬 Live Chat: Real-time messaging during movies
- 📹 Video Chat: WebRTC-powered video calling
- 📱 Responsive Design: Works on desktop and mobile
- ☁️ Cloud Storage: MongoDB Atlas for data persistence
- Node.js 18+
- npm or yarn
- MongoDB Atlas account
- Google OAuth credentials (optional)
-
Clone the repository
git clone <repository-url> cd MV-LIVE
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Update the
.envfile with your credentials:MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/MV-LIVE GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key
-
Start the development servers
npm run dev:all
-
Open your browser
- Next.js app: http://localhost:3000
- Socket.IO server: http://localhost:3001
npm run dev- Start Next.js development servernpm run socket- Start Socket.IO servernpm run dev:all- Start both servers concurrentlynpm run build- Build for productionnpm run start:all- Start production serversnpm run setup- Run setup script
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── auth/ # Authentication pages
│ ├── dashboard/ # User dashboard
│ ├── room/ # Movie room pages
│ └── create-room/ # Room creation
├── components/ # React components
│ ├── ui/ # UI components
│ └── ... # Feature components
├── hooks/ # Custom React hooks
├── lib/ # Utilities and services
│ ├── services/ # Business logic
│ └── models/ # Data models
├── server/ # Socket.IO server
└── scripts/ # Setup and utility scripts
- Create account at MongoDB Atlas
- Create a new cluster
- Create database user with read/write permissions
- Add IP address to whitelist
- Get connection string and update
MONGODB_URI
- Go to Google Cloud Console
- Create new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
http://localhost:3000/api/auth/google/callback - Update
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET
- Sign in with Google or use demo login
- Click "Create Room" on dashboard
- Configure room settings
- Upload a movie file (MP4, AVI, MKV, etc.)
- Share room code with friends
- Get room code from host
- Enter code on dashboard
- Join the synchronized movie experience
- Video Controls: Play, pause, seek (synchronized)
- Chat: Send messages to all participants
- Video Call: Enable camera and microphone
- Participants: See who's watching
- Secure authentication with Google OAuth
- Session-based user management
- File upload validation and limits
- CORS protection for Socket.IO
- Environment variable protection
- Connect GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push
-
Build the application:
npm run build
-
Start production servers:
npm run start:all
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
This project is licensed under the MIT License.
- Check the Issues page
- Review the setup scripts in
/scripts/ - Ensure all environment variables are set correctly
- Built with Next.js 15 and React 18
- UI components from Radix UI and shadcn/ui
- Real-time features powered by Socket.IO
- Video calling with WebRTC
- Styled with Tailwind CSS