Skip to content

About

πŸ€–πŸ’¬πŸ—£οΈ π‚π‘πšπ­ 𝐏π₯𝐚𝐭𝐟𝐫𝐨𝐦 π‚πšπ§ 𝐝𝐞𝐩π₯π¨π²πšπ›π₯𝐞 𝐨𝐧 𝐕𝐏𝐒 𝐨𝐫 π‘πšπ’π₯𝐰𝐚𝐲𝐬 𝐟𝐫𝐞𝐞 𝐭𝐒𝐞𝐫

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AyhanX-Chat

Real-Time Chat & WebRTC Calling β€” Deploy Anywhere

A high-performance, Flask-powered communication platform featuring instant messaging, media sharing, and peer-to-peer (P2P) WebRTC calling.

Designed for speed. Built for connectivity. Ready for the cloud.


✨ Key Features

Feature Description
⚑ Real-Time Messaging Instant delivery with an optimized message queue
πŸŽ₯ WebRTC Calling Seamless P2P audio and video communication
πŸ“Έ Media Sharing Built-in support for image uploads and file storage
πŸ‘₯ Presence Tracking Real-time monitoring of active users with auto-expiry
🧹 Auto-Cleanup Automatic message rotation to ensure system performance
☁️ Cloud Ready Fully Dockerized and optimized for platforms like Railway

πŸ› οΈ Technical Stack

Layer Technology
Backend Python 3.11 Β· Flask Β· Gunicorn
Frontend HTML5 Β· CSS3 Β· JavaScript (WebRTC API)
Concurrency Threading (auto-cleanup & background tasks)
Deployment Docker Β· Railway

πŸ“ Project Structure

AyhanX-Chat/
β”œβ”€β”€ app.py                  # Main Flask application logic
β”œβ”€β”€ Dockerfile              # Container configuration
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ Procfile                # Deployment instructions for Railway
β”œβ”€β”€ static/
β”‚   └── uploads/            # User-uploaded media
└── templates/
    └── index.html          # Main chat application UI

πŸš€ Getting Started

Prerequisites

  • Python 3.11+
  • Docker (if deploying via container)

πŸ–₯️ Local Setup

# 1. Clone the repository
git clone https://github.com/AyhanMansur/AyhanX-Chat.git
cd AyhanX-Chat

# 2. Install dependencies
pip install -r requirements.txt

# 3. Run the application
python app.py

# 4. Open in your browser
# https://127.0.0.1:5000

⚠️ Note: You must accept the SSL security warning β€” the app uses a local self-signed certificate for development.


🐳 Docker Deployment

# Build the image
docker build -t ayhanx-chat .

# Run the container
docker run -p 5000:5000 ayhanx-chat

βš™οΈ Configuration

Setting Value
Port Hardcoded to 5000
Storage Uploaded files β†’ static/uploads/
Signaling In-memory message_queue β€” offers, answers, and ICE candidates are stored temporarily and cleared upon retrieval for low-latency P2P handshakes

πŸ“ Important Notes

πŸ”’ Security The app uses ssl_context='adhoc' for local development. When deploying to production (e.g., Railway), the platform provides valid SSL/HTTPS β€” mandatory for accessing camera/microphone hardware.

🌐 WebRTC Connectivity If testing across different networks (mobile data vs. Wi-Fi), add STUN servers to your RTCPeerConnection config:

const rtcConfig = {
  iceServers: [{ urls: 'stun:stun1.l.google.com:19302' }]
};

πŸ’Ύ Data Persistence Messages and users are stored in memory. Server restarts or container redeployments will clear chat history and the online user list.


🌐 Deploy to Railway

πŸ‘¨β€πŸ’» Developed By

Ayhan Mansur

GitHub

⭐ If you find this project useful, give it a star! ⭐

About

πŸ€–πŸ’¬πŸ—£οΈ π‚π‘πšπ­ 𝐏π₯𝐚𝐭𝐟𝐫𝐨𝐦 π‚πšπ§ 𝐝𝐞𝐩π₯π¨π²πšπ›π₯𝐞 𝐨𝐧 𝐕𝐏𝐒 𝐨𝐫 π‘πšπ’π₯𝐰𝐚𝐲𝐬 𝐟𝐫𝐞𝐞 𝐭𝐒𝐞𝐫

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages