Skip to content

smartinrub/spring-xmpp-websocket-reactjs

Repository files navigation

spring-xmpp-websocket-reactjs

IM System Diagram

Tech Stack

Installation

  1. Run backend services:

    mvn clean install
    docker build -t spring-xmpp-websocket-server . 
    docker-compose up
  2. Go to http://localhost:9090 and setup openfire XMPP server:

    • Server settings:
      • Set "XMPP Domain Name" to localhost
      • Set "Server Host Name (FQDN)" to localhost
      • Leave the rest as it is.
    • Database Settings:
      • Select "Standard Database Connection"
      • Select "MySQL"
      • Replace on the "Database URL" HOSTNAME with openfire-mysql and DATABASENAME with openfire, then fill in the username and password.
    • Continue and ignore the rest of the steps.
  3. Now you can use a websocket client to try out the backend application.

    • Endpoint: ws://localhost:8080/chat/sergio/pass
    • Connect will return {"messageType":"JOIN_SUCCESS"}
    • Send new message with body:
      {
          "from": "sergio",
          "to": "jose",
          "content": "hello world",
          "messageType": "NEW_MESSAGE"
      }
      
      will return {"from":"sergio","to":"jose","content":"hello world","messageType":"NEW_MESSAGE"}
  4. Run ReactJS App

npm install
npm start

Running Tests

To run tests, run the following command

  mvn clean install

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published