<<< Back to the blog

Starter Kits Now Support Modules

Starter Kits now offer even more flexibility with support for modules! Nest dependencies and let users select what to install and what to skip. Offering multiple paths and options too.
Joshua Blum
Joshua Blum August 29th, 2024

If you’ve ever wanted to hit the ground running with a new Statamic site, you’ve probably heard about Starter Kits. Introduced in v3.0 and overhauled in v3.2, these pre-built packages are like a perfectly wrapped gift, full of features, functionality, and design, ready to be unwrapped and put to use. With the release of Statamic v5.21.0, Starter Kits just got even better, thanks to the introduction of module support.

The Evolution of Starter Kits

Before we dive into what’s new, let’s take a step back. Starter Kits have been an essential tool for Statamic users for quite a while, either as public ones on our Marketplace or private ones to jump-start your freelance, agency, or whatever-project-you-re-working-on kind of projects. Whether you’re setting up a blog, an e-commerce site, or a portfolio, Starter Kits provide a solid foundation. And now, with support for modules, that foundation has become even more flexible, powerful, and customizable.

If you’ve used Peak before, one of Statamic’s most popular Starter Kits, you might be somewhat familiar with the idea already. Created by Rob de Kort, one of our certified Statamic Partners and a beloved community member, Peak took a DIY approach to what we now natively support: modules.

Modules Explained

In simple terms, modules allow you to include other dependencies inside your Starter Kit. Imagine being able to offer a Starter Kit with multiple levels of complexity. You could have a basic version and then let users opt-in to additional features like an SEO module, a social image generator, or even different tastes of pre-built templates and views, for example. This makes Starter Kits not just a starting point but a launching pad for some rad Statamic experiences.

Interested in using modules with your Starter Kit? It’s a breeze to implement them. Just nest your modules in your starter-kit.yaml config file, and you’re good to go. The beauty of it? It ties in seamlessly with our CLI, giving users the choice to install modules or skip them. Want to offer different stacks or flavors? No biggie. You can set up options for going other routes. Want to offer support for React, Vue, or Svelte, all within the same Starter Kit, for example? Let the user pick their favorite stack when they install the Starter Kit via our CLI.

But wait, there’s more! You can even nest modules inside other modules. It’s like a Matryoshka doll of possibilities — nesting modules inside modules inside modules.

Here’s a simple example of how to use nested modules:

modules:
  seo:
    prompt: 'Would you like some awesome SEO with that!?'
    dependencies:
      - statamic/seo-pro
    modules:
      sitemap:
        prompt: 'Would you like additional SEO sitemap features as well?'
        dependencies:
          - statamic/seo-pro-sitemap

Post-Module is Pre Post-Hook

For those who like to get even more fancy, modules pair well with our existing Post-Install Hooks. This means you can run additional logic or scripts right after your Starter Kit is installed, ensuring that everything is perfectly tailored to the user’s needs. Even better, post hooks will get a small update soon that let you run them conditionally for each module.

Ready to Get Started?

We’ve only scratched the surface of what’s possible with module support in Starter Kits. Whether you’re a seasoned Statamic developer or just getting started, this new feature will open up a new world of possibilities. Want to dive deeper? Check out our docs on creating a Starter Kit for all the details. And don’t forget to explore our Marketplace to see what’s already out there.

With modules, your Starter Kits are no longer just a starting point — they’re the foundation of a fully customizable, powerful, and tailored Statamic experience. Time to get building!

Share Your Thoughts and Ideas

Building some cool with Starter Kit modules or something else you’re proud of? Having questions about anything Statamic? Hop on our Discord and also subscribe to our newsletter to not miss updates on your favorite Content Platform.

A new feed approaches!