Coder Social home page Coder Social logo

elyosemite / hexagonalarchitecture Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 516 KB

This is a study project focused on software architecture. We will use the Hexagonal Architecture, also known as Ports and Adapters, which aims to separate business logic from the rest of the application, as well as being easily testable and flexible for changes.

JavaScript 40.79% TypeScript 59.21%
adapter-pattern architecture design hexagonal-architecture study typescript ports-and-adapters

hexagonalarchitecture's Introduction

Study of Hexagonal Architecture with Clean Architecture

This is a study project focused on software architecture. We will use the Hexagonal Architecture, also known as Ports and Adapters, which aims to separate business logic from the rest of the application, as well as being easily testable and flexible for changes.

In addition, we will use the principles of Clean Architecture, which proposes the separation into layers of responsibilities and the inversion of dependencies, making the system more modular, decoupled and easy to maintain.

With Domain-Driven Design, we will map the domain of the application, defining business rules, entities and valuing the ubiquitous language, which is a set of common terms and concepts between business experts and developers.

And, to ensure the quality of the code, we will use the Test-Driven Development technique, writing tests before implementing the code and ensuring that the application works correctly at all times.

The project will be developed using the Typescript programming language, and the technologies used will be nodeJS v18.16.0.

Requirements

  • NodeJS with version v18.16.0
  • Typescript
  • ts-jest with version ^29.1.0

How to use

To use this project, you must follow the following steps:

  • Have to download from [email protected]:Yuridsm/HexagonalArchitecture.git
  • Run npm run start
  • To run tests you have type npx jest

Project structure

The project will be divided into [insert here the layers of the hexagonal architecture] and will follow the following folder structure:

/app
    /domain
        /models
        /repositories
        /services
    /usecases
    /adapters
        /entrypoints
        /gateways
        /presenters
/tests
  • domain: contains business rules, entities, services, and repository interfaces.
  • usecases: contains the application use cases, which use domain interfaces to perform operations.
  • adapters: contains the input and output adapters of the application, as well as presenters, which are responsible for formatting information for display.
  • tests: contains unit and integration tests of the application.

Contribution

Feel free to contribute to this project, just follow the following guidelines:

Fork the project; Create a new branch with the feature to be added; Make the necessary changes and write the corresponding tests; Make sure all tests are passing; Send a pull request to the original repository. Thank you for your contribution!

hexagonalarchitecture's People

Watchers

Yuri Melo avatar Kostas Georgiou 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.