This project is POC of chat application that uses gRPC as main communication protocol. Using Golang for the backend, React for the frontend and Envoy as proxy. After connecting, users can send one-to-one messages by providing the receiver username. Users can also create and join groups where messages are broadcasting to all group members.
These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.
You need docker installed in your machine in order to properly run the project
Docker compose file is provided to ensure all required dependencies and configurations. You need to have docker installed in your host and then you can run the following command:
docker compose up
The backend app was developed using Golang that implements a gRPC server and exposes those methods:
CreateUser
create a new userConnect
connect a user to messages streamSendMessage
send message to a user or a group channelCreateGroup
create a new group with the current user as first memberJoinGroup
join created groupLeftGroup
leave a joined groupListChannels
list all connected users and available groups
All methods and messages are described in the proto file here.
This server implements gRPC reflections, so you can easily retrieve all the specification using a gRPC client like evans.
You can run tests using this command
go test ./... -cover
The frontend app was developed using React. It's only for testing the backend server and showcasing the potential of grpc-web. Envoy proxy is required to connect React app to our backend server.
Live demonstration of 3 chat users that illustrate:
- One-to-one communication
- One-to-many communication (Group channel)