Skip to content

Codeptor/BaatCheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Baat-Cheet

A real-time video chat application built with Django and React, featuring secure WebRTC communication.

Features

  • ๐ŸŽฅ Real-time video and audio communication
  • ๐Ÿ’ฌ Text chat functionality
  • ๐Ÿ”’ Secure peer-to-peer connections using WebRTC
  • ๐ŸŽฏ Room-based communication system
  • ๐ŸŽฎ Media controls (mute/unmute, video on/off)
  • ๐Ÿ“ฑ Responsive design
  • ๐Ÿ’ป Cross-platform support (Windows, Linux, macOS)

Tech Stack

Backend

  • Django
  • Django Channels
  • Redis (for WebSocket support)
  • ASGI server (Daphne)

Frontend

  • React
  • Material-UI
  • WebRTC API
  • WebSocket API

Prerequisites

  • Python 3.10 or higher
  • Node.js 16 or higher
  • Redis server
  • Git

Installing Redis

Windows

  1. Download and install Windows Subsystem for Linux (WSL)
  2. Install Redis in WSL:
wsl
sudo apt-get update
sudo apt-get install redis-server

Linux

sudo apt-get update
sudo apt-get install redis-server

macOS

brew install redis

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/baat-cheet.git
cd baat-cheet
  1. Set up the backend:

Windows

# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate

# Install Python dependencies
pip install -r requirements.txt

# Run migrations
python manage.py migrate

Linux/macOS

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate

# Install Python dependencies
pip install -r requirements.txt

# Run migrations
python manage.py migrate
  1. Set up the frontend:
cd frontend
npm install

Running the Application

Windows

  1. Start Redis server (in WSL):
wsl
sudo service redis-server start
  1. Start the application:
# From the project root
start.bat

Linux/macOS

  1. Start Redis server:
sudo systemctl start redis-server  # Linux
brew services start redis          # macOS
  1. Start the application:
# From the project root
./start.sh

The application will be available at:

Project Structure

baat_cheet/
โ”œโ”€โ”€ frontend/              # React frontend
โ”‚   โ”œโ”€โ”€ public/           # Public assets
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ features/     # Feature-based modules
โ”‚       โ”‚   โ”œโ”€โ”€ chat/     # Chat feature
โ”‚       โ”‚   โ”œโ”€โ”€ home/     # Home/landing page
โ”‚       โ”‚   โ”œโ”€โ”€ media/    # Media components
โ”‚       โ”‚   โ””โ”€โ”€ room/     # Room feature
โ”‚       โ””โ”€โ”€ shared/       # Shared resources
โ”‚           โ”œโ”€โ”€ hooks/    # Custom hooks
โ”‚           โ””โ”€โ”€ utils/    # Utilities
โ”œโ”€โ”€ chat/                 # Django app
โ”‚   โ”œโ”€โ”€ consumers.py      # WebSocket consumers
โ”‚   โ”œโ”€โ”€ routing.py        # WebSocket routing
โ”‚   โ””โ”€โ”€ views.py         # HTTP views
โ”œโ”€โ”€ manage.py            # Django management script
โ”œโ”€โ”€ start.sh            # Startup script for Linux/macOS
โ””โ”€โ”€ start.bat          # Startup script for Windows

Manual Development Setup

Frontend Development

cd frontend
npm start

Backend Development

Windows

venv\Scripts\activate
python manage.py runserver

Linux/macOS

source venv/bin/activate
python manage.py runserver

Troubleshooting

Windows

  1. Redis Connection Issues:

    • Ensure WSL is properly installed
    • Check Redis service in WSL: sudo service redis-server status
    • Try restarting Redis: sudo service redis-server restart
  2. Python venv Issues:

    • Run PowerShell as Administrator
    • Execute: Set-ExecutionPolicy RemoteSigned
    • Try activating venv again

Linux/macOS

  1. Redis Connection Issues:

    • Check Redis status: systemctl status redis (Linux) or brew services list (macOS)
    • Check Redis logs: journalctl -u redis (Linux)
    • Verify Redis port: netstat -an | grep 6379
  2. Permission Issues:

    • Ensure proper file permissions: chmod +x start.sh
    • Check Redis permissions: sudo chown redis:redis /var/lib/redis

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • WebRTC for providing the peer-to-peer communication technology
  • Django Channels for WebSocket support
  • Material-UI for the component library

About

basic implementation of Video and Chat app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published