Skip to content

An instant messaging app that delivers your messages as fast as Hermes

License

Notifications You must be signed in to change notification settings

khanh1998/hermes

Repository files navigation

hermes

An instant messaging app that delivers your messages as fast as Hermes

Documentation

For more details documentation, please go here.

Architecture

Architecture

Authentication process

  1. Client send username and password to Auth to get a jwt. Now it can access to resource in API using that jwt.
  2. Client send a request to Auth to get another jwt token to authenticate with Socket. In this request, the jwt in step 1 will be put in the header. So only authenticated user can send this request.
  3. Client send a request to Socket to make a socket connection between client and socket server, using token acquired in step 2. The Socket need to contact with Auth to verify that the token sent by Client is valid.

Develop

  1. sudo docker-compose up -d

Wait about 2 minutes, kafka takes time to get ready

  1. cd client npm run dev

  2. cd auth npm run start:dev

  3. cd api npm run start:dev

  4. cd shipping go run .

  5. cd socket go run .

go to localhost:3000