PHPackages                             acalvino4/craft-boilerplate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. acalvino4/craft-boilerplate

ActiveLibrary

acalvino4/craft-boilerplate
===========================

A modern, opinionated Craft CMS boilerplate repo

0.1.1(3y ago)35MITPHP

Since Apr 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/acalvino4/craft-boilerplate)[ Packagist](https://packagist.org/packages/acalvino4/craft-boilerplate)[ Docs](https://github.com/acalvino4/craft-boilerplate)[ RSS](/packages/acalvino4-craft-boilerplate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (12)Versions (4)Used By (0)

Project Stack
=============

[](#project-stack)

This Project uses the following libraries and versions:

- Craft CMS: 4
- Tailwind CSS: 3
- Alpine JS: 3
- Vite: 4

Platform requirments:

- PHP: 8.2
- Node: 18
- PostgreSQL: 14
- Redis: 7

Local development requirements:

- [ddev](https://ddev.readthedocs.io/en/stable/#macos-homebrew) - manages platform requirements for you
- [tableplus](https://formulae.brew.sh/cask/tableplus) - local db client

Features
--------

[](#features)

- Navigation builder
- SEO ready
- Local dev preconfigured
    - ddev for all platform requirements and ssl
    - extra container commands preconfigured
    - vscode plugins for debugging and intellisense
- Build process preconfigured
    - js bundling and minification
    - css bundling and minification
    - custom font bundling
    - manifest for cache invalidation
    - subresource integrity
- VSCode integration preconfigured
    - Extensions
    - Syntax highlighting
    - Static errors
- Quality Assurance
    - (Auto) Formatting
    - Linting
    - Typechecking
- Easy favicon setup
- Absolute imports from src directory
- oklch support

### Creating New Project

[](#creating-new-project)

Run command to clone Be prompted for project name, and auto-update where possible commit all changes, run setup

Manually, set cp trigger, email

Ensure local development requirements are met. Then, just run

`composer create-project --no-install acalvino4/boilerplate PATH`

Some things need to be done manually since they are specific to each new project:

- Replace all instances of "boilerplate" with your project name
    - `package.json`
    - `composer.json`
    - `.env.example.dev`
    - `.ddev/config.yaml`
    - `.vscode/launch.json`
    - `config/build/vite.config.ts`
    - throughout `config/project` directory
- Update `cpTrigger` in `config/general.php` to something interesting/appropriate for project
- Update `email.fromEmail` in `config/project/project.yaml` to the appropriate email that should send system email
- Update `` and `` in local setup instructions
- Follow favicon instructions at bottom of this doc
- Delete or modify `LICENSE.md` as appropriate for your project
- Delete this "Creating New Project" section
- `git add -A; git commit -a -m "initial project scaffolding";`
- `git remote add origin ; git push;`

Local Setup
-----------

[](#local-setup)

Ensure local dev requirments are met. Then, navigate to directory where you wish to setup project and run

```
git clone
cd
ddev setup
```

Download database backup from staging or production, and import with command from next section

Development
-----------

[](#development)

### Commands

[](#commands)

- Start / stop app: `ddev start` / `ddev stop`
- Start / stop dev server: `ddev dev` / `^c`
- Start / stop xdebug: `ddev xdebug on` + `F5` / `ddev xdebug off`
- Enable Craft debug toolbar: From Craft control panel, user icon in top right &gt; Preferences &gt; Development. Debug toolbar is then accesible through icon in bottom right.
- Open database in TablePlus: `ddev tableplus`
- Export database: `ddev export-db -f=/tmp/dump.sql.gz`
- Import database: `ddev import-db --src=/tmp/dump.sql.gz`
- Launch mailhog window: `ddev launch -m`
- Manually build assets: `ddev build`
- Update all dependencies: `ddev update`
- Check formatting, linting, and type safety in ts and php: `ddev test`
- Fix auto-fixable problems: `ddev fix`
- `composer`, `npm`, and `craft` commands MUST be run from the ddev container - just preface them with `ddev`

### Typescript

[](#typescript)

This project is configured to use [`alpine.js`](https://alpinejs.dev/). Before implementing any custom behavior, see if alpine can handle your needs using template directives, and also checkout [headless](https://alpinejs.dev/components#headless), [integrations](https://alpinejs.dev/components#integrations), and [components](https://alpinejs.dev/components#components), in that priority order to see if they can fill your needs.

Typescript is configured for absolute imports from the `css` and `ts` directories. To setup absolute imports for any other directories you may add, follow the format in the `compilerOptions.paths` setting of `tsconfig.json` and the `resolver.alias` setting of `vite.config.ts`, or reference [this guide](https://dev.to/tariky/absolute-imports-vite-typescript-2022-32am).

### CSS

[](#css)

This project is setup to use [tailwindcss](https://tailwindcss.com/), so you should always use utility classes over writing css if possible.

### Favicons

[](#favicons)

All you need to do is drop a few specific files into the `src/public/favicon` directory. The build process and templates will take care of the rest. See [this guide](https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs) for details on creating various icons formats (an svg should always be the master image from which all others are generated).

- `favicon.ico`, a 32x32 image in ico format
- `favicon.svg`, an svg configured for both light and dark contexts
- `favicon-180.png`, a 180x180 png for apple touch icon, preferably with a background color and 20px of padding
- `favicon-192.png`, a 192x192 png for andorid home screen links
- `favicon-512.png`, a 512x512 png for android splash screens

Add the project's brand icon and logo to the `storage/rebrand/icon` and `storage/rebrand/logo` directories, respectively, to customize the control panel. Make sure it is configured for light and dark contexts.

### Fonts

[](#fonts)

Google fonts is recommended, and just involves pasting a couple lines into `wrapper.twig`. [Variable fonts](https://web.dev/variable-fonts/#variable-fonts-on-google-fonts) are highly recommended, and you can [limit your search to them](https://fonts.google.com/?vfonly=true) on google, though you have to [manually compose](https://web.dev/variable-fonts/#variable-fonts-on-google-fonts) the link. If you need to use a custom font, ensure it is in `woff2` format for best performance, place the files in `src/fonts`, and put your corresponding `@font-face` rules in `src/styles/font.css`.

### Colors

[](#colors)

oklch colors are automatically handled in the build process to have a fallback for browsers and displays that don't support them. Read about the benefits of this approach. The main benefits of using this color model are [wider color gamut and more predictable pallete generation](https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl). Just use the [oklch() function](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) in your tailwind config:

```
colors: {
  primary: {
    100: "oklch(90% 0.3 17)",
    200: "oklch(80% 0.3 17)",
    ...
  }
}
```

### Upstream updates

[](#upstream-updates)

If a website's needs would apply to the majority of webstites, make them on the [boilerplate repo](https://github.com/acalvino4/craft-boilerplate) and then merge them into your site. This way, we can take advantage of your improvement for all derivative sites. To merge changes from the boilerplate into your site:

- `git remote add boilerplate https://github.com/acalvino4/craft-boilerplate.git` (only needs to be done once)
- checkout new branch
- `git fetch boilerplate`
- `git merge boilerplate/master`
- deal with any merge conflicts and commit

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3bc1dd885fe50d32f5ad8cac47ea66427ad08c71a4852b735ef0d4da62331d98?d=identicon)[acalvino4](/maintainers/acalvino4)

---

Top Contributors

[![acalvino4](https://avatars.githubusercontent.com/u/43254861?v=4)](https://github.com/acalvino4 "acalvino4 (18 commits)")

### Embed Badge

![Health badge](/badges/acalvino4-craft-boilerplate/health.svg)

```
[![Health](https://phpackages.com/badges/acalvino4-craft-boilerplate/health.svg)](https://phpackages.com/packages/acalvino4-craft-boilerplate)
```

###  Alternatives

[wrav/oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

36205.0k3](/packages/wrav-oembed)[servd/craft-asset-storage

Servd Asset Storage and Helpers integration for Craft CMS

1180.7k7](/packages/servd-craft-asset-storage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
