Real-time collaborative pixel art editor built with Next.js, Socket.IO, TypeScript, and MongoDB.
This project is split into two parts:
client/: Next.js frontend application (deployed on Vercel)server/: Node.js + Socket.IO backend with MongoDB (deployed on Render.com)
- 🎨 Real-time collaborative pixel drawing
- 🖌️ Multiple drawing tools (pen, eraser, hand)
- 🎨 Color picker with custom colors
- 🗺️ Large navigable canvas
- 👥 Multi-user collaboration
- 🏠 Room-based collaboration system
- 📱 Responsive design with loading screen
- ⚡ TypeScript support
- 🗄️ MongoDB persistence (no data loss on server restart)
- 🚀 Optimized for production
- Start the server:
cd server
npm install
cp env.example .env
npm run dev- Start the client:
cd client
npm install
cp env.local.example .env.local
npm run dev- Open http://localhost:3000 in your browser.
-
Create a new Web Service on Render.com
-
Connect your GitHub repository
-
Set build command:
cd server && npm install && npm run build -
Set start command:
cd server && npm start -
Add environment variables:
NODE_ENV=productionCLIENT_URL=https://your-vercel-app.vercel.appCORS_ORIGIN=https://your-vercel-app.vercel.appMONGODB_URI=your-mongodb-uri
-
Create a MongoDB instance on Render.com or use MongoDB Atlas and connect it to your server
- Push your code to GitHub
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard:
NEXT_PUBLIC_SERVER_URL: Your Render.com server URLNEXT_PUBLIC_APP_NAME: My Pixel World
- Next.js 14 (App Router)
- TypeScript
- Socket.IO Client
- HTML5 Canvas
- Material Design Icons
- Tailwind CSS
- Node.js
- TypeScript
- Socket.IO
- Express.js
- MongoDB
- Mongoose
- CORS
PORT=3001
NODE_ENV=development
CORS_ORIGIN=*
CLIENT_URL=http://localhost:3000
MONGODB_URI=mongodb://localhost:27017/pixel-world
NEXT_PUBLIC_SERVER_URL=http://localhost:3001
NEXT_PUBLIC_APP_NAME=My Pixel World
- Fork the repository
- Create a feature branch
- Make your changes
- Test locally
- Submit a pull request
MIT License