Skip to content

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

Notifications You must be signed in to change notification settings

Genvekt/cli-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

72 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

cli-chat image Auth Go report card


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

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