cnd/ddd-maker-bundle

A Symfony bundle that automates the generation of Domain-Driven Design (DDD) code artifacts, including commands, queries, handlers, controllers, API documentation, tests, and more. This bundle provides console commands to quickly scaffold DDD classes for your Symfony projects, following the CQRS (Command Query Responsibility Segregation) pattern.

https://github.com/coundia/ddd-maker-bundle

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary

Keywords

bundle coundia ddd maker symfony
Last synced: 6 months ago · JSON representation ·

Repository

A Symfony bundle that automates the generation of Domain-Driven Design (DDD) code artifacts, including commands, queries, handlers, controllers, API documentation, tests, and more. This bundle provides console commands to quickly scaffold DDD classes for your Symfony projects, following the CQRS (Command Query Responsibility Segregation) pattern.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
bundle coundia ddd maker symfony
Created 12 months ago · Last pushed 11 months ago
Metadata Files
Readme Citation

README.md

DDD/CQRS Maker Bundle

A Symfony bundle that automates the generation of Domain-Driven Design (DDD) code artifacts, including commands, queries, handlers, controllers, API documentation, tests, and more. This bundle provides console commands to quickly scaffold DDD classes for your Symfony projects, following the CQRS (Command Query Responsibility Segregation) pattern.

Features

  • Generate Commands and Handlers from a given entity.
  • Generate Queries and Handlers from a given entity.
  • Generate Repositories, Factories, Mappers, Value Objects, and Aggregates.
  • Support for Symfony Messenger to handle DDD commands and queries.
  • Use skeleton templates to customize generated code.
  • Easily integrate with any Symfony project.

Installation

1. Require the Bundle

If you're developing locally, add a path repository in your project's composer.json:

json { "repositories": [ { "type": "path", "url": "../ddd-maker-bundle" } ], "require": { "cnd/ddd-maker-bundle": "*" } }

Then run:

bash composer require cnd/ddd-maker-bundle --dev

2. Enable the Bundle

If you are using Symfony Flex, the bundle is auto-registered. Otherwise, add the following to your config/bundles.php:

php return [ // ... Cnd\DddMakerBundle\DddMakerBundle::class => ['all' => true], ];

Usage

Run the following command to see the available DDD generator commands:

bash php bin/console list make

1. Generate a Full CQRS Structure

To generate a complete CQRS structure for an entity, use:

bash php bin/console make:ddd-full YourEntity

⚠️ Note: The entity must exist in App\Entity\YourEntity and have constructor and getters / setters.

2. Generate a Query

To generate a query and its handler:

bash php bin/console make:ddd-query YourEntity QueryName Parameter

```

3. Generate a Command

To generate a command and its handler:

bash php bin/console make:ddd-command YourEntity Action

4. Inspect the Generated Code

After running the commands, you can check the generated structure:

EXAMPLE FOR Entity Wallet

Create files (not overwrite)

php bin/console make:ddd-full Wallet --force false

Create files for Command

php bin/console make:ddd-command Wallet UpdatePhone 1. created: src/Core/Application/Command/UpdatePhoneWalletCommand.php 2. created: src/Core/Application/CommandHandler/UpdatePhoneWalletCommandHandler.php 3. created: src/Core/Presentation/Controller/UpdatePhoneWalletController.php 4. created: tests/Functional/Wallet/UpdatePhoneWalletCommandControllerTest.php

  • Custom it ## Create files for Query php bin/console make:ddd-query Wallet find phoneNumber
  • created: src/Core/Application/Query/FindByPhoneNumberWalletQuery.php
  • created: src/Core/Application/QueryHandler/FindByPhoneNumberWalletQueryHandler.php
  • created: src/Core/Presentation/Controller/FindByPhoneNumberWalletController.php
  • created: tests/Functional/Wallet/FindByPhoneNumberWalletQueryControllerTest.php

  • Custom it

Api doc

http://127.0.0.1:8000/api/docs

Run tests

php bin/phpunit

remark (Requis)

  1. Only field in constructor is checked ,
  2. Add all setters and getters

For more

docs/usage.md

starter

https://github.com/coundia/ddd-maker-bundler-starter

Owner

  • Name: coundia
  • Login: coundia
  • Kind: user
  • Location: DAKAR
  • Company: Devalto

Full Stack Developer Java/Php/Js #Love Figma

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: software
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Papa
    family-names: Coundia
    name-particle: Papa
    email: papacoundia@gmail.com
license: CC-BY-NC-SA-4.0

GitHub Events

Total
  • Push event: 9
  • Create event: 5
Last Year
  • Push event: 9
  • Create event: 5

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 11
  • Total Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 11
  • Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
pcoundia p****a@g****m 11

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • packagist 29 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
packagist.org: cnd/ddd-maker-bundle

A Symfony MakerBundle extension to generate DDD, Command and Query from an entity

  • License: CC-BY-NC-SA-4.0
  • Latest release: v1.0.2
    published 11 months ago
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 29 Total
Rankings
Dependent packages count: 17.5%
Dependent repos count: 29.9%
Average: 45.1%
Downloads: 88.0%
Maintainers (1)
Funding
Last synced: 6 months ago