Giter VIP home page Giter VIP logo

filipemata / clean_architecture_typescript_example Goto Github PK

View Code? Open in Web Editor NEW
132.0 3.0 17.0 775 KB

This repository provides an implementation (or at least an attempt) of Uncle Bob's Clean Architecture with Typescript.

JavaScript 7.49% TypeScript 90.32% Dockerfile 0.83% Makefile 0.87% Shell 0.49%
clean-architecture solid typescript nodejs clean-code ddd design-patterns unit-of-work identity-map javascript

clean_architecture_typescript_example's Introduction

Clean Architecture with Typescript

This repository provides an implementation (or at least an attempt) of Uncle Bob's Clean Architecture with Typescript.

CleanArchitecture

Basically there is a folder representing each required layer:

  • entities: This folder contains all enterprise business rules. It's represented by domain classes with most critical business rules.
  • use-cases: This folder contains all aplication business rules. It's encapsulated in modules containing the use case interactors and its ports (one specific use case gateway interface and/or one specific use case presenter interface)
  • adapters: This folder contains all kind of code that adapts interfaces most familiar to infrastructure layer to interfaces most familiar do use case layer. For example, sometimes it's needed to adapt one or more data access classes to an specific use case gateway interface.
  • infrastructure: This folder contains all libraries, frameworks and drivers needed by the aplication. It's less important aplication layer, always depending on adapter's layer.

Execution Instructions

To configure and execute this project, the Docker framework was used. And for the database MySQL was chosen.

Initial configurations

On the first stage, it is important to create the database in which store our data for the app.

make database

On the second stage, we will build the required images from Dockerfile/Docker Compose to initialize its contexts(network, port, volume)

make build

After having our database properly created, it is necessary to run a setup. At this point we are executing the migrations, seeds and building the packages we need to run the App.

make setup

Running the App

Finally, after configuring the project, you can start up the project running following command.

make up logs

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.