You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight real-time chat platform where users can send direct messages, create and join group conversations, and stay connected with communities — powered by Flask and Flask-SocketIO.
Admin ← platform moderation
User
├── UserPanel (one) ← user's message inbox/panel
│ └── UserChat (many) ← all messages in panel
├── sent_chats ← messages sent by user
└── received_chats ← messages received by user
ChatGroup
└── UserChat (many) ← group messages (cascade delete)
UserChat
├── userID (sender)
├── recieverID (nullable) ← null = group message
├── groupID (nullable) ← null = private/direct message
└── chat (message text)
Post
├── image ← media post (Cloudinary URL)
└── link ← external link post
Chat type logic:
recieverID set, groupID null → Private / Direct Message
groupID set, recieverID null → Group Chat Message
⚠️ The Upgrade and Connection headers are required for WebSocket/SocketIO to work behind Nginx.
🔒 Security
JWT-based authentication
Admin and User roles separated
Group message cascade delete (deletes all messages when group is deleted)
CORS configured via flask-cors
Credentials managed via .env
📊 Key Dependencies
# Web Framework
Flask==3.1.2
flask-cors==6.0.1
Flask-SocketIO==5.3.6
PyJWT==2.10.1
# Database
Flask-SQLAlchemy==3.1.1
Flask-Migrate==4.1.0
psycopg2-binary==2.9.10
alembic==1.16.5
# Real-time
redis==6.4.0
eventlet==0.40.3
# Production
gunicorn==23.0.0
Built with ❤️ in Bhilai, Chhattisgarh
About
A real-time community chat platform where users can create and join group conversations, connect with like-minded communities, and stay engaged through instant messaging — powered by Flask and Flask-SocketIO for seamless, low-latency communication.