A real-time, multi-user collaborative drawing web application, similar to Microsoft Paint, built with vanilla JavaScript. This project allows multiple users to draw on the same canvas simultaneously, with changes reflected in real time for all participants.
This application was originally developed in June 2024 as an educational project for the "Wprowadzenie do aplikacji WWW" (Introduction to Web Applications) course at Białystok University of Technology (Politechnika Białostocka).
- Initial Team (June 2024):
- Kiryl Alishkevich
- Radzivon Daroshka
- Real-Time Collaboration: Multiple users can join a project and draw on the same canvas, seeing each other's changes live.
- Project Management:
- Create new drawing projects.
- Protect projects with a password.
- Browse and search for existing projects.
- Comprehensive Drawing Tools:
- Shapes: Rectangle, Circle, Ellipse, Triangle, Rhombus.
- Freehand: Brush, Line, Arrow.
- Utility: Eraser, Text tool.
- Fill Option: Toggle between drawing filled shapes or just outlines.
- Object & Layer Manipulation:
- Each new drawing action creates a new layer.
- Move, Resize, and Rotate individual objects/layers.
- Delete specific objects/layers.
- Customization:
- Adjustable brush/line thickness.
- Customizable text size.
- A palette of pre-set colors and a full-spectrum color picker.
- Canvas Control:
- Dynamically resize the canvas width and height.
- Clear the entire canvas.
- Import images onto the canvas via file selection or drag-and-drop.
- Save the final drawing as a JPG image.
- Frontend: HTML5, CSS3, Vanilla JavaScript (ES6 Modules)
- Backend Simulation (for local development):
json-serverto provide a REST API for project data persistence. - Development Tools: Visual Studio Code with Live Server extension.
To run this project on your local machine, please follow these steps.
- Node.js and npm (Node Package Manager) installed on your system.
- A modern web browser (e.g., Chrome, Firefox).
- Visual Studio Code (recommended) with the Live Server extension.
-
Clone the repository (or download the source code):
git clone <repository-url> cd <repository-directory>
-
Install
json-server: If you don't havejson-serverinstalled globally, run this command in your terminal:npm install -g json-server
-
Start the Backend Server: Navigate to the
dbdirectory and start the JSON server. It will watch thedb.jsonfile for changes.cd db json-server --watch db.jsonThe server will typically start on
http://localhost:3000. Keep this terminal window open. -
Launch the Frontend Application:
- Open the
projectfolder in Visual Studio Code. - Right-click on the
index.htmlfile. - Select "Open with Live Server".
- This will open the application in your default web browser, connected to your local backend server.
- Open the
You can now create new projects, draw, and see the data being updated in your db/db.json file.
This was primarily an educational project, but contributions or suggestions for improvement are welcome. Please feel free to open an issue to discuss your ideas or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.