@xf3l1x
f3l1x.io
30.11.2024

Β 

πŸ€·β€β™€οΈ

πŸ‘΄πŸΌπŸ‘΅πŸ»

Contributte
Contributte
  • 8 years of history
  • 199 repositories
  • 28 members
Contributte
Contributte
sentry
sentry-skeleton
service-autoloader
seznamcaptcha
simple-blogger
social
starter-skeleton
tester
tester-skeleton
thepay
thepay-api
thumbator
tracy
translation
ui
ui-skeleton
uniparser
utils
validator
vite
vite-skeleton
webapp-skeleton
webdata
webpack
webpack-skeleton
wordcha
advisories
all
anabelle
aop
api
api-docu
api-router
api-router-skeleton
apitte
apitte-console
apitte-core
apitte-debug
apitte-events
apitte-fullstack
apitte-mapping
apitte-middlewares
apitte-negotiation
apitte-openapi
apitte-presenter
apitte-skeleton
application
bare
benchmarks
blogette
bootstrap
bus
cache
cli-http
code-checker
code-rules
codeception
comgate
commits-site
componette-design
componette-dockerfiles
componette-site
console
console-extra
console-skeleton
contributte
contributte-site
cookbook
crafter
czech-post
database
datagrid
datagrid-elasticsearch-data-source
datagrid-nette-database-data-source
datagrid-skeleton
ddd-skeleton
demo-frankenphp
demo-typesense
dev
di
dockerfiles
doctrine
doctrine-annotations
doctrine-cache
doctrine-dbal
doctrine-extensions-atlantic18
doctrine-extensions-beberlei
doctrine-extensions-knplabs
doctrine-extensions-oroinc
doctrine-extra
doctrine-extra-skeleton
doctrine-fixtures
doctrine-gedmo
doctrine-migrations
doctrine-mongodb
doctrine-odm
doctrine-orm
doctrine-project
doctrine-skeleton
dummy-events
eet
elastica
elasticsearch
embedded-skeleton
event-application-bridge
event-bridges
event-dispatcher
event-dispatcher-extra
event-security-bridge
facebook
fileupload
fio
firewall
fly-response
flysystem
forms
forms-bootstrap
forms-controls
forms-multiplier
forms-wizard
framex
framex-skeleton
ftpdeployer
fx-skeleton
ghpage
gopay
gopay-api
gopay-inline
gopay-simple
gosms
gui-skeleton
guzzlette
http
hydrator
image-storage
imagist
invoice
jsonrpc
kernel
latte
latte-email
latte-formatter
latte-parsedown
latte-parsedown-extra
live-form-validation
logging
mail
mailing
mate
menu-control
messenger
messenger-skeleton
micro-skeleton
microapi
middlewares
mobilni-platby
model
model-specification
monolog
nella
nella-skeleton
neonizer
newrelic
newrelic-tracy
nextras-criteria
nextras-orm-events
nextras-orm-generator
nextras-orm-query-object
ntdb
oauth2-client
oauth2-server
paginator-control
payments-skeleton
pdf
phpdoc
phpless
phpstan
phpunit
planette-micro-site
planette-play-site
planette-site
playground
psr11-container-interface
psr6-caching
psr7-http-message
qa
rabbitmq
reCAPTCHA
redis
replacus
scheduler
security
sentry
sentry-skeleton
service-autoloader
seznamcaptcha
simple-blogger
social
starter-skeleton
tester
tester-skeleton
thepay
thepay-api
thumbator
tracy
translation
ui
ui-skeleton
uniparser
utils
validator
vite
vite-skeleton
webapp-skeleton
webdata
webpack
webpack-skeleton
wordcha
advisories
all
anabelle
aop
api
api-docu
api-router
api-router-skeleton
apitte
apitte-console
apitte-core
apitte-debug
apitte-events
apitte-fullstack
apitte-mapping
apitte-middlewares
apitte-negotiation
apitte-openapi
apitte-presenter
apitte-skeleton
application
bare
benchmarks
blogette
bootstrap
bus
cache
cli-http
code-checker
code-rules
codeception
comgate
commits-site
componette-design
componette-dockerfiles
componette-site
console
console-extra
console-skeleton
contributte
contributte-site
cookbook
crafter
czech-post
database
datagrid
datagrid-elasticsearch-data-source
datagrid-nette-database-data-source
datagrid-skeleton
ddd-skeleton
demo-frankenphp
demo-typesense
dev
di
dockerfiles
doctrine
doctrine-annotations
doctrine-cache
doctrine-dbal
doctrine-extensions-atlantic18
doctrine-extensions-beberlei
doctrine-extensions-knplabs
doctrine-extensions-oroinc
doctrine-extra
doctrine-extra-skeleton
doctrine-fixtures
doctrine-gedmo
doctrine-migrations
doctrine-mongodb
doctrine-odm
doctrine-orm
doctrine-project
doctrine-skeleton
dummy-events
eet
elastica
elasticsearch
embedded-skeleton
event-application-bridge
event-bridges
event-dispatcher
event-dispatcher-extra
event-security-bridge
facebook
fileupload
fio
firewall
fly-response
flysystem
forms
forms-bootstrap
forms-controls
forms-multiplier
forms-wizard
framex
framex-skeleton
ftpdeployer
fx-skeleton
ghpage
gopay
gopay-api
gopay-inline
gopay-simple
gosms
gui-skeleton
guzzlette
http
hydrator
image-storage
imagist
invoice
jsonrpc
kernel
latte
latte-email
latte-formatter
latte-parsedown
latte-parsedown-extra
live-form-validation
logging
mail
mailing
mate
menu-control
messenger
messenger-skeleton
micro-skeleton
microapi
middlewares
mobilni-platby
model
model-specification
monolog
nella
nella-skeleton
neonizer
newrelic
newrelic-tracy
nextras-criteria
nextras-orm-events
nextras-orm-generator
nextras-orm-query-object
ntdb
oauth2-client
oauth2-server
paginator-control
payments-skeleton
pdf
phpdoc
phpless
phpstan
phpunit
planette-micro-site
planette-play-site
planette-site
playground
psr11-container-interface
psr6-caching
psr7-http-message
qa
rabbitmq
reCAPTCHA
redis
replacus
scheduler
security
Contributte
Contributte
I do not like...
I do not likeΒ creating new project
I do not likeΒ creating CRUD
I do not likeΒ creating something again
  • Fast prototyping
  • Low-level files
  • Customize everything
  • Framework independent
  • KISS
Research
Laravel / Symfony
Laravel
.
β”œβ”€β”€ README.md
β”œβ”€β”€ app
β”œβ”€β”€ artisan
β”œβ”€β”€ bootstrap
β”œβ”€β”€ composer.json
β”œβ”€β”€ composer.lock
β”œβ”€β”€ config
β”œβ”€β”€ database
β”œβ”€β”€ package.json
β”œβ”€β”€ phpunit.xml
β”œβ”€β”€ postcss.config.js
β”œβ”€β”€ public
β”œβ”€β”€ resources
β”œβ”€β”€ routes
β”œβ”€β”€ storage
β”œβ”€β”€ stubs
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ tests
β”œβ”€β”€ vendor
└── vite.config.js
Research
Artisan Make
Laravel
➜ php artisan make

Laravel Framework 11.34.2

Available commands for the "make" namespace:
  make:cast                 Create a new custom Eloquent cast class
  make:channel              Create a new channel class
  make:class                Create a new class
  make:command              Create a new Artisan command
  make:component            Create a new view component class
  make:controller           Create a new controller class
  make:enum                 Create a new enum
  make:event                Create a new event class
  make:listener             Create a new event listener class
  make:mail                 Create a new email class
  make:middleware           Create a new HTTP middleware class
  make:migration            Create a new migration file
  make:model                Create a new Eloquent model class
  make:request              Create a new form request class
  make:resource             Create a new resource
  make:rule                 Create a new validation rule
  make:scope                Create a new scope class
  make:seeder               Create a new seeder class
  make:test                 Create a new test class
  make:trait                Create a new trait
  make:view                 Create a new view
Research
Laravel
❯ php artisan make:controller

 β”Œ What should the controller be named? ────────────────────────┐
 β”‚ CoolControler                                                β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

 β”Œ Which type of controller would you like? ────────────────────┐
 β”‚ API                                                          β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

 β”Œ What model should this api controller be for? (Optional) ────┐
 β”‚                                                              β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

   INFO  Controller [app/Http/Controllers/CoolControler.php] created successfully.
Research
Laravel
stubs/
β”œβ”€β”€ cast.inbound.stub
β”œβ”€β”€ cast.stub
β”œβ”€β”€ class.invokable.stub
β”œβ”€β”€ class.stub
β”œβ”€β”€ console.stub
β”œβ”€β”€ controller.stub
β”œβ”€β”€ ...
└── view-component.stub
<?php

namespace {{ namespace }};

class {{ class }}
{
    /**
     * Create a new class instance.
     */
    public function __construct()
    {
        //
    }
}
Research
Symfony
.
β”œβ”€β”€ bin
β”œβ”€β”€ composer.json
β”œβ”€β”€ composer.lock
β”œβ”€β”€ config
β”œβ”€β”€ public
β”œβ”€β”€ src
β”œβ”€β”€ symfony.lock
β”œβ”€β”€ var
└── vendor
Research
Maker Bundle
Symfony
➜ php bin/console make

Symfony 7.1.9 (env: dev, debug: true)

Usage:
  command [options] [arguments]

Available commands for the "make" namespace:
  make:auth                   Create a Guard authenticator of different flavors
  make:command                Create a new console command class
  make:controller             Create a new controller class
  make:crud                   Create CRUD for Doctrine entity class
  make:entity                 Create or update a Doctrine entity class, and optionally an API Platform resource
  make:fixtures               Create a new class to load Doctrine fixtures
  make:form                   Create a new form class
  make:listener               [make:subscriber] Creates a new event subscriber class or a new event listener class
  make:message                Create a new message and handler
  make:migration              Create a new migration based on database changes
  make:schedule               Create a scheduler component
  make:subscriber             Creates a new event subscriber class or a new event listener class
  make:test                   [make:unit-test|make:functional-test] Create a new test class
  make:unit-test              Create a new test class
  make:user                   Create a new security user class
  make:validator              Create a new validator and constraint class
  make:voter                  Create a new security voter class
  make:webhook                Create a new Webhook
Research
Symfony
➜ php bin/console make:controller

 Choose a name for your controller class (e.g. GentleKangarooController):
 > CoolController

 created: src/Controller/CoolController.php


  Success!


 Next: Open your new controller class and add some pages!
Research
Symfony
<?= "<?php\n" ?>

namespace <?= $class_data->getNamespace(); ?>;

<?= $class_data->getUseStatements(); ?>

<?= $class_data->getClassDeclaration(); ?>
{
<?= $generator->generateRouteForControllerMethod($route_path, $route_name); ?>
    public function <?= $method_name ?>(): <?php if ($with_template) { ?>Response<?php } else { ?>JsonResponse<?php } ?>

    {
<?php if ($with_template) { ?>
        return $this->render('<?= $template_name ?>', [
            'controller_name' => '<?= $class_data->getClassName() ?>',
        ]);
<?php } else { ?>
        return $this->json([
            'message' => 'Welcome to your new controller!',
            'path' => '<?= $relative_path; ?>',
        ]);
<?php } ?>
    }
}
src/Resources/skeleton/controller/
β”œβ”€β”€ Controller.tpl.php
└── twig_template.tpl.php
Research
πŸŽ‰πŸ’‘
Crafter
Crafter
➜ crafter
Crafter magic

Usage:
  command [options] [arguments]

Available commands
  craft       Craft classes by defined config
  generate    Generate project by defined template
  init        Create crafter.neon file
Crafter
crafter generate

 β”Œ What project template do you want to use? ───────────────────┐
 β”‚ β€Ί ● Nella project                                            β”‚
 β”‚   β—‹ Nette project                                            β”‚
 β”‚   β—‹ Doctrine project (coming soon)                           β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

 β”Œ Where to create project (folder)? ───────────────────────────┐
 β”‚ test                                                         β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Project
Crafter
  1. composer install
  2. make dev
  3. open browser
Project
test/
β”œβ”€β”€ Makefile
β”œβ”€β”€ README.md
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ Bootstrap.php
β”‚   └── UI
β”‚       β”œβ”€β”€ @Templates
β”‚       β”‚   └── @layout.latte
β”‚       β”œβ”€β”€ BasePresenter.php
β”‚       └── Home
β”‚           β”œβ”€β”€ HomePresenter.php
β”‚           └── Templates
β”‚               └── default.latte
β”œβ”€β”€ composer.json
β”œβ”€β”€ config
β”‚   β”œβ”€β”€ config.neon
β”‚   └── local.neon.example
β”œβ”€β”€ phpstan.neon
β”œβ”€β”€ ruleset.xml
β”œβ”€β”€ var
β”‚   β”œβ”€β”€ log
β”‚   └── tmp
└── www
    └── index.php
Crafter
crafter generate

 β”Œ What project template do you want to use? ───────────────────┐
 β”‚   β—‹ Nella project                                            β”‚
 β”‚ β€Ί ● Nette project                                            β”‚
 β”‚   β—‹ Doctrine project (coming soon)                           β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

 β”Œ Where to create project (folder)? ───────────────────────────┐
 β”‚ test                                                         β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Project
Craft
❯ crafter craft

 β”Œ What data structure do you want to craft? ───────────────────┐
 β”‚                                                              β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Crafter

❌

Crafter
Config
➜ crafter init

 β”Œ What application directory do you want to use? ──────────────┐
 β”‚ src                                                          β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

 β”Œ What root namespace do you want to use? ─────────────────────┐
 β”‚ App                                                          β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

 β”Œ What preset do you want to use? ─────────────────────────────┐
 β”‚ nette web application                                        β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

 β”Œ Do you want to data structure example? ──────────────────────┐
 β”‚ Yes example                                                  β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜



 [OK] crafter.neon file has been created
Crafter
# crafter.neon

version: 1

dir: src

namespace: App

preset: nette

data:
	user:
		fields:
			username: {type: string}
			email: {type: string}
Config
Craft
# crafter.neon

version: 1

dir: src

namespace: App

preset: nette

data:
	user:
		fields:
			username: {type: string}
			email: {type: string}
.
β”œβ”€β”€ crafter.neon
└── src
    └── UI
        └── User
            β”œβ”€β”€ Templates
            β”‚   └── default.latte
            └── UserPresenter.php
➜ crafter craft -k user
Crafter
Crafter
Craft
# crafter.neon

version: 1

dir: src

namespace: App

preset: nette

data:
	user:
		fields:
			username: {type: string}
			email: {type: string}
.
β”œβ”€β”€ crafter.neon
└── src
    └── UI
        └── User
            β”œβ”€β”€ Templates
            β”‚   └── default.latte
            └── UserPresenter.php
➜ crafter craft -k user
# preset=nette

crafters:
	presenter:
		input: '%cwd%/templates/presenter/presenter.latte'
		output: '{$namespace}/UI/{$name|firstUpper}\{$name|firstUpper}Presenter.php'
	presenter_template:
		input: '%cwd%/templates/presenter/template.latte'
		output: 'UI/{$name|firstUpper}/Templates/default.latte'
Craft
# crafter.neon

version: 1

dir: src

namespace: App

preset: nette

data:
	user:
		fields:
			username: {type: string}
			email: {type: string}
.
β”œβ”€β”€ crafter.neon
└── src
    └── UI
        └── User
            β”œβ”€β”€ Templates
            β”‚   └── default.latte
            └── UserPresenter.php
➜ crafter craft -k user
# preset=nette

crafters:
	presenter:
		input: '%cwd%/templates/presenter/presenter.latte'
		output: '{$namespace}/UI/{$name|firstUpper}\{$name|firstUpper}Presenter.php'
	presenter_template:
		input: '%cwd%/templates/presenter/template.latte'
		output: 'UI/{$name|firstUpper}/Templates/default.latte'
Overtemplating
Crafter
Craft
# crafter.neon

version: 1

dir: src

namespace: App

preset: nette

data:
	user:
		fields:
			username: {type: string}
			email: {type: string}
# preset=nette

crafters:
	presenter:
		input: '%cwd%/templates/presenter/presenter.latte'
		output: '{$namespace}/UI/{$name|firstUpper}\{$name|firstUpper}Presenter.php'
	presenter_template:
		input: '%cwd%/templates/presenter/template.latte'
		output: 'UI/{$name|firstUpper}/Templates/default.latte'
# presenter.latte

<?php declare(strict_types = 1);

namespace {$ctx->class->namespace};

use {$ctx->class->rootNamespace}\UI\BasePresenter;

class {$ctx->class->className} extends BasePresenter
{
}
Crafter
# UserPresenter.php
<?php declare(strict_types = 1);

namespace MyApp\UI\User;

use MyApp\UI\BasePresenter;

class UserPresenter extends BasePresenter
{
}
Craft
# crafter.neon

version: 1

dir: src

namespace: App

preset: nette

data:
	user:
		fields:
			username: {type: string}
			email: {type: string}
# preset=nette

crafters:
	presenter:
		input: '%cwd%/templates/presenter/presenter.latte'
		output: '{$namespace}/UI/{$name|firstUpper}\{$name|firstUpper}Presenter.php'
	presenter_template:
		input: '%cwd%/templates/presenter/template.latte'
		output: 'UI/{$name|firstUpper}/Templates/default.latte'
# default.latte
{block #content}

<div>
	Hello {{=date('d.m.Y')}}!
</div>
Crafter
{block #content}

<div>
	Hello 30.11.2024!
</div>
Crafter
Craft
# crafter.neon

version: 1

dir: app

namespace: App

preset: fx

data:
	user:
		fields:
			username: {type: string}
			email: {type: string}
app
β”œβ”€β”€ Api
β”‚   └── User
β”‚       β”œβ”€β”€ Create
β”‚       β”‚   β”œβ”€β”€ CreateUserController.php
β”‚       β”‚   β”œβ”€β”€ CreateUserRequest.php
β”‚       β”‚   β”œβ”€β”€ CreateUserRequestBody.php
β”‚       β”‚   └── CreateUserResponse.php
β”‚       β”œβ”€β”€ Delete
β”‚       β”‚   β”œβ”€β”€ DeleteUserController.php
β”‚       β”‚   β”œβ”€β”€ DeleteUserRequest.php
β”‚       β”‚   └── DeleteUserResponse.php
β”‚       β”œβ”€β”€ Get
β”‚       β”‚   β”œβ”€β”€ GetUserController.php
β”‚       β”‚   β”œβ”€β”€ GetUserRequest.php
β”‚       β”‚   └── GetUserResponse.php
β”‚       β”œβ”€β”€ List
β”‚       β”‚   β”œβ”€β”€ ListUserController.php
β”‚       β”‚   β”œβ”€β”€ ListUserFilter.php
β”‚       β”‚   β”œβ”€β”€ ListUserRequest.php
β”‚       β”‚   └── ListUserResponse.php
β”‚       └── Update
β”‚           β”œβ”€β”€ UpdateUserController.php
β”‚           β”œβ”€β”€ UpdateUserRequest.php
β”‚           β”œβ”€β”€ UpdateUserRequestBody.php
β”‚           └── UpdateUserResponse.php
└── Domain
    └── User
        β”œβ”€β”€ CreateUserCommand.php
        β”œβ”€β”€ CreateUserHandler.php
        β”œβ”€β”€ Database
        β”‚   β”œβ”€β”€ User.php
        β”‚   └── UserRepository.php
        β”œβ”€β”€ DeleteUserCommand.php
        β”œβ”€β”€ DeleteUserHandler.php
        β”œβ”€β”€ GetUserCommand.php
        β”œβ”€β”€ GetUserHandler.php
        β”œβ”€β”€ ListUserCommand.php
        β”œβ”€β”€ ListUserHandler.php
        β”œβ”€β”€ UpdateUserCommand.php
        └── UpdateUserHandler.php
<?php

declare(strict_types=1);

namespace App\Domain\User;

readonly class CreateUserCommand
{

	public function __construct(
		public string $username,
		public string $email,
	) {
	}

}
# Local
composer require contributte/crafter

# Global binary
composer global require contributte/crafter

# PHAR
curl github.com -o crafter.phar
  • Generate project
  • Generate classes
  • Custom templates
  • Configure via NEON
  • Templating via Latte
  • Framework independent
Recap
Recap
I do not like...
  1. creating new project
  2. creating CRUD
  3. creating something again
  • Generate project
  • Generate classes
  • Custom templates
  • Configure via NEON
  • Templating via Latte
  • Framework independent
Recap + AI
Recap + AI
crafter craft --witch
crafter craft --witch --ui
crafter craft --ui

Time to selfie πŸ“·

Thank you!

@xf3l1x
f3l1x.io

2024-30-11 - PoSobota + Nette + Contributte

By Milan Felix Ε ulc

2024-30-11 - PoSobota + Nette + Contributte

  • 14