Awesome Open Source
Awesome Open Source

Gitter chat

chat-socket is a simple chat application includes chat client and chat server. Support multiple users, private chat, and personal status. This project is based on TCP socket, multi-threading, JavaFx, Java Swing, Java serialization, and JSON.


To compile this project, you need to install these things:


Build (binary file will be placed in target directory):

mvn clean compile assembly:single

Run (will ask you for working mode):

mvn exec:java


Both server and client are in chatsocket-x.y-SNAPSHOT-jar-with-dependencies.jar (to get this jar file you need to build this project).

  1. Server app: java -jar chatsocket.jar --mode=server
  2. Client app: java -jar chatsocket.jar --mode=client

App settings will be saved in app.json file

  "modified" : 1580791811962,
  "settings" : [ {
    "key" : "client",
    "data" : {
      "serverIp" : "",
      "serverPort" : 3393,
      "loggedUserName" : "sontx"
  }, {
    "key" : "server",
    "data" : {
      "ip" : "",
      "port" : 3393
  } ]


The server needs to listen to an IP and a port number, other clients will connect to this address. Fill up these boxes and click on Start button to start the server.

All users data will be saved in user.json file.

[ {
  "id" : "7453f7f5105547179f0845cd03fe4eda",
  "username" : "sontx",
  "passwordHash" : "7c4a8d09ca3762af61e59520943dc26494f8941b",
  "profile" : {
    "displayName" : "Tran Xuan Son",
    "status" : "I'm just a beginner"
} ]


  1. Connect to the server.

  1. Then login with your account

  1. Or register a new one.

  1. Other users will be shown in your friend list.

  1. To update your userProfile, double-click to the avatar.

  1. Double-click to any online friend to chat


  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D



Developed by sontx:



Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
java (30,676
socket (173
javafx (133
tcp-server (46
tcp-client (32
chatroom (27

Find Open Source By Browsing 7,000 Topics Across 59 Categories