Code Monkey home page Code Monkey logo

tall-install's Introduction

Tall-Install Banner

Easy command to install the TALL-stack & jumpstart developmentπŸš€

Run Package Tests Run Laravel Tests (Pest) (normal version) Run Laravel Tests (Pest) (DDD-version)

This package provides a simple artisan command for Laravel that can fully scaffold your application and jumpstart development.

It basically runs the installation process for all of your favourite packages, so that you can start developing right away!

⚑️ Check out the release article and subscribe to my newsletter for updates

Demo projects

πŸ‘‰ Check out a demo-project file's structure

πŸ‘‰ Check out a demo-project with an automatically generated Domain-Driven file structure

Features

  1. It runs the regular installation process for your favourite TALL-tools, so that you don't have to πŸš€
  2. Install Pest instead of PHPUnit βš™οΈ
  3. Configure a Domain-Driven file structure (DDD)✨
  4. Install Browsersync for Valet users ⚑️

What does it install?

What can it install?

This package can also do the following things for you:

Roadmap

  • Fortify installation

The intention of this package is to do all the backend installation and not force you into anything frontend-wise.

Missing your favourite package? Feel free to submit an issue or a PR with your proposal.

Contents

  1. Installation & usage
  2. Configure DDD
  3. Install Pest
  4. Install Browsersync

Installation & usage

To get started, you need a plain Laravel installation:

laravel new name
# or
composer create-project laravel/laravel name

Install the package via composer:

composer require ralphjsmit/tall-install

Now run the tall-install command:

php artisan tall-install

# Run this to reindex potential changes in classes.
composer dump-autoload

You can use the following flags to install a particular package.

Note: you can only use this command on a plain Laravel installation. Otherwise I cannot guarantee the correct result.

Configure DDD with tall-install --ddd

You may use the --ddd or -d flag to configure DDD:

php artisan tall-install --ddd

I think this is the most powerful feature, as it rewrites your /app directory to this:

src/Support
     β”œβ”€β”€ App
         β”œβ”€β”€ Console
         β”œβ”€β”€ Exceptions
         β”œβ”€β”€ HTTP
         β”œβ”€β”€ Providers
         β”œβ”€β”€ Application.php
     β”œβ”€β”€ Models
         User.php
     β”œβ”€β”€ View/Components/Layouts
         App.php
         Admin.php
src/Domain
     // Add your own 'domains' here. Domains are where the business logic of the application is.
     β”œβ”€β”€ Invoices...
     β”œβ”€β”€ Customers...
src/App
     // Add your own 'apps' here. Apps are the exposed to the outside (like APIs, a dashboard, a separate admin panel) or are your infrastructure (jobs).
     β”œβ”€β”€ Console
     β”œβ”€β”€ Jobs
     β”œβ”€β”€ Api

For me, once I started using DDD I never wanted anything else. A good reference is the Laravel Beyond CRUD course by Brent Roose.

Install Pest with tall-install --pest

You may use the --pest or -p flag to configure Pest:

php artisan tall-install --pest

Install Browsersync with tall-install --browsersync

You may use the --browsersync or -b flag to configure Browsersync for Laravel Valet:

php artisan tall-install --browsersync

This will append the following code to your webpack.mix.js file:

/* Browsersync configuration with Laravel Valet */
mix.disableSuccessNotifications();

const domain = 'valetDomain.test';
const homedir = require('os').homedir();

mix.browserSync({
    proxy: 'https://' + domain,
    host: domain,
    open: 'external',
    https: {
        key: homedir + '/.config/valet/Certificates/' + domain + '.key',
        cert: homedir + '/.config/valet/Certificates/' + domain + '.crt'
    },
    notify: false, //Disable notifications
})

By default it takes the current folder name as the domain for Valet. You may specify a custom domain with the --url flag:

php artisan tall-install --browsersync --url=custom.test

Cleaning up

You can remove the package from your Composer dependnecies after you've run the tall-install command:

composer remove ralphjsmit/tall-install

General

🐞 If you spot a bug, please submit a detailed issue and I'll try to fix it as soon as possible.

πŸ” If you discover a vulnerability, please review our security policy.

πŸ™Œ If you want to contribute, please submit a pull request. All PRs will be fully credited. If you're unsure whether I'd accept your idea, feel free to contact me!

πŸ™‹β€β™‚οΈ Ralph J. Smit

tall-install's People

Contributors

ralphjsmit avatar dependabot[bot] avatar github-actions[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.