Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>DDD + HexStructNew to Visual Studio Code? Get it now.
DDD + HexStruct

DDD + HexStruct

mrh0wl

|
19 installs
| (0) | Free
Generate customizable DDD + Hexagonal Architecture structures for various languages.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DDD + Hexagonal Architecture Generator for VS Code

Overview

The DDD + Hexagonal Architecture Generator is a VS Code extension designed to streamline the creation of Domain-Driven Design (DDD) and Hexagonal Architecture structures. It allows developers to easily scaffold projects with customizable folder and subfolder configurations tailored to specific features.


Features

  • Customizable Folder Structure:

    • Select core folders such as domain, infrastructure, application, presentation, and shared.
    • Define subfolders for each core folder (e.g., Entities, Repositories, Controllers).
  • Feature-Oriented Organization:

    • Add feature-specific folders for modular development.
  • Default Configuration:

    • Automatically generates a .dddconfig.json file with default settings if it does not exist.
  • Interactive Prompts:

    • Guides users to select features, folders, and subfolders with an intuitive interface.
  • Reusable Boilerplate:

    • Generates mod.rs boilerplate files for Rust projects.

Installation

  1. Install the extension from the VS Code marketplace or clone this repository.
  2. Open your project in VS Code.

Usage

1. Generate DDD Structure

  1. Right-click on a folder in the VS Code Explorer.
  2. Select "Generate DDD + Hexagonal Structure".
  3. Follow the interactive prompts:
    • Feature Name: Optionally provide a feature name to create a scoped structure.
    • Select Folders: Choose which folders to include (e.g., domain, application).
    • Configure Subfolders: Customize subfolders for each selected folder.

2. Customize .dddconfig.json

The .dddconfig.json file allows you to define default settings:

{
  "version": "1.0.0",
  "defaultFolders": ["domain", "infrastructure", "application", "presentation", "shared"],
  "templates": {}
}

3. Add a Feature

  • During the structure generation process, you can specify a feature name. If provided, the structure will be created under this feature folder, allowing for modular organization.
  • Example: If you enter user_management as the feature name, the resulting structure will look like:
src/
├── user_management/
│   ├── domain/
│   │   ├── entities/
│   │   ├── valueobjects/
│   │   ├── repositories/
│   │   ├── services/
│   │   └── mod.rs
│   ├── infrastructure/
│   │   ├── database/
│   │   ├── repositories/
│   │   ├── datasources/
│   │   └── mod.rs
│   ├── application/
│   │   ├── usecases/
│   │   ├── dtos/
│   │   ├── validators/
│   │   └── mod.rs
│   ├── presentation/
│   │   ├── controllers/
│   │   ├── routes/
│   │   └── mod.rs
│   ├── shared/
│   │   ├── services/
│   │   ├── utilities/
│   │   ├── validators/
│   │   └── mod.rs
│   └── mod.rs

Note: This approach is optional and can be disabled by leaving the feature name empty. Is ideal for modular development and feature-oriented organization, enabling separation of concerns and scalability.

Configuration Options

  • Default Folders: Specify the core folders to include in the structure, such as domain, infrastructure, application, presentation, and shared.
  • Templates: Define subfolders for each core folder (e.g., Entities, Repositories, Controllers).
  • Feature Name: Optionally provide a feature name to create a scoped structure for modular development.
  • Mod.rs Files: Automatically generate mod.rs files for Rust projects.
  • Interactive Prompts: Guide users to select features, folders, and subfolders with an intuitive interface.
  • Reusable Boilerplate: Generate reusable boilerplate files for Rust projects.
  • Feature-Oriented Organization: Add feature-specific folders for modular development.
  • Default Configuration: Automatically generate a .dddconfig.json file with default settings if it does not exist.
  • Customizable Folder Structure: Choose and configure core folders and their subfolders.
  • Scalability: Enable separation of concerns and scalability through modular development.

License

This project is licensed under the MIT License.


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft