A feature-rich chat application in Golang using Redis as a complete solution. Redis is used to store all user data, chats, contact lists, and many other things.
The Chat Application’s name is Kayee. It is slang you will hear in Jabalpur city for what’s up!
Introduction
In this tutorial, you will create a chat application in Golang, Redis as a Database layer, and ReactJS with Chakra UI for the front-end.
Let’s understand what you are going to build in this application.
- Redis Repository: Simple repository manages all the Redis operations.
- HTTP Server: A REST API server to serve user-specific functionalities, like registering and logging in.
- WebSocket Server: A real-time server to reflect changes immediately.
- Frontend(Client): A ReactJS application with Chakra UI Components.
Chat Features
- One-to-One chat
- Register User
- Login User
- Add Contact
- Contact List
Redis Stack Used
- SET
- SORTED SET
- REDISJSON
- REDISEARCH
You can find the complete GitHub Project link at the end of the article.
Architecture
The user will register and log in to the chat application using the HTTP server. The real-time messages will be sent via the WebSocket server and saved to Redis.
WebSocket Flow Diagram: An active connection will be alive between user 1 and user 2.
There is no ads to display, Please add some