A web-based collaborative whiteboard application allowing multiple users to draw simultaneously in real-time. Built with Django Channels and React.
- Real-Time Collaboration: See other users' drawings appear instantly.
- Basic Drawing Tools: Pen and Eraser functionality.
- Tool Selection: Easily switch between available tools.
- WebSocket Communication: Efficient real-time updates using Django Channels.
- Interactive Canvas: Smooth drawing experience powered by React and Konva.js.
(Planned Features: Color Picker, Brush Size, Shapes, Text Tool, Undo/Redo, etc.)
Backend:
- Python
- Django
- Django Channels (WebSockets)
- ASGI Server (Daphne/Uvicorn)
Frontend:
- React.js
- Konva.js (HTML5 Canvas Framework)
- JavaScript (ES6+)
- CSS3
Database:
- SQLite (Default for Development)
Follow these steps to get the project running locally:
Prerequisites:
- Python 3.8+ and Pip
- Node.js and npm (or Yarn)
- Git
Backend Setup:
-
Clone the repository:
git clone https://github.com/wldoooon/realtime_whiteboard cd whiteBoard-Project
-
Create and activate a virtual environment:
python -m venv venv .\venv\Scripts\activate
(On Git Bash/Linux/macOS:
source venv/bin/activate
) -
Apply Django migrations:
python manage.py migrate
-
Run the Django development server (with ASGI):
daphne whiteBoardProject.asgi:application
The backend should now be running, typically on
http://127.0.0.1:8000
.
Frontend Setup:
- Navigate to the frontend directory:
cd frontend-whiteboard
- Install Node.js dependencies:
(Or
npm install
yarn install
if using Yarn) - Start the React development server:
(Or
npm start
yarn start
) The frontend should now be running, typically onhttp://localhost:3000
.
- Ensure both the backend (Daphne/Uvicorn) and frontend (React dev server) are running.
- Open your web browser and navigate to
http://localhost:3000
. - Open the same URL in another browser tab or window to simulate multiple users.
- Select a tool from the left toolbar (Pen or Eraser).
- Click and drag on the white canvas area to draw.
- Changes should appear in real-time across all open instances.
Contributions are welcome! If you'd like to contribute, please fork the repository and create a pull request. You can also open an issue for bugs or feature suggestions.