Opinionated Craft CMS 5 starter by Caffeine Creations. Used as a boilerplate for client projects.
- CMS: Craft CMS 5
- Local dev: DDEV (
https://craft-starter.ddev.site) - CSS: Tailwind CSS 4 (compiled via
@tailwindcss/cli) - JS: Alpine.js 3 + plugins (collapse, focus, intersect, persist, sort), Swiper, Plyr
- Templating: Twig
- Build: npm scripts (no Webpack/Vite)
templates/- Twig templatessrc/css/- source CSS (Tailwind)src/js/- source JSpublic/assets/- compiled output (do not edit directly)config/- Craft config filesconfig/project/- Craft project config (YAML)
- All Craft CLI commands run inside ddev:
ddev exec php craft ... - Start build process:
npm run start - Production build:
npm run build - Launch site + CP:
ddev launch-site - Import db:
ddev import-db --file=db.sql.gz - CP login:
cc_admin/letmein
AssetRev, CKEditor, Contact Form, Control Panel CSS, Environment Label, Hyper, Knock Knock, Minify, Recent Changes, Retcon, SEOmatic, Sprig, Typogrify
- Prefer editing existing files over creating new ones
- Do not install plugins unless absolutely necessary — use native Craft features where possible
- Never auto-commit or push without confirmation
- Do not add comments unless logic is non-obvious
- Templates use Twig — follow existing patterns in
templates/ - CSS uses Tailwind utility classes; avoid writing custom CSS unless necessary
- Dark mode uses the
dark:prefix; toggle is Alpine.js-based - Sprig components only reload once on
localhost:3000— test on the ddev domain - Images use the
_includes/responsiveImage.twiginclude for picture elements - Navigation defaults to click-based dropdowns (better accessibility)
- Always check if a field has a value before outputting it (
{% if entry.field %}) - Use
entry.fieldHandledot notation, not bracket notation - Never edit
config/project/YAML files directly — use the CP and let Craft write them - Use SEOmatic for all meta/SEO — don't hardcode meta tags
- Use Hyper for all links and buttons
- Eager-load relations with
.with()to avoid N+1 queries - Apply
|typogrifyfilter on richtext/CKEditor fields
- Mobile-first CSS — write base styles for small screens, use
md:,lg:etc. for larger - No inline styles — use Tailwind classes
- No jQuery — use Alpine.js for interactivity
- Semantic HTML — use correct elements (
<nav>,<main>,<article>,<section>, etc.) - All images need meaningful
alttext oralt=""if decorative - Use
loading="lazy"on images below the fold - Use the
responsiveImage.twiginclude for all images — don't use raw<img>tags