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
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.
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.
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
To install a clean version of Craft, run:
make install
Follow the prompts.
This command will:
- Copy your local SSH keys into the container (handy if you are setting up craft-scripts)
- Start your DDEV project
- Install Composer
- Install npm
- Do a one-time build of Vite
- Generate
APP_ID
and save to your.env
file - Generate
SECURITY_KEY
and save to your.env
file - Installing Craft for the first time, allowing you to set the admin's account credentials
- Install all Craft plugins
Once the process is complete, type ddev launch
to open the project in your default browser. 🚀
To begin development with Vite's dev server & HMR, run:
make dev
This command will:
- Copy your local SSH keys into the container (handy if you are setting up craft-scripts)
- Start your DDEV project
- Install Composer
- Install npm
- Do a one-time build of Vite
- Spin up the Vite dev server
Open up a browser to your project domain to verify that Vite is connected. Begin crafting beautiful things.
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.
- Blitz
- Button Box
- CK Editor
- Colour Swatches
- Color Mixer
- Default Dashboard
- Element Index Defaults
- Embedded Assets
- Expanded Singles
- Feed-Me
- Field Manager
- Formie
- Hyper
- Icon Picker
- Imager-X
- Imager-X Power Pack
- Knock Knock
- Minify
- Navigation
- Postmark
- Retcon
- Section and Product Type
- Seomatic
- Servd Assets and Helpers
- Shortcodes
- Social Share
- Table Maker
- Typogrify
- Vite
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!