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.
- 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
You can use below protocols to receive/subscribe chat messages from the server:
- Server Sent Event
- Websocket
This project is using our another project as authentication service for JWT authentication.
You can see technical details at here.
We provide an example frontend application written in Vue.js at here to work with this project.
run mvn test
or ./mvnw test
run
mvn spotless:apply
or
./mvnw spotless:apply
-
follow this to setup
-
copy
./env/application-chat.env.example
to./env/application-chat.env
and setjwt.secret.publicKey
as in 1. -
prepare 2 FQDNs (ex.
chat.test.com
,auth.test.com
) -
open
./nginx/user_conf.d/server.conf
to replacechat.example.com
andauth.example.com
with your 2 FQDNs -
docker-compose up
ordocker-compose up -d