Overview
Click here to try the live demo.
map-pixel-app is a simple fullstack clone of the popular r/place, scaled to a giant world size. This interactive application allows users to place colored pixels on a massive world map, creating a collaborative digital artwork. Built from scratch using React, Map Pixel aims to offer a seamless and engaging user experience, supporting real-time updates and user interactions.
Screenshots
World map interface.
Pixel placement interface.
Features
- Interactive World Map: Users can zoom in and out, and navigate the world map to place pixels.
- Real-Time Updates: See pixel placements from other users in real-time.
- User Authentication: Secure user login and registration to track individual contributions.
- Statistics Page: View global and personal statistics of pixel placements.
- Bot Protection: Integrated hCaptcha to prevent automated pixel placements.
- Responsive Design: Optimized for both desktop and mobile devices.
Usage
Navigate the map and click to place a pixel. Make sure you are logged in to track your contributions.
- Zoom and Navigate: Use your mouse or touch gestures to zoom in/out and navigate the world map.
- Select a Pixel: Click on a location to place your pixel.
- Authentication: Ensure you are logged in to track and view your contributions.
Development
Installation
Prerequisites
- Node.js
- npm or yarn
- Python
- Flask
- Docker (for backend deployment)
- Gunicorn (for running the Flask application)
- NGINX (for reverse proxy)
Steps
Testing
-
Clone the Repository
1 2
git clone https://github.com/JakeTurner616/map-pixel-app cd map-pixel-app
-
Install Frontend Dependencies
1 2 3
npm install # or yarn install
-
Build and Deploy for Testing
1 2
npm run start # start the development server
-
Install Backend Dependencies
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# Clone backend repo git clone https://github.com/JakeTurner616/map-pixel-backend cd map-pixel-backend/ # Create a virtual environment python -m venv venv # Activate the virtual environment # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate # Install dependencies pip install -r requirements.txt
-
Run the Backend Development Server
1 2
# start the Flask development server python backend.py
Deployment
-
Build and Deploy the Frontend
1 2
# build the production assets npm run build
-
Build and Deploy the Backend
1 2 3
# Make sure to backup the pixels.db database to the /map-pixel-app directory between container rebuilds to prevent data loss! docker build -t map-pixel-app . docker run -p 8000:8000 map-pixel-app
License
This project is licensed under the GNU GPL 3.0 License. See the LICENSE file for details.
Edit this page’s markdown on GitHub.