Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

PHPNomad Core Recipes

Core scaffolding recipes for PHPNomad applications. Consumed by phpnomad/cli via composer-based kit discovery.

Installation

composer require phpnomad/core-recipes --dev

The CLI auto-discovers any installed package whose composer.json declares extra.phpnomad.recipes. After installation, phpnomad recipes:list will show the recipes provided by this kit.

Usage

Each recipe is referenced as phpnomad/<recipe-name>:

phpnomad make --from=phpnomad/datastore '{"name":"Order","initializer":"App\\AppInit"}'
phpnomad make --from=phpnomad/listener '{"name":"SendWelcomeEmail","event":"App\\Events\\UserCreated","initializer":"App\\AppInit"}'

Recipes provided

RecipePurpose
phpnomad/builderFluent builder constructing a validated product object
phpnomad/commandCLI command class
phpnomad/controllerREST controller
phpnomad/database-datastoreDatastore backed by a database table (composes datastore + table + database-handler)
phpnomad/database-handlerDatabase handler implementation for a datastore
phpnomad/datastoreDatastore with interface and handler interface
phpnomad/eventEvent class
phpnomad/facadeFacade proxying an interface
phpnomad/factoryOne-way factory constructing a model from raw data
phpnomad/graphql-typeGraphQL type definition
phpnomad/initializerInitializer class
phpnomad/listenerEvent listener
phpnomad/modelData model class
phpnomad/model-adapterAdapter converting between two model representations
phpnomad/mutationMutation handler
phpnomad/pipelinePipeline pattern: payload, processor interface, and runner
phpnomad/providerProvider interface + implementation supplying configuration or context
phpnomad/registryLazy registry pattern: registry, initiated event, core-items handler, provider
phpnomad/serviceBusiness-logic service orchestrating collaborators
phpnomad/strategyStrategy interface + swappable platform implementation
phpnomad/tableDatabase table schema
phpnomad/taskTask class
phpnomad/task-handlerTask handler

Authoring your own kit

Any composer package can ship recipes by declaring them in composer.json:

{
"extra": {
"phpnomad": {
"recipes": "path/to/recipes/",
"templates": "path/to/templates/"
}
}
}

Recipes inside the kit are referenced as <your-vendor>/<recipe-name>.

License

MIT

About

Core scaffolding recipes for PHPNomad — datastores, controllers, listeners, events, tables, and more. Consumed by phpnomad/cli via composer-based kit discovery.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages