A modern, feature-rich recreation of Reddit's r/Place, enabling real-time collaborative pixel art creation on a shared canvas. Built with Flask, SocketIO, and modern web technologies.
- Multiple users can place pixels simultaneously
- Instant updates via WebSocket connections
- Live activity feed showing recent placements
- Interactive 500Γ500 pixel canvas with smooth zoom and pan
- 32-color palette with carefully selected colors
- Responsive touch and mouse controls
- Smart viewport optimization
- Intelligent caching system (Redis/in-memory)
- Configurable rate limiting and cooldowns
- Session-based user management
- Optimized real-time synchronization
- Multi-theme support (Light/Dark/Auto)
- Mobile-responsive design
- Intuitive controls and visual feedback
- Real-time statistics and user insights
- Modular architecture with service layers
- Comprehensive API endpoints
- Extensive configuration options
- Built-in development tools
- Backend: Flask 2.0+, Flask-SocketIO, Redis (optional)
- Frontend: HTML5 Canvas, TailwindCSS 3.0, Vanilla JavaScript
- Real-time: WebSocket via Socket.IO
- Caching: Redis or in-memory fallback
- Architecture: Service-oriented with factory pattern
- Python 3.8 or higher
- pip (Python package manager)
- Git
# Clone the repository
git clone https://github.com/your-username/Mural.git
cd Mural
# Create and activate virtual environment
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the application
python app.pyOpen your browser and navigate to http://localhost:5000
| Document | Description |
|---|---|
| Architecture Guide | Detailed system architecture and design patterns |
| Setup Guide | Comprehensive installation and configuration |
| API Reference | Complete API documentation and examples |
| Development Guide | Contributing guidelines and development workflow |
| Configuration | Environment variables and customization options |
| Troubleshooting | Common issues and solutions |
- Select a Color: Choose from the 32-color palette
- Place Pixels: Click anywhere on the canvas to place a pixel
- Navigate:
- Pan: Drag with mouse or touch
- Zoom: Mouse wheel, pinch gesture, or zoom controls
- Alternative: Ctrl+drag or middle mouse for panning
- Monitor Activity: Watch the live activity feed for real-time updates
- β±Cooldown: Wait for your cooldown timer before placing the next pixel
# Set custom cooldown (in seconds)
export PIXEL_COOLDOWN=120 # 2 minutes
# Enable Redis caching
export REDIS_URL=redis://localhost:6379
# Set production environment
export FLASK_ENV=production
# Custom host and port
export HOST=0.0.0.0
export PORT=8080Mural/
βββ app.py # Application entry point
βββ app_factory.py # Flask app factory
βββ config.py # Configuration management
βββ cache_service.py # Caching abstraction layer
βββ models.py # Data models
βββ services/ # Business logic services
β βββ canvas_service.py # Canvas operations
β βββ user_service.py # User management
βββ routes/ # API route handlers
β βββ api.py # API endpoints
βββ templates/ # HTML templates
β βββ index.html # Main application template
βββ static/ # Static assets
β βββ css/style.css # Custom styles
β βββ js/mural.js # Frontend application logic
βββ docs/ # Documentation
βββ requirements.txt # Python dependencies
βββ README.md # This file
We welcome contributions! Please see our Development Guide for detailed information.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and test thoroughly
- 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.
For production deployment instructions, see our Setup Guide.
# Install production dependencies
pip install gunicorn redis
# Run with Gunicorn
gunicorn --worker-class eventlet -w 1 --bind 0.0.0.0:5000 app:app- Concurrent Users: Supports 100+ simultaneous users
- Canvas Updates: Sub-100ms real-time synchronization
- Memory Usage: ~50MB base, scales with canvas activity
- Caching: Redis or in-memory with intelligent invalidation
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Documentation: docs/ directory
- Inspired by Reddit's r/Place
- Built with the Flask and Socket.IO communities
- TailwindCSS for beautiful, responsive UI