A real-time collaborative whiteboard built with Spring Boot, STOMP over WebSockets, Thymeleaf, and MySQL. Multiple users can draw on the same board, see presence and cursor updates, and collaborate live.
- Real-time board events via STOMP channels (presence, cursor, element, version).
- Board collaboration flows (join/leave/heartbeat) with shared updates.
- Form login plus Google OAuth2 login.
- Clean MVC + service + repository backend structure.
- H2 dev profile for fast local testing without external DB.
- Access boards
- Navigate to shared content
- Manage personal workspace
- Draw shapes, lines, freehand sketches
- See other users’ cursors in real time
- Sync updates instantly across clients
- Track active users on board
- Real-time cursor movement
- Presence indicators
- Secure login with Spring Security
- Google OAuth2 integration
- Java 21 (LTS), Maven Wrapper
- Spring Boot 3.5.7, Spring Security 6
- Thymeleaf + static JavaScript
- WebSocket/STOMP endpoints:
/ws,/app,/topic,/queue - MySQL (Aiven/hosted) and H2 (dev/test)
- Clone the repo.
- Ensure Java 21 is installed.
- Copy
.env.exampleto.envand fill your values. - Start using one of the run modes below.
- Windows PowerShell 5.1+ (for helper scripts)
- Java 21 on PATH (
java -version) - Maven is optional (wrapper included)
Database variables used by application.properties:
DB_HOST,DB_PORT,DB_NAME(orAIVEN_HOST,AIVEN_PORT,AIVEN_DB)DB_USER,DB_PASSSSL_MODE(defaultREQUIRED)
OAuth variables:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
Important:
- OAuth is currently configured as mandatory at startup in this codebase.
- If OAuth values are missing, startup may fail.
Use the helper script:
./scripts/run-aiven.ps1
./scripts/run-aiven.ps1 -Port 8081
./scripts/run-aiven.ps1 -RunTests
./scripts/run-aiven.ps1 -DevFallback$env:SPRING_PROFILES_ACTIVE = "dev"
& .\mvnw.cmd spring-boot:runApp URL: https://collabodraw-bdd2.onrender.com
& .\mvnw.cmd test
& .\mvnw.cmd -DskipTests package
java -jar .\target\whiteboard-0.0.1-SNAPSHOT.jar- Handshake:
/ws - Send:
/app/board/{id}/join|leave|heartbeat|cursor|version|element - Subscribe:
/topic/board.{id}.participants/topic/board.{id}.cursors/topic/board.{id}.versions/topic/board.{id}.elements
- Public/Auth:
/auth,/login,/register - App pages:
/home,/board/{boardId},/my-content,/settings,/templates,/shared - WebSocket:
/ws
See PROJECT_STRUCTURE.md for the updated structure map.
This repo includes render.yaml (Docker service blueprint).
Set these environment variables in Render:
DB_HOST,DB_PORT,DB_NAME,DB_USER,DB_PASS,SSL_MODEGOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET
Optional alternatives:
SPRING_DATASOURCE_URL,SPRING_DATASOURCE_USERNAME,SPRING_DATASOURCE_PASSWORD
New contributors are welcome.
- Fork the repo.
- Create a branch:
feature/<short-name>orfix/<short-name>. - Keep PRs focused and include testing notes.
- Run tests before opening a PR.
- Open a Pull Request with screenshots/logs for UI or realtime behavior changes.
For collaboration ideas, check Issues or open a new issue with label suggestion:
good first issuehelp wantedenhancement
If you are interested in collaborating on real-time systems, WebSockets, Spring Boot, or frontend whiteboard UX, feel free to open an issue or PR.
Maintainers are open to:
- feature collaboration
- bug-fix contributions
- performance and scalability improvements
- Do not commit secrets (
.env, DB credentials, OAuth keys). - Use least-privilege DB users in hosted environments.
- Rotate credentials if exposed.
CollaboDraw: collaborate visually in real time.