A synchronized movie streaming platform that allows multiple viewers to watch movies together in real-time. Perfect for virtual cinema experiences with integrated Twitch streaming support.

This project does not host, store, or provide any movies or copyrighted content. All media is streamed from third-party sources, and I do not own or claim ownership of any content displayed or accessed through this app. Please support creators and rights holders by watching through official and licensed streaming platforms only. I do not recommend using unofficial sources.
- ๐ฅ Synchronized Streaming: Real-time synchronized movie playback for all viewers
- ๐จโ๐ผ Admin Control Panel: Search movies, select sources, and control what's playing
- ๐ Firebase Authentication: Secure admin authentication with Firebase Auth
- ๐บ Twitch Integration: Embedded Twitch stream overlay with chat support
- ๐ฑ Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- ๐จ Modern UI: Built with shadcn/ui and Tailwind CSS
- ๐ Real-time Updates: Firebase Firestore for instant state synchronization
- ๐ฏ Movie Search: Search and browse movies with detailed information
- ๐ฌ Multiple Sources: Select from multiple streaming sources per movie
- Frontend Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- UI Components: shadcn/ui (Radix UI primitives)
- State Management: React Query (TanStack Query)
- Backend: Firebase (Firestore, Authentication)
- Routing: React Router v6
- Video Streaming: Custom iframe-based player
- Live Streaming: Twitch Embed API
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher recommended)
- npm or yarn or bun package manager
- Firebase Account with a project set up
- Twitch Account (optional, for live streaming features)
git clone https://github.com/yourusername/cinema-room.git
cd cinema-roomnpm install
# or
yarn install
# or
bun installCreate a .env file in the root directory based on the .env.example (if available) or create one with the following variables:
# Firebase Configuration
VITE_FIREBASE_API_KEY=your_api_key_here
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
# Admin Configuration
VITE_ADMIN_UID=your_admin_user_uid
# Movie API Configuration
VITE_MOVIE_API_URL=https://your-movie-api.com/api
# Twitch Configuration (Optional)
VITE_TWITCH_CHANNEL=your_twitch_channel-
Create a Firebase Project:
- Go to Firebase Console
- Create a new project or select an existing one
-
Enable Firebase Services:
- Enable Authentication (Email/Password provider)
- Enable Cloud Firestore (create database in production mode)
-
Get Firebase Configuration:
- Navigate to Project Settings โ General
- Scroll to "Your apps" section
- Copy the Firebase configuration object
- Add these values to your
.envfile
-
Set Up Firestore Database:
- Create a collection named
room_state - Create a document with ID
currentin theroom_statecollection - Set the following fields (you can initialize with null values):
{ "movieId": null, "title": null, "poster": null, "sourceUrl": null, "selectedSourceName": null, "selectedSourceTranslate": null, "updatedAt": null }
- Create a collection named
-
Configure Firestore Security Rules:
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { // Allow read access to room state for all users match /room_state/{document} { allow read: if true; allow write: if request.auth != null && request.auth.uid == resource.data.adminUid; } } }
-
Create Admin User:
- Go to Authentication โ Users in Firebase Console
- Add a new user manually or use the signup flow
- Copy the user's UID
- Add the UID to your
.envfile asVITE_ADMIN_UID
The application uses a movie API for searching and fetching movie data. You need to configure your movie API endpoint:
- Set
VITE_MOVIE_API_URLto your movie API base URL - The API should support:
GET /search/{query}- Returns array ofMovieSearchResult- Additional endpoints may be required (check
src/api/movies.tsfor details)
Note: The codebase includes references to external movie APIs. Make sure you have the proper API access or replace with your own movie database service.
npm run dev
# or
yarn dev
# or
bun devThe application will be available at http://localhost:5173
cinema-room/
โโโ public/ # Static assets
โโโ src/
โ โโโ api/ # API integration files
โ โ โโโ movies.ts # Movie API client
โ โโโ components/ # React components
โ โ โโโ ui/ # shadcn/ui components
โ โ โโโ AdminLoginForm.tsx
โ โ โโโ MainVideoPlayer.tsx
โ โ โโโ MovieDetailsCard.tsx
โ โ โโโ MovieSearchForm.tsx
โ โ โโโ MovieSearchResults.tsx
โ โ โโโ NowPlaying.tsx
โ โ โโโ SourceList.tsx
โ โ โโโ TwitchChatEmbed.tsx
โ โ โโโ TwitchPlayer.tsx
โ โโโ hooks/ # Custom React hooks
โ โโโ lib/ # Utility functions
โ โโโ pages/ # Page components
โ โ โโโ AdminPage.tsx # Admin control panel
โ โ โโโ ViewerPage.tsx # Main viewer interface
โ โ โโโ NotFound.tsx
โ โโโ types/ # TypeScript type definitions
โ โโโ App.tsx # Main app component
โ โโโ firebase.ts # Firebase configuration
โ โโโ main.tsx # Application entry point
โ โโโ index.css # Global styles
โโโ .env # Environment variables (create this)
โโโ package.json
โโโ vite.config.ts
โโโ README.md
- Navigate to the root URL (
/) - The page automatically connects to the current room state
- Watch the synchronized movie stream
- Optionally view Twitch stream overlay (on desktop)
- Navigate to
/admin200200 - Log in with your admin Firebase credentials
- Search for movies using the search bar
- Select a movie from search results
- Choose a streaming source from the available sources
- Click on a source to start streaming to all viewers
- Use "Stop streaming" button to clear the current stream
npm run build
# or
yarn build
# or
bun buildThe production build will be generated in the dist/ directory.
npm run preview
# or
yarn preview
# or
bun preview- Push your code to GitHub
- Import your repository in Vercel
- Add your environment variables in Vercel dashboard
- Deploy!
- Push your code to GitHub
- Import your repository in Netlify
- Build command:
npm run build - Publish directory:
dist - Add your environment variables in Netlify dashboard
- Deploy!
- Install Firebase CLI:
npm install -g firebase-tools - Login:
firebase login - Initialize:
firebase init hosting - Build:
npm run build - Deploy:
firebase deploy
Important: Make sure to add all environment variables in your hosting platform's environment variable settings.
- Never commit your
.envfile to version control - Keep your Firebase API keys secure (they're safe to expose in frontend code, but be mindful of Firestore security rules)
- Use proper Firestore security rules to protect your database
- Admin UID should be kept private
- Consider implementing rate limiting for API calls
- Use HTTPS in production
- Verify your Firebase configuration in
.env - Check Firestore security rules
- Ensure Firestore database is created and initialized
- Check browser console for specific error messages
- Verify
VITE_MOVIE_API_URLis set correctly - Check API endpoint responses in browser Network tab
- Ensure CORS is properly configured on your API server
- Verify admin UID matches the Firebase user UID
- Check that Authentication is enabled in Firebase Console
- Ensure Email/Password provider is enabled
- Verify
VITE_TWITCH_CHANNELis set correctly - Check that the domain is whitelisted in Twitch Developer Console
- Ensure parent domain matches your deployment domain
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- shadcn/ui for the beautiful UI components
- Firebase for backend infrastructure
- Vite for the amazing build tool
- React for the UI framework
If you encounter any issues or have questions, please open an issue on GitHub.
Made with โค๏ธ for movie lovers everywhere