https://github.com/fwcd/whiteboard
2D drawing application with real-time collaboration
https://github.com/fwcd/whiteboard
2d-graphics canvas drawingboard paint whiteboard
Last synced: 3 months ago
JSON representation
2D drawing application with real-time collaboration
- Host: GitHub
- URL: https://github.com/fwcd/whiteboard
- Owner: fwcd
- License: mit
- Created: 2018-02-10T15:58:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-17T01:35:38.000Z (over 5 years ago)
- Last Synced: 2026-02-15T16:40:08.364Z (4 months ago)
- Topics: 2d-graphics, canvas, drawingboard, paint, whiteboard
- Language: Java
- Homepage:
- Size: 325 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Whiteboard
2D drawing application based on [Sketch](https://github.com/fwcd/Sketch) featuring real-time collaborative editing.

## Running the client
* `./gradlew :client:run`
## Running the server
* `./gradlew :server:run`
## Running the test client
* `./gradlew :testclient:run --console=plain`
## Extending the Protocol
The protocol is defined by [a specification](Protocol.md) and has a default Java implementation. To create additional events and requests, both need to be updated:
* Add the new declaration to [Protocol.md](Protocol.md)
* Navigate to the `shared` module
* For a request:
* Add the request name to `RequestName`
* Subclass `Request`
* Add a new method referencing the subclass to `WhiteboardServer`
* For an event:
* Add the event name to `EventName`
* Subclass `Event`
* Add a new method referencing the subclass to `WhiteboardClient`
* Inside the new subclass:
* Implement the necessary fields (matching the protocol declaration)
* Add a protected no-argument-constructor (for Gson)
* Add a public constructor initializing all fields (including those in superclasses)
* Add public getters for all added fields
* Implement toString
* Update `MessageDeserializer`
* Update the `LocalWhiteboardServer`/`LocalWhiteboardClient` implementation