Coder Social home page Coder Social logo

node-ddd's Introduction

Node DDD Boilerplate

RESTful API and Serverless-ready (TBD) with Domain Driven Design

Node-ddd-develop Actions Status

What is DDD (Domain Driven Design)?

Domain driven design (DDD) is an approach to software design that values simplicity and modeling code as closely to the business domain as possible. This results in code that can be easily understood by the business and evolved as the needs of the business domain change.

By isolating domain code away from all other concerns of the system like infrastructure, security, transportation, serialization etc; the complexity of the system grows only as large as the complexity of the business or problem domain itself.

Overview

  • uses Node.js > v8
  • written using ES6
  • uses NPM for package dependency management
  • uses JavaScript Standard Style
  • uses sequelize and sequelize-cli as ORM and data migration tool
  • Filename convention are camelCase and kebab-case.

Development Environment Setup

Make sure you have npm, and at least node v12.x

Note:

If you need database connectivity, PostgreSQL and MySQL is supported by default as it uses sequelize as ORM.

Installation

  1. Clone the repository with git clone --depth=1 https://github.com/ricomonster/node-ddd.git
  2. Install the dependencies with NPM. It is installed by default with Node.
  3. Install global dependencies Application Setup.
  4. Create the development and test Databases.
  5. Run database migrations and seed with npm run db:migrate.
  6. Run the application in development mode with npm run start:http.
  7. Access http://localhost:<PORT> and you're ready to go!

Application Setup (Development)

$ npm install -g standard   # JavaScript Standard Style
$ npm install -g sequelize-cli  # CLI for Sequelize
$ npm install -g pg mysql2 # Database

Database Setup (Development)

  1. Install either Postgres 12.4 or MySQL 5.x.
  2. Create an empty database according to your preference.
  3. Rename the .env and populate it with the correct credentials and settings of your preferred database.

Acknowledgments

This boilerplate is inspired from node-api-boilerplate

node-ddd's People

Contributors

ricomonster 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.