Skip to content

Customer Relationship Management helps to manage tasks, assign deadlines, control user roles, use of admin panel, feedback management, sales representation, deal management

License

Notifications You must be signed in to change notification settings

ARAF-CRM/CRM-system-go-microservices

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License Forks Stargazers LinkedIn


Logo

CRM-system-go-microservices

Simple Customer Relationship Management helps to manage tasks, assign deadlines, control user roles, use of admin panel, feedback management, sales representation, deal management

Table of Contents
  1. About The Project
  2. Architecture of project
  3. Detailed Architecture
  4. Getting started
  5. Contact
  6. Reasons of using these Technologies

About The Project

Customer Relationship Management

My application's features:

  • Assign deadlines
  • Contact management
  • Control user roles
  • Deal management
  • Feedback management
  • Helps to manage tasks
  • Monitor the metrics
  • Sales representation
  • Use of admin panel

Built With

  • Golang
  • Gin
  • gRPC
  • PostgreSQL
  • Redis
  • Kafka
  • Docker
  • Swagger
  • Grafana
  • Prometheus

Tech features

  • Concurrency
  • Design Patterns
  • Docker
  • gRPC
  • JWT Auth
  • Kafka
  • Linters
  • Migrations
  • Metrics Grafana/Prometheus
  • Middleware
  • PostgreSQL
  • Redis
  • RESTful APIs
  • Swagger
  • Viper Config

Folder Structure

Internal

app

Main application logic and resource management.

controller

HTTP and/or gRPC controllers for request handling.

docs

Internal documentation.

entity

Data structures representing domain entities.

repository

Data access methods for persistence and retrieval.

service

Encapsulated business logic.

storage

Interaction with specific data storage systems.

Cmd

auth

Entry point for the authentication service.

crm_core

Entry point for the core CRM service.

Config

auth

Configuration specific to the authentication service.

crm_core

Configuration specific to the core CRM service.

Data

kafka1

Data for the Kafka service (topics, messages).

zookeeper

Configuration files and state information for Zookeeper.

Migrations

auth

Database schema migration scripts for the authentication service.

crm_core

Database schema migration scripts for the core CRM service.

Pkg

auth

Reusable functions and utilities specific to the authentication service.

crm_core

Reusable functions and utilities specific to the core CRM service.

Reasons why I used these technologies

Technologies
  • 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

(back to top)

Getting Started

Installation

  1. Clone the repo
    git clone https://github.com/Rahugg/CRM-system-go-microservices.git
  2. Install go packages
    go mod tidy
  3. Launch docker-compose
    docker-compose up
    

(back to top)

Launch

  1. 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)

Migrate

  1. To migrate the data and tables on services:(Check makefile for other scripts)
  make migrate-up
  1. To mock the database with mock data:(Check makefile for other scripts)
  make mock-data
  1. To drop all of the tables:
  make migrate-down

(back to top)

Contact

Amanbek - @telegram_handle - Rahuggg

Project Link: https://github.com/Rahugg/CRM-system-go-microservices

(back to top)

About

Customer Relationship Management helps to manage tasks, assign deadlines, control user roles, use of admin panel, feedback management, sales representation, deal management

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.1%
  • Makefile 0.9%