A real-time collaborative plain text editor built in Java, designed for seamless document editing and sharing among multiple users. This project demonstrates real-time synchronization, CRDT-based conflict resolution, and user presence tracking.
- Overview
- Features
- Project Structure
- Built With
- Prerequisites
- Usage
- Screenshots
- Technical Details
- Contributing
- License
This application enables multiple users to collaboratively edit plain text documents in real time. Users can import/export .txt files, share documents via unique codes, and participate either as viewers or editors. The editor ensures consistency and conflict-free editing using a tree-based CRDT algorithm.
- Real-Time Collaboration: Multiple users can edit the same document simultaneously with instant updates.
- Import/Export: Import and export
.txtfiles while preserving formatting and line breaks. - Shareable Codes: Generate unique codes for each document—one for editors and one for read-only viewers.
- Permission Handling: Editors can modify documents; viewers have read-only access and cannot see shareable codes.
- CRDT-Based Conflict Resolution: Handles concurrent edits using a tree-based Conflict-free Replicated Data Type algorithm.
- User Presence: See a list of active collaborators in real time.
- User-Friendly Interface: Intuitive UI for editing, sharing, importing/exporting, and managing collaboration sessions.
- Java 17 (or a compatible version)
- Maven (for dependency and build management)
- Spring Boot (included via Maven)
- JavaFX SDK (for the client UI)
- IDE (e.g., IntelliJ IDEA or Eclipse)
We recommend using IntelliJ IDEA to run both the server and client projects easily.
- CollabTE_Server: This folder contains the server.
- APTUI: This folder contains the client UI.
👉 Open each folder as a separate project in IntelliJ.
- Open the project in the
CollabTE_Serverfolder. - Run the file
CollabTE_Server.java. - Ensure the server is running at
ws://localhost:8081/wsor your local IP.
- Open the project in the
APTUIfolder. - Navigate to the file
NetworkController.java. - Find this line:
String url = "http://192.168.1.45:8081/ws";
- Replace the IP with your own IPv4 address (instructions below).
- Keep :8081 this is the port not the ip address.
Inside the APTUI project, navigate to the 'ClientSide.java' File. It's inside the 'com.example.userclientfx.communication' package.
Run ClientSide.java to start a client session.
You can run as many clients as you want after starting the server.
On Windows:
ipconfigLook under your active network adapter (e.g., "Wireless LAN adapter Wi-Fi") and find IPv4 Address.
On macOS/Linux:
ifconfig
# or
ip aLook for your active interface (en0, eth0, or wlan0) and find the inet line.
- Language: Java
- Architecture: Client-server model with central server for relaying edits
- Synchronization: Tree-based CRDT for conflict-free concurrent editing
- UI Framework: JavaFX
- Networking: WebSocket-based communication via Spring Boot



