
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
An Angular schematic for generating Domain-Driven Design (DDD) folder structures and conventions in your Angular applications.
ng-ddd streamlines your development workflow by scaffolding a complete, feature-rich domain structure with a single command. It handles everything from creating data-access layers and use-cases to generating feature components and automatically configuring TypeScript paths.
Manually setting up a proper Domain-Driven Design architecture in Angular can be tedious and error-prone. ng-ddd solves this by:
tsconfig.json paths to make your domain modules easily importable.data, features, ui, and utils.Create, Read, Update, and Delete use-cases and their corresponding components.tsconfig.json to include alias paths like @domain/* for clean imports.The recommended way to install ng-ddd is by using the ng add command. This will automatically add the package to your project, install dependencies, and update your tsconfig.json.
ng add ng-ddd
You can also install the package manually via npm:
npm install ng-ddd --save-dev
After installation, you'll need to add the domain paths to your tsconfig.json file yourself:
{
"compilerOptions": {
"paths": {
"@domain/*": ["./src/app/domains/*"],
"@shared/*": ["./src/app/shared/*"]
}
}
}
To generate a new domain, run the ng generate (or g) command with the ng-ddd:domain schematic.
ng g ng-ddd:domain
Note: You can also use the alias
dddinstead ofdomain.
The schematic will then prompt you for:
products, orders, users)create,read,read-one,update,delete.Based on your inputs, ng-ddd will generate a comprehensive folder structure like this:
domains/
└── domain-name/
├── data/
│ ├── models/
│ │ └── model.ts
│ ├── repositories/
│ │ └── repo.ts
│ ├── services/
│ │ └── service.ts
│ ├── use-cases/
│ │ ├── create/
│ │ │ └── create.usecase.ts
│ │ ├── delete/
│ │ │ └── delete.usecase.ts
│ │ ├── read/
│ │ │ └── read.usecase.ts
│ │ ├── read-one/
│ │ │ └── read-one.usecase.ts
│ │ └── update/
│ │ └── update.usecase.ts
│ └── public.api.ts
├── features/
│ ├── page/
│ │ ├── page.component.ts
│ │ ├── page.component.html
│ │ └── page.component.scss
│ ├── domain-name-list/
│ │ ├── domain-name-list.component.ts
│ │ ├── domain-name-list.component.html
│ │ └── domain-name-list.component.scss
│ ├── domain-name-details/
│ │ ├── domain-name-details.component.ts
│ │ ├── domain-name-details.component.html
│ │ └── domain-name-details.component.scss
│ ├── delete-domain-name/
│ │ ├── delete-domain-name.component.ts
│ │ ├── delete-domain-name.component.html
│ │ └── delete-domain-name.component.scss
│ └── domain-name-edit/
│ ├── domain-name-edit.component.ts
│ ├── domain-name-edit.component.html
│ └── domain-name-edit.component.scss
├── ui/
│ └── (shared UI components)
├── utils/
│ └── (utility functions/helpers)
└── domain-name.routes.ts
After generating the files, the schematic will automatically run Prettier to format the code, so you're ready to start developing immediately!
FAQs
A blank schematics
We found that ng-ddd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.