/boilermaker3

Primary LanguageTwigMIT LicenseMIT

Tilt - BoilerMaker-TR

This is a starter Craft CMS v5.X setup for site built by TILT. It is opinionated in the sense that it is configured to make use of the following stack:

  • DDEV as the local dev server
  • Vite for handling of HMR, and front end build features
  • SASS/PostCSS for CSS processing
  • Alpine JS for Javascript

Installation Instructions

ONLY DO THIS IF YOU ARE CREATING A NEW PROJECT You only need to install the boilerplate if you are the one initiating the build process on a project. If you aren't, whoever did initiate it should have created a repository on Tilt's GitHub account for the new site. Simply clone that repository and then create a blank database and run the composer update command from inside the project folder, followed by the the ./craft install command.

Download Files

First you need to run the command to download the package files. Open the terminal and go to the folder where you keep all of your sites. Once there, run the following command:

composer create-project tiltbuilt/boilermaker-tr my/project/path --no-install`

Where the project path part is replaced with the name of the folder for the project you are creating (usually the name of the client website, all lower case, no spaces. hyphens and underscores are allowed). The folder needs to be empty.

Configure DDEV

If you want your site to run on a domain other than https://craftcms.ddev.site, run:

ddev config

Use the following settings:

Project name: e.g. mysite would result in a project URL of https://mysite.ddev.site (you will need this later) Docroot location: keep as-is, web is the default Project Type: keep as-is, php is the default

Installing Craft

To install a clean version of Craft, run:

make install

Follow the prompts.

This command will:

  1. Copy your local SSH keys into the container (handy if you are setting up craft-scripts)
  2. Start your DDEV project
  3. Install Composer
  4. Install npm
  5. Do a one-time build of Vite
  6. Generate APP_ID and save to your .env file
  7. Generate SECURITY_KEY and save to your .env file
  8. Installing Craft for the first time, allowing you to set the admin's account credentials
  9. Install all Craft plugins

Once the process is complete, type ddev launch to open the project in your default browser. 🚀

Local development with Vite

To begin development with Vite's dev server & HMR, run:

make dev

This command will:

  1. Copy your local SSH keys into the container (handy if you are setting up craft-scripts)
  2. Start your DDEV project
  3. Install Composer
  4. Install npm
  5. Do a one-time build of Vite
  6. Spin up the Vite dev server

Open up a browser to your project domain to verify that Vite is connected. Begin crafting beautiful things.

Makefile

A Makefile has been included to provide a unified CLI for common development commands.

  • make install - Runs a complete one-time process to set the project up and install Craft.
  • make up - Starts the DDEV project, ensuring that SSH keys have been added, and npm & Composer have been installed.
  • make dev - Runs a one-time build of all front-end assets, then starts Vite's server for HMR.
  • make build - Builds all front-end assets.
  • make pull - Pull remote db & assets (requires setting up craft-scripts

IMPORTANT NOTE - Before you run the install process make sure to copy your .npmrc file into the project, otherwise the npm installstep will fail because it tries to installGSAP's paid suite and it requires authentication.

Craft CMS Plugins

  1. Blitz
  2. Button Box
  3. CK Editor
  4. Colour Swatches
  5. Color Mixer
  6. Default Dashboard
  7. Element Index Defaults
  8. Embedded Assets
  9. Expanded Singles
  10. Feed-Me
  11. Field Manager
  12. Formie
  13. Hyper
  14. Icon Picker
  15. Imager-X
  16. Imager-X Power Pack
  17. Knock Knock
  18. Minify
  19. Navigation
  20. Postmark
  21. Retcon
  22. Section and Product Type
  23. Seomatic
  24. Servd Assets and Helpers
  25. Shortcodes
  26. Social Share
  27. Table Maker
  28. Typogrify
  29. Vite

Tailwind Plugins

  1. Aspect Ratio
  2. Container Queries
  3. Line Clamp
  4. Typography

Javascript Libraries

  1. AlpineJS
  2. Lazysizes

Acknowledgments

This project is based upon the work of a lot of people including the entire team at Craft CMS, Andrew Welch of NY Studio 107, Ryan Irelan of CraftQuest, the team at One Darnley Road and others. A big thank you to all of you for the work you have done and the fact that you are so willing to share it with the community. I could not have gotten this done without the insights and examples you have all provided. I also want to thank the team at TILT for their ongoing support and dedication to making great sites. My thanks to you all!