Coder Social home page Coder Social logo

jmngige / spring-chat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joejoe2/spring-chat

0.0 0.0 0.0 57.31 MB

Horizontal scalable chat application using SpringBoot and Server Sent Event/WebSocket.

License: MIT License

Shell 1.37% Java 98.59% Dockerfile 0.04%

spring-chat's Introduction

spring-chat

build

Description

This is a horizontal scalable chat application using Nats as event bus. You can add as many application instances as you need to increase the capacity of online users in overall system. If you have even more users you can add Nats servers as cluster to increase the message delivery speed/throughput.

Features

  • chat in public channels with any users (1 connection/channel)
  • chat in private channels with another user (1 connection/user)
  • chat in group channel with members (1 connection/user)
  • user blockage in private channels

Supported Protocols

You can use below protocols to receive/subscribe chat messages from the server:

  • Server Sent Event
  • Websocket

Notice

This project is using our another project as authentication service for JWT authentication.

Architecture

image

You can see technical details at here.

Online demo

https://frontend.joejoe2.com

Example Frontend

We provide an example frontend application written in Vue.js at here to work with this project.

  • chat in public channel image
  • chat in private channel image
  • chat in group channel image

Testing

run mvn test or ./mvnw test

Lint

run

mvn spotless:check
mvn spotless:apply

or

./mvnw spotless:check
./mvnw spotless:apply

Deploy

  1. follow this to setup

  2. copy ./env/application-chat.env.example to ./env/application-chat.env and set jwt.secret.publicKey as in 1.

  3. prepare 2 FQDNs (ex. chat.test.com, auth.test.com)

  4. open ./nginx/user_conf.d/server.conf to replace chat.example.com and auth.example.com with your 2 FQDNs

  5. docker-compose up or docker-compose up -d

spring-chat's People

Contributors

joejoe2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.