SupaDrawer is a real-time multiplayer drawing board application built with React Native. It leverages Supabase's real-time database capabilities to enable multiple users to draw on a shared canvas simultaneously.
- Real-time collaborative drawing
- Unique user identifiers with random usernames and colors
- Smooth drawing experience using a custom drawing board component
- Easy channel-based drawing sessions
- React Native: For building the mobile application.
- Expo: For development and building the app.
- Supabase: For real-time database.
- Node.js and npm installed
- Expo CLI installed (
npm install -g expo-cli
) - Supabase account and project set up
-
Clone the repository:
git clone https://github.com/tusharpamnani/supaDrawer.git cd supaDrawer
-
Install dependencies:
npm install
-
Set up environment variables:
Create an
.env
file in the root of your project and add your Supabase URL and Anon Key:EXPO_PUBLIC_SUPABASE_URL=your-supabase-url EXPO_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
-
Run the project:
expo start
SupaDrawer
├── app
│ ├── _layout.tsx # Layout component
│ ├── index.tsx # Main entry point
│ └── channel
│ └── [channel].tsx # Channel-specific drawing screen
├── components
│ └── DrawingBoard.tsx # Drawing board component
├── .env # Environment variables
├── app.json
├── README.md # This file
├── LICENSE # MIT License
└── package.json # Project metadata and dependencies
-
Start a drawing session:
Open the app and navigate to a drawing channel by passing the channel name as a parameter in the URL or navigation.
-
Draw on the canvas:
Use your finger or stylus to draw on the canvas. Your drawings will be broadcasted in real-time to other users in the same channel.
-
Collaborate:
Other users joining the same channel will see your drawings and can draw simultaneously on the same canvas.
Defines the layout for the application, setting up the navigation structure.
The home screen of the application, where users can navigate to different drawing channels.
The main drawing screen for a specific channel. This component handles the initialization of the Supabase channel and manages the drawing events.
A custom component for the drawing board. It provides the canvas and drawing functionalities, and exposes methods for handling drawing events.
Check out the video demo of the main app in action:
Contributions are welcome! Feel free to submit a pull request or open an issue to improve the project.
This project is licensed under the MIT License.
Happy drawing! 🎨