ddd_pod_cli library
ddd_pod_cli — Professional DDD + Riverpod + Freezed Code Generator.
This barrel file exports the public API surface used by both the CLI entry point and the test suite.
Classes
- CodeGenerator
- Generates all DDD layer source files for a single feature and writes them to the provided directory map.
- CoreModelsRegistry
- Holds a registry of class names → relative import paths for core types.
- CurlParser
- Parses and executes cURL commands.
- CurlRequest
- Represents a parsed cURL request.
- DddLogger
-
A thin façade over
mason_logger.Loggerwith domain-specific helpers. - DirectoryScaffolder
- Scaffolds the DDD directory structure for a single feature.
- DomainClass
- Describes a generated Freezed domain model class.
- DomainField
- Describes a single field in a generated Freezed domain model.
- DtoClass
- Describes a generated Freezed DTO class (response or request).
- DtoField
- Describes a single field in a generated Freezed DTO class.
- FeatureConfig
- Represents a fully validated feature configuration.
- JsonParser
- Parses JSON schemas into DTO and domain class descriptors.
- Keywords
- Utility for detecting and escaping Dart reserved keywords.
- Runner
- Runs external Dart / Flutter tooling processes.
- StringUtils
- A collection of string transformation helpers.
Enums
- HttpMethod
- Valid HTTP methods the CLI recognises.
- ProviderType
- Valid Riverpod provider types.
Functions
-
runCurlCommand(
{required String curlCommand, required String featureName, required bool force, required bool skipBuildRunner, required bool withDebugView, String? providerType}) → Future< void> - Executes a live cURL request and scaffolds a DDD feature from the response.
-
runDeleteCommand(
{required String featureName, required bool skipBuildRunner, bool dryRun = false}) → Future< void> -
Deletes all generated DDD directories for
featureName. -
runGenerateCommand(
{required String configPath, required bool force, required bool skipBuildRunner, required bool withDebugView}) → Future< void> - Runs the full generate flow from a config file path.
-
runInitCommand(
{String outputDir = '.'}) → Future< void> -
Writes a well-documented template
config.jsontooutputDir. -
runVersionCommand(
) → void - Prints the current CLI version to stdout.
Typedefs
- DddProgress = Progress
-
Convenience typedef so call-sites can write
Progresswithout importing mason_logger directly.
Exceptions / Errors
- BuildRunnerException
-
Thrown when
dart run build_runner buildexits with a non-zero code or fails to start. - ConfigException
- Thrown when the JSON config file is missing, malformed, or contains invalid field values (e.g. unknown provider_type, empty feature_name).
- DddCliException
- Base class for all CLI-level exceptions.
- DddFileSystemException
- Thrown when a file or directory cannot be created, read, or written — e.g. due to missing permissions or a full disk.
- DependencyException
- Thrown when the target project is missing required pub dependencies.
- NetworkException
- Thrown by the cURL flow when the HTTP request fails — e.g. due to a connection timeout, a non-2xx status code, or a response that is too large.
- SchemaParseException
- Thrown when the JSON response / request schema cannot be parsed — e.g. because of a cyclic reference or a schema that exceeds the maximum supported nesting depth.