GithubHelp home page GithubHelp logo

crm-customer-service's Introduction

java-crm-customer-service

The project is a api for a crm customer service that allow user to register, retrieve, update and delete information about customers through api endpoints. The project is based on Clean Architecture, so the domain rules are independent from any implementations and frameworks, become much more flexible and can be adaptable to any external implementations. The api can be further improve with another functionalities.

The project was implemented with three layers and each layer are on a separated module:

  • Core Layer: include the domain business rules and the application business rules.
  • Api Layer: contains the application entrypoint, the configuration and dependencies of the other layers and the api endpoints.
  • Adapters layer: contains the adapters between core layer and external applications, like database connections.

Technology applied:

  • Java 17

  • Gradle

  • Spring Web: Used to expose API endpoints through a Rest Controller.

  • Spring Data Jpa: Used to configure and persist data on SQL database.

  • Postgres: Database used to store customer information.

  • Lombok: Anotations to reduce the boilerplate code.

  • JUnit 5: To perform unit and integration tests.

  • Docker: Containerized Postgres database, PgAdmin, Zookeeper and Kafka broker.

  • Postman: Use to make API calls to Application Endpoints.

  • Swagger: Use to document the api.

  • http://localhost:8080/swagger-ui/index.html#/register-client-resource-impl

  • Spring Kafka: Communication assync through Kafka topics

  • Confluent Schema Registry:

  • Redis Cache Database : quick access to customer information instead of consulting the relational database.

todo: integrate viaCep api to get the customer address

Running the application

Run Docker-Compose

Run $ docker-compose up -d
on docker dir to run the postgresql database, pgadmin and kafka

Running the project

Clone the project, open the folder on IDE.
run the main class crm-customer-service-api
run the main class crm-customer-service-producer
run the main class crm-customer-service-consumer

Build and run Gradle

./gradlew clean build
java -jar crm-customer-service-api/build/libs/crm-customer-service-api-0.0.1-SNAPSHOT.jar

Or simply

./gradlew bootRun

Api Endpoints

{
    "name": "Jhon Doe",
    "motherName": "Gina Doe",
    "documentContent": "132456789",
    "contactContent": "(21) 98999-9999",
    "addressStreet": "Rua do A",
    "addressNumber": "32B"
  
}

Access application on heroku

Swagger da API: https://crm-service-customer-api.herokuapp.com/swagger-ui/index.html

Endpoint da API: GET https://crm-service-customer-api.herokuapp.com/api/v1/customer

Endpoint da JOB: GET https://crm-service-customer-job.herokuapp.com/

crm-customer-service's People

Contributors

marceloaraujo14 avatar

Stargazers

Ricardo Machado avatar Thiago Deodato avatar Edith Penha avatar Paulo Ribeiro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.