Laravel Packages

Fresh Package: Laravel Package Skeleton with Testbench, CI, and Boost Integration

Published
Fresh Package: Laravel Package Skeleton with Testbench, CI, and Boost Integration image

Fresh is a Laravel package skeleton by Mazen Touati. It provides an opinionated package skeleton the provides a package with tests, static analysis, CI, a workbench app, and a Laravel Boost skill template for AI agents. It supports both backend-only and full-stack packages.

Here's what your generated package includes using this skeleton:

  • PHPUnit, Larastan, Rector, and Pint, with Paratest for parallel runs
  • A workbench/ app from Orchestra Testbench, so you can boot the package with composer serve and click through it without a host application
  • A Laravel version switcher, composer switch:l12 and composer switch:l13, for checking both supported majors locally
  • GitHub Actions for a PHP 8.3 to 8.5 by Laravel 12 and 13 test matrix, Codecov, static analysis, Pint and Rector auto-fixes, and release-please auto-releases
  • Vue 3, Tailwind v4, Vite, and TypeScript frontend, with its own ESLint, Prettier, Vitest, and type-check workflows
  • Repository settings: Dependabot, an issue template, a funding file, and a security policy
  • AI guidelines and skills for the package repo itself, plus an optional Laravel Boost skill stub for the apps that install it

Scaffolding a Package

When using this package skeleton to create your package, the wizard runs on composer install:

composer create-project sunchayn/fresh-package my-package
cd my-package

The installation prompts collects package details and which features you want to use. Every prompt has a flag, so you can skip the wizard in a script or a CI job:

php .template/init template:init --no-interaction \
  --package-name=acme/webhooks \
  --vendor-namespace=Acme \
  --class-name=Webhooks \
  --config --routes --migrations --commands \
  --no-blade --no-translations --no-facade --no-assets \
  --no-vue --no-funding

Directory Layout

The Fresh skeleton groups code by domain rather than by type:

src/
  Http/Greeting/
    Controllers/GreetingController.php
    Requests/GreetingRequest.php
    Resources/GreetingResource.php
  Modules/Greeting/
    Actions/BuildGreetingAction.php
    DataTransferObjects/GreetingData.php
    Enums/GreetingTone.php

If you keep the AI support option, the bundled scaffold-module skill enforces the same layout when an agent adds a feature, and create-dto-action, write-php-test, and task-finalization skills cover the rest of a change.

Fresh includes a separate Boost skill option that adds a resources/boost/skills/ stub. Apps that install your package will get package guidelines and skills in Laravel Boost.

Learn More

If you are new to package development, the guide to building your own Laravel packages explains how to build a Laravel package from scratch.

You can learn more about the Fresh Package skeleton for Laravel on GitHub.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
pgjumbo: A PostgreSQL Client for macOS, Windows, and Linux image

pgjumbo: A PostgreSQL Client for macOS, Windows, and Linux

Read article
Laranon: Reversible PII Anonymization for Laravel and LLMs image

Laranon: Reversible PII Anonymization for Laravel and LLMs

Read article
PHP 8.6 is released!  image

PHP 8.6 is released!

Read article
Laravel Warrant: Row-Level Permissions With Eloquent image

Laravel Warrant: Row-Level Permissions With Eloquent

Read article
JSON Schema Validation Rules and a RetryFor Attribute in Laravel 13.43 image

JSON Schema Validation Rules and a RetryFor Attribute in Laravel 13.43

Read article
Durable Workflow: Long-Running Workflows for Laravel image

Durable Workflow: Long-Running Workflows for Laravel

Read article