Skip to content

samaed-samee/Pixel-Pop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🎨 Pixel Pop | AI-Powered Collaborative Pixel Art Studio

Pixel Pop Banner

License WebRTC E2EE Gemini AI Voice Chat

A modern, feature-rich pixel art editor with AI enhancement and real-time P2P collaboration

Live DemoFeaturesUsageSecurity


✨ Features

🖌️ Drawing Tools

  • Pencil - Precision pixel drawing with adjustable brush size (1-5px)
  • Eraser - Clean up mistakes with variable size
  • Bucket Fill - Flood fill algorithm for quick coloring
  • Color Picker - Sample colors directly from canvas

🤖 AI-Powered Features (Gemini 2.5 Flash)

  • AI Enhance - Transform your pixel art with AI image generation
  • AI Critic - Get fun, encouraging feedback on your artwork
  • AI Palette Generator - Generate color palettes from themes (e.g., "Sunset", "Cyberpunk")

👥 Real-Time Collaboration

  • Peer-to-Peer Connection - Direct WebRTC connection, no server required
  • End-to-End Encryption - AES-256-GCM encryption on all data
  • Live Sync - See collaborator's strokes in real-time
  • Late-Joiner Support - New peers receive full canvas state
  • 🎤 Voice Chat - E2EE audio with echo/noise cancellation

🎨 Canvas Features

  • 32x32 Pixel Grid - Classic pixel art resolution
  • Grid Toggle - Show/hide grid lines
  • Undo Support - Up to 50 history states
  • Export Options - Download at 32x32 or upscaled to 512x512

🚀 Quick Start

Prerequisites

  • Modern web browser (Chrome, Firefox, Edge, Safari 15+)
  • Python 3.x (for local server) or any HTTP server

Installation

# Clone the repository
git clone https://github.com/samaed-samee/pixel-pop.git

# Navigate to project directory
cd pixel-pop

# Start local server
python -m http.server 8000

# Open in browser
# http://localhost:8000

For Cross-Network Collaboration

# Install cloudflared (optional, for tunneling)
# https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/

# Create tunnel
cloudflared tunnel --url http://localhost:8000

🎮 Usage

Drawing

  1. Select a tool from the left toolbar
  2. Pick a color from the palette or use the color picker
  3. Adjust brush size (1-5 pixels)
  4. Draw on the canvas!

AI Features

Feature How to Use
Generate Palette Enter a theme → Click arrow button
AI Enhance Click "Enhance 🎨" → Enter prompt (optional) → Generate
AI Critic Click "Critic" → Get feedback on your art

Collaboration

  1. Click ✨ Create Room in the Collaborate panel
  2. Copy the room code and share with your collaborator
  3. Collaborator clicks 🔑 Join Room and pastes the code
  4. Collaborator copies their response code and sends it back
  5. Paste response and click 🔗 Connect
  6. Start drawing together!

🔐 Security

End-to-End Encryption Architecture

┌─────────────┐                              ┌─────────────┐
│   Peer A    │                              │   Peer B    │
├─────────────┤                              ├─────────────┤
│ Room Code   │──────────────────────────────│ Room Code   │
│     ↓       │                              │     ↓       │
│  PBKDF2     │                              │  PBKDF2     │
│ (100k iter) │                              │ (100k iter) │
│     ↓       │                              │     ↓       │
│ AES-256 Key │                              │ AES-256 Key │
│     ↓       │                              │     ↓       │
│ Encrypt     │─── WebRTC DataChannel ───────│ Decrypt     │
│ (AES-GCM)   │      (Encrypted Data)        │ (AES-GCM)   │
└─────────────┘                              └─────────────┘
Layer Protection
Transport WebRTC DTLS (automatic)
Application AES-256-GCM encryption
Key Derivation PBKDF2 (100,000 iterations)
Authentication GCM auth tag (tamper-proof)

🔒 Zero-Knowledge: No server ever sees your drawing data. Only peers with the room code can decrypt content.


🛠️ Tech Stack

Technology Purpose
HTML5 Canvas Pixel rendering engine
Vanilla JavaScript Core application logic
TailwindCSS Styling (via CDN)
WebRTC Peer-to-peer connections
Web Crypto API E2EE implementation
Gemini AI Image enhancement & generation
Lucide Icons UI iconography

📁 Project Structure

pixel-pop/
├── index.html      # Complete single-file application
└── README.md       # This file

💡 The entire app is contained in a single HTML file for easy deployment and portability.


🌐 Browser Support

Browser Version Status
Chrome 80+ ✅ Full Support
Firefox 75+ ✅ Full Support
Edge 80+ ✅ Full Support
Safari 15+ ✅ Full Support
Safari iOS 15+ ✅ Touch Support

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


👤 Author

samaed-samee


Made with ❤️ and pixels

⭐ Star this repo if you find it useful!

About

Pixel Pop - A modern 32x32 pixel art studio featuring Gemini AI for art enhancement & palette generation, plus real-time collaborative drawing via WebRTC with AES-256-GCM end-to-end encryption. Zero server dependency.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages