This is a collaborative text editing application built using JavaFX for the frontend and Spring WebSocket for the backend. It allows multiple users to edit a shared document in real-time, with features such as:
- Real-time text editing using a CRDT (Conflict-free Replicated Data Type) for consistency.
- User presence tracking (list of connected users with cursor positions).
- Commenting system (users can add comments on text ranges, which are highlighted when clicked).
- Undo/Redo functionality for text edits.
- Exporting the document as a text file.
The application consists of:
- Client: A JavaFX application (
SessionController) that provides the UI for editing and commenting. - Server: A Spring Boot application with WebSocket support (
WebSocketController) for real-time communication. - CRDT: A custom
CRDTTreeimplementation to handle concurrent edits.
To run this application, you need the following installed on your system:
- Java Development Kit (JDK): Version 17 or higher.
- Maven: For dependency management and building the project.
- JavaFX SDK: Required for the client UI.
- Download from: https://gluonhq.com/products/javafx/
- Alternatively, use Maven to include JavaFX dependencies.
- Spring Boot: The server uses Spring Boot for WebSocket communication.
- Included as a Maven dependency.
- IDE: IntelliJ IDEA, Eclipse, or any IDE with JavaFX and Maven support (optional but recommended).
- WebSocket Client Library: The client uses
spring-messagingandspring-websocketfor WebSocket communication (included via Maven).
Clone or download the project to your local machine.
Ensure you have a pom.xml file with the necessary dependencies.
Run mvn install to download dependencies.
- Navigate to the project directory.
- Run the Spring Boot server with the following command:
- mvn spring-boot:run
- The server will start on localhost:8080 and expose a WebSocket endpoint at ws://localhost:8080/ws.
- Ensure the server is running.
- Run the JavaFX client with the following command:
- mvn javafx:run
- If using IntelliJ:
- Naviate to the main JavaFX application class and click the run button.
This project was a part of the Advanced Programming Techniques course in the Cairo University, Faculty of Engineering
- George Ayman
- Jana Meriden
- Moaaz Emam
- Yara Senousy
