📺 This repository contains a Twitch clone application built using modern web technologies. The project integrates user authentication using 🔐 JWT (JSON Web Token) and supports real-time streaming using an 📡 RTMP server. Additionally, it includes a 💬 chat feature for streams implemented with ⚡️ Socket.io. The backend server is developed with 🛠️ Node.js, while the frontend is built with the 🌐 React.js framework. This project utilizes the MERN stack (🍃 MongoDB, 🎭 Express.js, ⚛️ React.js, 🛠️ Node.js).
- 🔐 User Authentication with JWT
- 📡 Real-time streaming with RTMP server
- 💬 Integrated chat for streams using Socket.io
- 🖥️ User-friendly interface with React.js
- 🛡️ Secure and scalable backend with Node.js
- 📱 Responsive design for various devices
- 🔄 Change password functionality
- 🎥 Live streaming with stream key and OBS
- 🟢 Channel online status indicator
- Backend: 🛠️ Node.js, 🎭 Express.js (MVC approach)
- Frontend: ⚛️ React.js
- Authentication: 🔐 JSON Web Token (JWT)
- Streaming: 📡 RTMP (Real-Time Messaging Protocol)
- Database: 🍃 MongoDB
- Chat: ⚡️ Socket.io
To get started with this project, follow these steps:
-
📂 Clone the repository:
git clone https://github.com/kaustubhkolhe99/twitch-clone.git cd twitch-clone
-
🔧 Install server dependencies:
cd server npm install
-
🔧 Install client application dependencies:
cd ../client npm install
-
🔐 Set up environment variables:
- Edit a
.env
file in theserver
directory and add the necessary environment variables:API_PORT=5002 MONGO_URI=your_mongodb_connection_string TOKEN_KEY=your_jwt_secret
- Edit a
-
🚀 Start the RTMP server:
cd ../rtmp-server npm start
-
🚀 Run the API server:
cd ../server npm start
-
🚀 Run the client application:
cd ../client npm start
Once the servers are up and running, you can access the application in your browser at http://localhost:3000
.
- ✍️ Sign Up: Create a new account.
- 🔑 Login: Authenticate with your credentials to access the platform.
- 🔒 JWT Tokens: Tokens are used to secure API endpoints and manage user sessions.
- 🔄 Change Password: Users can change their password from their profile settings.
- 📹 Broadcast: Start a live stream using an RTMP-compatible streaming software (e.g., OBS Studio).
- 🔑 Stream Key: Obtain a unique stream key from your profile settings to use with OBS for live streaming.
- 👀 Watch: View live streams from other users.
- 💬Comment/Chat Post comments and chat on the live stream.
- 🟢 Channel Status: See whether a channel is online or offline.
- 💬 Real-time Chat: Engage with viewers through integrated chat functionality powered by Socket.io.
Contributions are welcome! Please follow these steps to contribute:
- 🍴 Fork the repository.
- 🌿 Create a new branch (
git checkout -b feature/your-feature-name
). - 🛠️ Make your changes.
- 💾 Commit your changes (
git commit -m 'Add some feature'
). - 🚀 Push to the branch (
git push origin feature/your-feature-name
). - 📥 Open a pull request.
by default the user channel is disable, put any image link from google and put it in avatar url to enable account to stream
the below string is the stream key