Code Monkey home page Code Monkey logo

node-ddd-boilerplate's Introduction

Node.js DDD api boilerplate

My custom nodejs boilerplate, following the Clean Architecture and DDD principles.

Main Technologies

  • Nodejs - Javascript runtime.
  • Awilix - Dependency Injection and Inversion of Control framework.
  • Express - HTTP server framework.
  • Winston - Centralizing and transporting log streams.
  • Joi - Schema validations.
  • Structure - Used for defining domain entities attributes.
  • Fejl - Error Handling
  • Jest - Testing framework.
  • Supertest - Used to test http endpoints and features.
  • Swagger - Documentation with openApi specifications.

Project Setup

Before running the project, check if you have Nodejs 14.0.> installed and remember to set the environment variables by creating a .env file following the env.copy example.

  • Install node modules

    $ npm install
  • Run project in development mode with hot-reload

    $ npm run dev
  • Start the application

    $ npm start
  • Run unit tests

    $ npm run test:unit
  • Run features tests

    $ npm run test:features

After running the server, you can find the api docs at http://localhost:{APP_PORT}/api/docs/

Todo:

  • Create repo and readme.
  • Add awilix DI Container
  • Add express server interface
  • Add logger infrastructure
  • Add Swagger middleware
  • Add http client integration example
  • Add Error classes with fejl
  • Add jest unit config
  • Add jest features config
  • Add 100% test coverage
  • Add Changelog.md file
  • Add License file

node-ddd-boilerplate's People

Contributors

gabrielsp92 avatar

Stargazers

 avatar Gabriel Francioli avatar  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.