A Real-Time Collaborative Text Editor built using JavaFX, WebSockets, and Java Input/Output Streams. This application allows multiple users to collaboratively edit text files in real time with instant synchronization across all connected clients.
The Real-Time Collaborative Editor follows a client–server architecture where multiple clients connect to a centralized server. Any text modification made by one user is immediately transmitted to the server and broadcast to all other connected clients, ensuring consistency and real-time collaboration.
The application provides an IDE-like interface developed using JavaFX and supports multiple file types such as .txt and .java.
- Real-time collaborative text editing
- Multiple client support
- Instant synchronization of text changes
- Client–server architecture
- JavaFX-based desktop user interface
- WebSocket communication for low-latency updates
- Java Input/Output Streams for data transfer
- Live user presence tracking
- Graceful client connection and disconnection handling
- Syntax validation feedback
- Java
- JavaFX
- WebSockets
- Java Input/Output Streams
- Socket Programming
- Multithreading
- Object-Oriented Programming (OOP)
The system is divided into three main modules:
-
Client
Handles user interaction, text editing, and communication with the server. -
Server
Manages multiple client connections and broadcasts text updates. -
Shared
Contains constants and common configurations used by both client and server.
## Project Structure
RealTimeCollaborativeEditor
├─ client
│ ├─ ClientConnection.java
│ ├─ ClientMain.java
│ └─ UIController.java
├─ META-INF
│ └─ MANIFEST.MF
├─ OOP_PRINCIPLES.md
├─ README.md
├─ RealTimeCollaborativeEditor.iml
├─ runClient.bat
├─ runServer.bat
├─ server
│ ├─ ClientHandler.java
│ ├─ ServerBroadcaster.java
│ └─ ServerMain.java
└─ shared
| └─ SharedConstants.java
├─ screenshots
│ ├─ client_UI.png
| ├─ multi_client_UI.png
| ├─ project_tree.png
- The server is started and listens for incoming client connections.
- Each client connects to the server using a unique username.
- When a user edits the text:
- The change is sent to the server through WebSocket communication.
- The server broadcasts the update to all connected clients.
- All clients update their editor content in real time.
- Java Development Kit (JDK 8 or higher)
- JavaFX properly configured in your IDE or included via VM options
- All clients must be connected to the same local network (LAN)
- Execute the
runServer.batfile to start the collaboration server. - The server listens for incoming client connections and manages real-time synchronization.
- Execute the
runClient.batfile to launch a client instance. - Each execution creates a new client connected to the server.
- Multiple clients can be launched on the same LAN to test real-time collaboration.
- JavaFX must be configured correctly in the IDE using the required VM options.
- Additional clients can also be launched by executing the packaged JAR file.
- Ensure the server is running before starting any client instances.
- Understanding of real-time collaborative systems
- Hands-on experience with WebSockets and stream-based communication
- Implementation of multithreaded server applications
- Practical application of Object-Oriented Programming principles
- JavaFX desktop application development
- User authentication and authorization
- Version control and edit history
- Conflict resolution using Operational Transformation or CRDT
- Syntax highlighting for multiple programming languages
- Cloud-based deployment
Harshith Kumar B K (For College)
Contact - kumarsetty1212@gmail.com
Aspiring Software Development Engineer and AI/ML Engineer


