1.0.14 • Published 2 years ago

do-ddd v1.0.14

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

do-ddd

do-ddd is a command-line tool designed to automate domain driven design abstractions on code. It generates scaffolding for your DDD-based Node.js projects. It can - 1. Generate scaffolding for Controller and UseCase files based on RequestType and ResponseType files.

Features

  1. Analyzes user-defined Request and Response Types and generates corresponding UseCase and Controller files.
  2. TypeScript compatible.
  3. Utilizes AST manipulation for smart code generation.

How to Install

You can install do-ddd globally using npm:

npm install -g do-ddd

Usage

Once installed, you can use the do-ddd command to generate the necessary files. Here's how it works:

  1. Defined your Request and Response Types
    • I[SomethingSomething]Request.ts
    • I[SomethingSomething]Response.ts

IAuthenticationRequest.ts

export const IAuthenticationRequest = {userEmail: String, password: String}

IAuthenticationResponse.ts

export const IAuthenticationResponse = {authCode: String}
  1. Run the following command in the directory containing these files:
do-ddd generate

This will create:

  • [SomethingSomething]UseCase.ts
  • [SomethingSomething]Controller.ts

Development

To contribute or modify the project, you can clone the repository and install the dependencies:

git clone https://github.com/josharsh/do-ddd.git
cd do-ddd
npm install

Build the project:

npm run build

Link the project for local testing:

npm run link

License

This project is licensed under the ISC License. See the LICENSE file for details.

Author

josharsh

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago