zuma/aztec

Adds Action Domain Component Markdown pattern to Laravel 5.8 and above.

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:CSS

Type:package

v1.0.1 2019-03-04 15:23 UTC

README

Action Domain Component Markdown package for Laravel 5.8 and above.

This package turns your new Laravel 5.8.* installation into a full ADCM application complete with generators and authentication scaffolding.

You can learn more about ADR and why we think it's far superior to MVC at the ADR repository.

You can also use the pre-built version of Zuma at: zuma.lution.io

IMPORTANT

This package is for new installations of Laravel 5.8.* only, installing this into an existing application will destroy all your previous work.

YOU'VE BEEN WARNED!

Zuma will completely remove your existing app directory and replace it with a beautifully designed ADR directory structure that makes it drop dead simple to understand and locate your files, all while keeping the principles of ADR intact.

The beginning scaffolding will give you a structure like this:

app
├── Actions
│   ├── Account
│   │   ├── SettingEditAction.php
│   │   └── SettingUpdateAction.php
│   ├── Auth
│   │   ├── LoginShowAction.php
│   │   ├── LoginStoreAction.php
│   │   ├── LogoutAction.php
│   │   └── ...
│   ├── Dashboard
│   │   └── IndexAction.php
│   └── PageAction.php
├── Domain
│   ├── Console
│   ├── Contracts
│   ├── Entities
│   ├── Exceptions
│   ├── Middleware
│   ├── Payloads
│   ├── Providers
│   ├── Repositories
│   ├── Requests
│   ├── Services
│   ├── Traits
│   └── Kernel.php
└── Responders
    ├── Account
    ├── Auth
    └── Dashboard
        └── IndexResponder.php

We didn't expand all the directories for the sake of brevity, but you can see the idea here.

All of your business logic now exists ONLY within your Domain directory, which allows for clean Separation of Concerns delegating all HTTP related tasks to your Action, and all HTTP Response tasks to your Responders.

No more muddy controllers doing far more work than they should be.

Installation

First install a new laravel installation in your Code directory or wherever you keep your dev apps.

laravel new web

Once Laravel is installed we need to generate a key, and we'll link our storage directory since we need that support later.

cd web
php artisan key:generate
php artisan storage:link

Next let's download Zuma Aztec.

composer require zuma/aztec

Make sure that the zuma/aztec service provider is discovered in the package auto-discovery message.

Now let's install Aztec.

php artisan aztec:install

You should now see the new directory structure inside of the app directory, and all the needed files have had path and namespace changes implemented where needed.

Next let's install our assets and resources.

npm install

This will take a couple minutes to run. Then we can build our css and javascript, move image files etc.

npm run dev

You should now be able to view the default site in homestead or valet, or boot up a local server via php artisan serve and view the app at localhost:8000

Useage

Coming soon ...