An open API service indexing awesome lists of open source software.

https://github.com/genvekt/cli-chat

πŸ’¬ πŸ™‹β€β™€οΈChat based on Golang microservices with gRPC connections
https://github.com/genvekt/cli-chat

clean-architecture golang grafana grpc jaeger kafka postgresql prometheus

Last synced: 10 months ago
JSON representation

πŸ’¬ πŸ™‹β€β™€οΈChat based on Golang microservices with gRPC connections

Awesome Lists containing this project

README

          

# cli-chat ![image](https://img.shields.io/badge/Golang-1.22-blue) [![Auth Go report card](https://goreportcard.com/badge/github.com/Genvekt/cli-chat/services/auth)](https://goreportcard.com/report/github.com/Genvekt/cli-chat/services/auth)
---

Chat application based on Golang microservices. Project combines various modern technologies, applying clean architecture principles.

### Technologies

---

- Language: Golang 1.22
- Protocols: gRPC with TLS, gRPC gateways, HTTP
- Database: PostgreSQL
- Event Bus: Kafka
- Metrics: Prometheus, Grafana, Jaeger
- Authentication: JWT

### System diagram

---
![image](.github/media/architecture_diagram.png)

### Project structure

---
Project structured as monorepository of services, that share common libraries
```
β”œβ”€β”€ libraries # common libraries chared by services
β”‚ β”‚
β”‚ β”œβ”€β”€ api # gRPC contracts specification with protocol buffers
β”‚ β”œβ”€β”€ cache_client # wrapper for redis client
β”‚ β”œβ”€β”€ closer # applicalion gracefull shutdown utility
β”‚ β”œβ”€β”€ db_client # wrapper for postgres client
β”‚ β”œβ”€β”€ kafka # wrappers for kafka consumer and producer
β”‚ └── logger # common logger (zap)
β”‚
└── services
β”‚
β”œβ”€β”€ auth # Service that manages users, authenctication and authorisation
β”œβ”€β”€ auth_postgres # DB for auth service
β”œβ”€β”€ auth_producer # Service with kafka producer to create random users
β”‚
β”œβ”€β”€ chat_server # Service that manages chats and messages
β”œβ”€β”€ chat_sercer_postgres # DB for chat_server service
β”‚
β”œβ”€β”€ kafka # Kafka deployment files
β”œβ”€β”€ metrics # Prometheus and Grafana deployment files
└── tracing # Jaeger deployment files