Skip to content

GoodM4ven/lara-stacker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

بسم الله الرحمن الرحيم

Introduction

Laravel Sail's DevContainer setup is great, except when it relies on VSC and some weird extensions to keep up with; let alone Docker not outsmarting everybody! Meanwhile, I might as well just do my TALL stack development locally...

With this setup, one doesn't have to worry about the things I've mentioned, in addition to gaining the following advantages too:

  • Performance boost on potatops.
  • Running multiple sites at the same time and developing simultaneously, which is crazy creative when it comes to simple ideas here and there!
  • Customizations such as SSL and 3rd party tools integration is way easier if you deal with it locally; and doesn't necessarily mean that you'd have a messy setup if every operation is managed through an organized script.
  • Packages, and native apps development soon enough, are just natural when having most of the tools installed out of boxes!

And, yes, these are valid reasons considering that Laravel itself created Herd AFTER I started this pro- kidding, but for the record, I was actually first- just to offer this sort of setup on MacOS of all things! And then they ported it to bloody Windows. And when they're asked about Linux, they raised a huge middle f-lag. (╬ Ò﹏Ó)

Tech Stack List

Installation

  • Extract the scripter somewhere and navigate into it:

    cd ~/Downloads && unzip ./lara-stacker-x.x.x.zip -d ./ && cd lara-stacker-x.x.x
  • Create a [.env] file from the [.env.example] one and fill in its content; replacing the <placeholders>.

    cp .env.example .env && nano .env
  • Run the script with super-user permissions:

    chmod +x ./lara-stacker.sh && sudo ./lara-stacker.sh
  • Choose to setup your Ubuntu environment first, which will install everything necessary for local Laravel development, and eventually create a [done-setup.flag] file in the directory.

  • Then choose to either:

    • Create a TALL project through its management section, then continue onwards with the installed TALL-Stacker package via its Artisan command (soon™).
    • Or just create a raw Laravel one, instead.
    • You can also import an already existing project into the same TALL setup.

That's it. You'll have your first project accessible in the end (displaying the site's URL too). And just praise Allah instead of wasting the waiting time! :)

Note

If you want to debug the process or display all output during the scripts, change the LOGGING_LEVEL variable in your [.env] file.

Notes

Opinionated Modifications

  • curl -fsSL https://bun.sh/install | bash
  • bun add -g @withgraphite/graphite-cli@stable
  • ln -s $projects_directory/ (Creating a shortcut for [/var/www/html] directory in a [~/Code] directory)
  • sudo mkdir $projects_directory/.packages (Creating a [/var/www/html/.packages] directory)
  • sudo cp $lara_stacker_dir/files/.opinionated/project.code-workspace ./$escaped_project_name.code-workspace (Creating VSC workspaces on Desktop)
  • sudo cp $lara_stacker_dir/files/.opinionated/.prettierrc ./.prettierrc (Adding Prettier config files to projects)
  • Adding Bash aliases to the user's [~/.bashrc] file:
    echo -e "\n# Laravel Aliases\nalias cda='composer dump-autoload'\nalias art='php artisan'\nalias wipe='php artisan db:wipe'\nalias fresh='php artisan migrate:fresh'\nalias mfs='php artisan migrate:fresh --seed'\nalias opt='php artisan optimize:clear'\nalias dev='bun run dev'\n" >>/home/$USERNAME/.bashrc

Before Production

  • If you had provided an Expose token, remove the project [bootstrap/app.php]'s middleware trust configuration.

Development

There is another package on the way to complement tall-stack packages installation; soon, (in sha' allah)...

Changelogs

You can check out the package's changelogs online via WTD.

Progress

You can also checkout the project's roadmap from here.

Support

Support ongoing package maintenance as well as the development of other projects through sponsorship or one-time donations if you prefer.

And may Allah accept your strive; aameen.

License

This package is open-sourced software licensed under the MIT license.

Credits


والحمد لله رب العالمين