A modern, real-time disposable chat room built with Flask and Socket.IO featuring a beautiful glassmorphism UI design. Perfect for temporary conversations without any registration or data persistence.
- Real-time messaging - Instant message delivery using WebSocket connections
- Disposable chat rooms - No registration required, messages don't persist after session ends
- Anonymous chatting - Simple username-based entry system, no personal data required
- Session-based - All messages are temporary and disappear when users leave
- Modern UI - Beautiful glassmorphism design with gradient backgrounds
- Responsive design - Works seamlessly on desktop and mobile devices
- Message timestamps - All messages include time stamps
- User notifications - See when users join or leave the chat
- Message distinction - Visual difference between your messages and others
- Full-screen experience - Immersive chat interface
- Privacy-focused - No message history stored, completely ephemeral
- Python 3.12 or higher
- pip (Python package installer)
-
Clone the repository
git clone https://github.com/jahnavigbedre/minimal-chat.git cd Chat-app -
Install dependencies
pip install -r requirements.txt
-
Run the application
python app.py
-
Open your browser Navigate to
http://localhost:5000
The application requires the following Python packages:
Flask==2.3.3
Flask-SocketIO==5.3.6
python-socketio==5.8.0
python-engineio==4.7.1
Chat-app/
βββ app.py # Main Flask application
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
βββ templates/
β βββ index.html # Main HTML template
βββ static/
βββ style.css # CSS styles and animations
βββ chat.js # Client-side JavaScript
- Flask: Web framework for serving the application
- Flask-SocketIO: Enables real-time bidirectional communication
- Event handling: Manages user connections, messages, and notifications
- HTML5: Semantic markup structure
- CSS3: Modern styling with glassmorphism effects
- JavaScript: Client-side Socket.IO integration and DOM manipulation
- Responsive design: Adapts to different screen sizes
The application uses WebSocket protocol through Socket.IO for:
- Instant message delivery
- User join/leave notifications
- Connection status management
- Semi-transparent backgrounds
- Backdrop blur effects
- Gradient overlays
- Modern button designs
- Hover animations
- Smooth transitions
- Message animations
- Responsive feedback
- Primary gradient: Purple to blue (
#667eeato#764ba2) - Accent color: Green for buttons (
#4caf50) - Text: White with various opacity levels
You can customize the application by modifying app.py:
app.config['SECRET_KEY'] = 'your-secret-key-here'
socketio.run(app, debug=True, allow_unsafe_werkzeug=True, host='0.0.0.0', port=5000)- Port: Change the port in
socketio.run() - Host: Modify host parameter for network access
- Debug mode: Set
debug=Falsefor production - CORS: Adjust
cors_allowed_originsin SocketIO initialization
python app.pyFor production, consider using:
- Gunicorn with eventlet worker
- Nginx as reverse proxy
- SSL/TLS certificates for HTTPS
Example Gunicorn command:
gunicorn --worker-class eventlet -w 1 --bind 0.0.0.0:5000 app:app-
Enter the chat
- Open the application in your browser
- Enter your desired username
- Click "Join Chat"
-
Send messages
- Type your message in the input field
- Press Enter or click "Send"
- Messages appear instantly for all users
-
Leave the chat
- Click the "Leave" button
- You'll return to the username entry screen
- Input sanitization: Messages are escaped to prevent XSS attacks
- Rate limiting: Consider implementing message rate limits
- Authentication: Current implementation uses simple usernames
- HTTPS: Use SSL/TLS in production environments
Server won't start:
RuntimeError: The Werkzeug web server is not designed to run in production
Solution: The code includes allow_unsafe_werkzeug=True parameter
Messages not appearing:
- Check browser console for JavaScript errors
- Ensure Socket.IO CDN is accessible
- Verify Flask-SocketIO is installed correctly
Styling issues:
- Clear browser cache
- Check CSS file is loading correctly
- Verify static files are served properly
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Jahnavi G Bedre
- GitHub: @jahnavigbedre
- Flask and Socket.IO communities for excellent documentation
- Modern CSS techniques and glassmorphism design inspiration
- Socket.IO for real-time communication capabilities
- User authentication with login/register
- Private messaging between users
- File sharing capabilities
- Emoji support
- Message history persistence
- Multiple chat rooms
- User avatars
- Typing indicators
- Message reactions
- Dark/light theme toggle
Want to see it in action? Here's how to get started:
- Clone the repo
- Install dependencies
- Run
python app.py - Open
http://localhost:5000 - Start chatting! π
Made with using Flask and Socket.IO