ronasit/laravel-project-initializator
A Laravel package for bootstrapping new projects with a consistent setup. It automates common initialization and configuration steps, reducing manual scaffolding so teams can start development faster and maintain standard conventions across applications.
ronasit/laravel-project-initializator is a dev-only scaffolding package: instead of hand-assembling a new Laravel app (Docker, CI, README, env files, base config), you describe the desired end state in an initializer config and let php artisan project:init materialize it.
Minimal path:
composer require --dev ronasit/laravel-project-initializatorphp artisan project:init on a clean, throwaway branch and review git diff.Where to look first: the published initializer config. It is the single source of truth — every file that appears in a new project should be traceable to an entry there. If something is missing from a generated project, the answer is almost always "it isn't listed in the config" rather than a bug in the package.
First use case: onboarding a new repo. Clone, composer install, php artisan project:init, and you have .env, .env.testing, .env.ci-testing, CI workflow, Docker compose and the app skeleton in one command instead of a wiki page of manual steps.
As of 0.3.3, the init flow creates and configures .env.ci-testing and .env.testing alongside the standard .env. Previously these were a manual post-init step; if your docs tell people to cp .env.example .env.testing, that instruction can be deleted.
Config-as-manifest. Treat the initializer config as declarative infrastructure. Two categories of entries: files copied byte-for-byte (Dockerfiles, workflows, editor config) and stubs rendered through placeholder substitution (README, composer.json name/description, config/app.php tweaks, env files). Keep the distinction explicit so a reviewer knows whether editing a target file is a template change or a code change.
Placeholders over hardcoding. Define tokens once (project name, namespace, author, DB name) and reference them everywhere. Anything typed twice will drift.
Env file triad. Keep .env.example, .env.testing and .env.ci-testing as committed examples in the template, and let init materialize the real ones. Since 0.3.3 the package handles the last two for you, so the pattern is: add a new env key to all three example files in the same PR that adds the feature. Missing one produces a generated project that passes locally and fails in CI.
CI integration. A typical workflow: checkout, install PHP deps, run php artisan project:init --no-interaction (or an equivalent force flag), then php artisan migrate and the test suite with .env.ci-testing supplying DB credentials and app key. This gives you a permanent smoke test that the template is not broken — run it on a schedule, not just on PRs to the template.
Extending. New shared infrastructure (a queue worker, a Sentry config, a Pint preset) is a two-line change: drop the file into the template directory, add it to the manifest. Keep template-only concerns out of app/ so the initializator and application code never fight.
Version pinning. It is a require-dev dependency whose output is the starting point of every new repo. Pin an exact version in composer.json and bump deliberately, after generating a project and diffing against the previous output.
git diff as the review mechanism — the diff is the change set.*.example variants are committed. If a teammate's .env.testing looks wrong, check the example file, not the generated one..env.testing vs .env.ci-testing. PHPUnit loads .env.testing; CI scripts typically source .env.ci-testing. Getting an APP_KEY into the CI env is mandatory — encryption/session tests fail with a confusing "No application encryption key" error otherwise. The 0.3.3 change is exactly the fix for that class of first-run failure, so verify the generated files actually contain a key (or that CI injects one) rather than assuming.grep -rn '{{' . — an unreplaced token in a rendered file usually means the file was listed as "copy" instead of "render", or the token name differs by a character.php artisan config:clear after changing it.-v/-vv on the artisan command to see which files are being processed; if a file is silently skipped it is nearly always an unmatched glob or a path relative to the wrong root.How can I help you explore Laravel packages today?