Socket
Book a DemoInstallSign in
Socket

do-ddd

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

do-ddd

Automates some of the Domain Driven Design pieces for faster development

1.0.14
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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 -

  • Generate scaffolding for Controller and UseCase files based on RequestType and ResponseType files.

Features

  • Analyzes user-defined Request and Response Types and generates corresponding UseCase and Controller files.
  • TypeScript compatible.
  • 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:

  • 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}
  • 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

Keywords

Domain

FAQs

Package last updated on 18 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.