Skip to content

A NestJS API to integrate with a CRM build using Hexagonal Architeture

License

Notifications You must be signed in to change notification settings

Samuel-Ricardo/nestjs_hexagonal-architeture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nestjs_hexagonal-architeture

🚀 🟥 Discovery 🟥 🚀

Application developed with the purpose of studying the NestJS Ecosystem and Hexagonal Architeture

|   Overview   |    Technologies   |    Project   |   Routes   |    Run   |   Author   |   


| 🛰️ About:

This API target is to explore an Hexagonal Architeture implementation With NestJS Framework, furthuermore, this application simulate a relation with a marketing CRM that consume data from this API.


🏗️ | Technologies and Concepts Studied:

  • NestJS - [Express]
  • Docker
  • Sequelize
  • SQLite
  • Redis
  • Bull - [Queues]
  • Event-Emmiter
  • Swagger | [Documentation]
  • JS | Typescript
  • Test | Jest
  • Axios
  • json-server
  • eslint
  • prettier
  • husky
  • lint-sataged
  • @swc | [Rust Compiler]

Among Others...


💻 | Application:

The hexagonal architecture consists of the philosophy of ports and adapters, such as the usb-c port on your phone that accepts all types of usb-c compatible chargers.

This concept was applied to create an API that handles and sends the list data to a simulated CRM, for that, I used the event system to create event-listeners and emiters that on trigger send the data to a Queue with Bull & Redis and from the queue the API sends the data to the CRM.

This project have a dev friendly ambient that provides a automatic code formarter and linting, tests, Documentation with Swagger and Docker containers

$ hexagonal_architeture > api.http


###
GET http://localhost:3000/lists


###
GET http://localhost:3000/lists/3

###
POST http://localhost:3000/lists
Content-Type: application/json

{
  "name": "My List2"
}

###
GET http://localhost:8000/lists


👨‍💻 | How to use


Open your Git Terminal and clone this repository

  $ git clone "git@github.com:Samuel-Ricardo/nestjs_hexagonal-architeture.git"

Make Pull

  $ git pull "git@github.com:Samuel-Ricardo/nestjs_hexagonal-architeture.git"

This application use Docker so you dont need to install and cofigurate anything other than docker on your machine.


Navigate to project folder $ cd ./hexagonal_architeture/ and run it using docker-compose

  # After setup docker environment just run this commmand on root project folder:

  $ docker-compose up --build   # For First Time run this command

  $ docker-compose up           # to run project

You can also run NestJS Directly without Docker [HERE]

  #Apps Running on:

  $ API: http://localhost:3000

  $ CRM: http://localhost:8000

  $ REDIS: redis://localhost:6379

  See more: ./hexagonal_architeture/docker-compose.yaml

:octocat: | Author:


- Samuel Ricardo

About

A NestJS API to integrate with a CRM build using Hexagonal Architeture

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published