Skip to content

kaali001/varta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

70 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—£οΈ Varta

License MIT Socket.io Badge WebRTC Supported Node.js Badge React Badge

Varta is a real-time video chat platform that connects users randomly to have face-to-face conversations through WebRTC. It leverages Socket.io for signaling and enables smooth peer-to-peer video streaming between users. Whether you want to chat with strangers or friends, Varta offers an intuitive and seamless video calling experience.

πŸš€ Features

  • Random Peer Matching: Users are connected randomly to available peers in the lobby.
  • WebRTC-based Video Streaming: Real-time peer-to-peer video calls with minimal latency.
  • Lobby System with Loader Animation: Users wait for matching with a circular spinning loader.
  • Local Video Preview: Self-video preview in a small floating window for monitoring appearance.
  • Automatic Room Creation: Dynamically creates rooms when two users connect.
  • Responsive UI: Clean and modern design built with React and Tailwind CSS.
  • Cross-Browser Support: Works well across major browsers with WebRTC support.

πŸ› οΈ Technologies Used

Frontend Backend Other Dependencies
React Node.js Socket.io
TypeScript Express.js WebRTC API
Tailwind CSS

βš™οΈ Installation Guide

Follow these steps to run the application on your local machine.

Prerequisites

Make sure you have the following installed:

  • Node.js (v18+)
  • npm (or yarn)

1. Step 1: Clone the Repository

   git clone https://github.com/your-username/varta.git 
   cd varta

2. Step 2: Install Dependencies

  • For the backend

 cd server
 npm install
- (option)create a config.env file and add below details, as of now both predefined in `index.js`.
```
PORT
FRONTEND_URL

```
  • For the frontend

 cd ../client
 npm install

3. Step 3: Run the Application

Open two terminal windows: one for the backend and one for the frontend.

  • Backend (Server)

 cd server
 node src/index.js

  • Frontend (Client)

  cd client
  npm start

🌐 Project Structure


  varta/
β”œβ”€β”€ client/                 # Frontend code (React)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ pages/          # React pages (ChatPage, etc.)
β”‚   β”‚   └── components/     # UI components (Room)
β”‚   └── public/             # Public assets
|
β”œβ”€β”€ server/                 # Backend code (Node.js)
β”‚   β”œβ”€β”€ Managers/
β”‚   β”‚   β”œβ”€β”€ RoomManager.js        
β”‚   β”‚   └── UserManager.js       
|   └── index.js            # Server entry point
└── README.md               # Documentation



πŸŽ₯ Demo

πŸ“Έ Screenshots:

image

image

❓ How It Works

  • When a user joins, they enter the lobby and wait for another user to connect.
  • Once two users connect, the server creates a room and initiates the offer-answer exchange using WebRTC.
  • The two peers exchange ICE candidates to establish a connection.
  • Users can see both self-video preview and peer video on the interface.

πŸ§‘β€πŸ’» Contributing

We welcome contributions! Please follow the steps below to contribute:

  • Fork the repository.
  • Clone the repository.
  • Create a feature branch git checkout -b feature-name.
  • Commit your changes git commit -m "Add new feature".
  • Push to your branch git push origin feature-name.
  • Open a Pull Request on GitHub.

About

A online video chat platform which matches two people who are learning same languages.

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors