A fun interactive pixel adoption game where users can claim pixels on a grid, personalize them with colors and names, and watch the collaborative art come to life in real-time!
- Interactive Pixel Grid: 20x20 grid of adoptable pixels (400 total)
- Real-time Updates: See other users' adoptions instantly
- Personalization: Choose from 12 beautiful colors and get a random emoji
- Adoption Modal: Sweet "Will you adopt me?" popup for each pixel
- Auto-reset: Grid resets when all pixels are adopted
- Responsive Design: Works great on desktop and mobile
- Persistent Storage: Uses Supabase for real-time persistence
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Backend: Supabase (PostgreSQL + Real-time subscriptions)
- Runtime: Bun
-
Clone the repository
git clone <your-repo-url> cd adopt-a-pixel
-
Install dependencies
bun install
-
Set up Supabase
- Create a new project at supabase.com
- Go to Project Settings > API
- Copy your Project URL and anon public key
-
Configure environment variables
cp .env.local.example .env.local
Edit
.env.local
and add your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=your_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
-
Set up the database
- In your Supabase dashboard, go to SQL Editor
- Copy and paste the contents of
database-schema.sql
- Run the query to create tables and initial data
-
Start the development server
bun run dev
-
Open your browser Navigate to http://localhost:3000
- Find a grey pixel - These are orphaned pixels waiting for adoption
- Click on it - A sweet popup will ask "Will you adopt me?"
- Enter your name - Let the pixel know who their new parent is
- Choose a color - Pick from 12 beautiful colors
- Click "Yes, adopt!" - Watch your pixel light up with joy
- See the magic - Your pixel gets a random emoji and your chosen color
- Watch others - See other adoptions happen in real-time
- Complete the grid - When all 400 pixels are adopted, the grid resets!
The pixels
table stores:
id
: Pixel position (0-399)adopted
: Boolean adoption statuscolor
: Hex color codeadopter
: Name of the person who adopted itemoji
: Random emoji assigned on adoptionadopted_at
: Timestamp of adoption- Auto-updating timestamps
- Live Updates: See adoptions from other users instantly
- Auto-refresh: Grid reloads every 10 seconds to ensure sync
- Collaborative: Multiple people can adopt pixels simultaneously
- Synchronized: Everyone sees the same grid state
- Auto-reset: Coordinated reset when grid is complete
- Push your code to GitHub
- Connect your repo to Vercel
- Add your environment variables in Vercel dashboard
- Deploy!
Works on any platform that supports Next.js:
- Netlify
- Railway
- Heroku
- Self-hosted
Feel free to submit issues and enhancement requests!
MIT License - feel free to use this for your own projects!
Made with 💖 for the Useless Ideas Hackathon