Git Product home page Git Product logo

nfgonzalez10 / hexagonal-architecture-distilled Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pedromoraisf/hexagonal-architecture-distilled

0.0 0.0 0.0 1.05 MB

The guide to understand Hexagonal Architecture (a.k.a Ports and Adapters) in JavaScript.

Home Page: https://javascript.plainenglish.io/hexagonal-architecture-distilled-in-javascript-ultimate-guide-aac2eaa6726c

JavaScript 99.47% Dockerfile 0.53%

hexagonal-architecture-distilled's Introduction

Hexagonal Architecture Distilled in JavaScript

The guide to understand Hexagonal Architecture (a.k.a Ports and Adapters) in JavaScript.

Click here to see my publication on my blog →


ℹ️ This publication is being maintained right now. This means that some topics may be out of date.

Presentation

This is a sample repository for my "Hexagonal Architecture Distilled in JavaScript" publication.

The code writing style was motivated by the familiarity of JavaScript programmers.

The design was as simple as possible in order not to obscure the practical examples of Hexagonal Architecture concepts.

I suggest that the consumer of this content does not get attached to peripheral concepts (Decorator design pattern, etc). Focus on Ports and Adapters!

Glossary

Component Vision of the Ports and Adapters

The diagram below is designed to be familiar with the C4 pattern component diagram.

How to Run

Local:

  • Install Node.js >= 14
  • Open this repo and install dependencies
  • Run: npm run start

Docker 🐳:

  • Having the node installed, open this repo and run: npm run docker:up
  • If you want to disassemble the composition, run: npm run docker:down

How to Test

Unit and Integration:

  • Unitary tests, run: npm run test:unit
  • Integration tests, run: npm run test:integration
  • Both tests, run: npm run test

e2e:

  • Having the environment mounted (both local or docker), run: npm run test:create-a-post and copy the "_id" returned property
  • Input above returned property in TESTABLE_POST_ID variable on e2e/docker/get-a-specific-post.test.js and run: npm run test:get-a-specific-post
  • Input above returned property in TESTABLE_POST_ID variable on e2e/docker/edit-a-specific-post.test.js and run: npm run test:edit-a-specific-post
  • Run: npm run test:list-all-posts

hexagonal-architecture-distilled's People

Contributors

pedromoraisf avatar dependabot[bot] 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.