![Logo](/Rahugg/CRM-system-go-microservices/raw/master/pkg/crm_core/img/crm-icon.png)
Simple Customer Relationship Management helps to manage tasks, assign deadlines, control user roles, use of admin panel, feedback management, sales representation, deal management
- About The Project
- Architecture of project
- Detailed Architecture
- Getting started
- Contact
- Reasons of using these Technologies
Customer Relationship Management
- Assign deadlines
- Contact management
- Control user roles
- Deal management
- Feedback management
- Helps to manage tasks
- Monitor the metrics
- Sales representation
- Use of admin panel
- Concurrency
- Design Patterns
- Docker
- gRPC
- JWT Auth
- Kafka
- Linters
- Migrations
- Metrics Grafana/Prometheus
- Middleware
- PostgreSQL
- Redis
- RESTful APIs
- Swagger
- Viper Config
Main application logic and resource management.
HTTP and/or gRPC controllers for request handling.
Internal documentation.
Data structures representing domain entities.
Data access methods for persistence and retrieval.
Encapsulated business logic.
Interaction with specific data storage systems.
Entry point for the authentication service.
Entry point for the core CRM service.
Configuration specific to the authentication service.
Configuration specific to the core CRM service.
Data for the Kafka service (topics, messages).
Configuration files and state information for Zookeeper.
Database schema migration scripts for the authentication service.
Database schema migration scripts for the core CRM service.
Reusable functions and utilities specific to the authentication service.
Reusable functions and utilities specific to the core CRM service.
-
Golang
I used Golang as a main backend language. And I wrote a backend by using Gin framework, It was easy to learn and write code in it, and Golang helped me to deal with concurrency. Features where I used concurrency: * Graceful Shutdown * Kafka producer-consumer relation * User confirm. * In-memory caching -
PostgreSQL
As a main database storage. Because of their open-source and availability, I preffered to use this database. Relational Database helped me to build relations among the entities, and it helped to build an application structured around a relationship between data tables. -
Redis
As a NoSQL database, I used Redis to cache the most used and unchanged data, and this helped me to retrieve the data faster. This provides improved read performance (as requests can be split among the servers) and faster recovery when the primary server experiences an outage -
Kafka
I used Kafka as a message broker. Because Kafka streams messages with very low latency and is suitable to analyze streaming data in real time. It can be used as a monitoring service to raise alerts and etc. Kafka is suitable for my app that need to reanalyze the received data -
gRPC
gRPC uses a binary format for data serialization and communication, which is much more efficient than traditional text-based formats such as JSON or XML. This results in faster and more efficient communication between microservices. -
Docker
Docker helps to containerize the application which can help to easy-sharing among the users and by installing some dependencies such as Redis and Kafka to project. Docker lets you build, test, and deploy applications quickly Because Docker containers encapsulate everything an application needs to run (and only those things), they allow applications to be shuttled easily between environments. -
Swagger
Swagger allowed me to describe the structure of my APIs so that machines can read them. The ability of APIs to describe their own structure is the root of all awesomeness in Swagger. -
Grafana
Grafana helps me to visualize the data and monitor the proccess of my app, I collect the metrics from Prometheus and visualizing them in Grafana on localhost:3000 -
Prometheus
Prometheus can collect and store metrics as time-series data, recording information with a timestamp, and I am visualizing them in Grafana
- Clone the repo
git clone https://github.com/Rahugg/CRM-system-go-microservices.git
- Install go packages
go mod tidy
- Launch docker-compose
docker-compose up
- To launch the auth-service: (make sure that the docker-compose is up)
make start-auth
(Check makefile for other scripts)
2. To launch the crm_core service: (make sure that the docker-compose is up)
make start-crm
(Check makefile for other scripts)
- To migrate the data and tables on services:(Check makefile for other scripts)
make migrate-up
- To mock the database with mock data:(Check makefile for other scripts)
make mock-data
- To drop all of the tables:
make migrate-down
Amanbek - @telegram_handle - Rahuggg
Project Link: https://github.com/Rahugg/CRM-system-go-microservices