Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bardiw/real-time-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’¬ Real-time-Chat App (Flask + SocketIO)

A minimal real-time chat application built using Flask, Flask-SocketIO, and HTML/CSS/JS. The app allows users to register, log in, and chat live with others in real time using WebSockets.


βš™οΈ Features

  • πŸ” User registration and login with password hashing
  • πŸ—¨οΈ Real-time message broadcasting (Socket.IO)
  • πŸ“‘ Lightweight Flask backend
  • 🌐 Persian RTL UI
  • πŸšͺ Logout and session management
  • πŸ“± Responsive and simple UI (custom HTML/CSS)

πŸ“ Project Structure

realtime-chat/ β”‚ β”œβ”€β”€ app.py # Main Flask application β”œβ”€β”€ templates/ β”‚ β”œβ”€β”€ index.html # Chat interface β”‚ └── register.html # User registration page β”œβ”€β”€ static/ # (optional) CSS or JS files if separated └── README.md # You're here!


πŸ”§ Installation

  1. πŸ“₯ Clone the repo:
git clone https://github.com/your-username/realtime-chat.git
cd realtime-chat
  1. ▢️ Run the app:
python app.py
  1. πŸ–₯️ Open your browser and go to:
http://127.0.0.1:5000/

πŸ“‹ Requirements

  • Python 3.7+

  • Flask

  • Flask-SocketIO

  • Werkzeug (comes with Flask)

πŸ“Œ requirements.txt:

Flask
Flask-SocketIO

🌐 Pages Overview

/register: Sign up with username and password (hashed with Werkzeug)

/login: Log in securely

/: Main chatroom (if logged in)

/logout: Ends user session


πŸ”’ Notes

  • For simplicity, user data is stored in memory (dictionary) β€” not persistent.

  • Do not use this in production without adding:

  • Database (e.g. SQLite, PostgreSQL)

  • Input validation

  • CSRF protection

  • Session timeout management


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

Bardia Javadi
Computer Engineering student
GitHub: @bardiw

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published