Laravel Dev Kit is a starter kit for Laravel applications, designed to save time and set up your projects with a standardized environment. It includes pre-configured tools for code linting, formatting, and CI/CD workflows, ensuring code quality and consistency.
-
CI/CD Workflows: Pre-configured GitHub Actions workflows for:
- PHP linting
- Fixing common coding issues
- Prettier integration
- Automated testing with Laravel
-
Husky Pre-Commit Hooks: Automatically run linting and formatting tasks before committing changes.
-
Linting and Formatting:
Pint
for PHP code formatting- Prettier for JavaScript, CSS, and other frontend assets
-
Custom Configuration Files:
.prettierrc
and.prettierignore
for Prettierlint-staged.config.js
for staged file linting
/
|-- .gitHub
| |-- workflows
| | |-- auto-merge-dependabot.yml
| | |-- code-quality.yml.yml
| | |-- duster-fix-blame.yml
| | |-- duster.yml
| | |-- pint.yml
| | |-- prettier.yml
|
|-- .husky
| |-- _
| | |-- .gitignore
| | |-- husky.sh
| |-- pre-commit
| |-- pre-push
|
|-- .prettierrc
|-- .prettierignore
|-- lint-staged.config.js
-
Clone the repository:
git clone https://github.com/shaz3e/laravel-dev-kit.git my-new-app cd my-new-app
-
Install PHP dependencies:
composer install
-
Install Node.js dependencies:
npm install
-
Copy
.env.example
to.env
for your Laravel application. -
Generate Key
php artisan key:generate
-
Run the local development server:
php artisan serve
-
Watch and build frontend assets:
npm run dev
-
Commit code with pre-commit checks automatically applied.
The .github/workflows
folder includes:
- code-quality.yml: Automatically fix coding standards and blame-ignore files.
- laravel.yml: Run tests and ensure application stability.
- lint.yml: Run PHP, CSS, and JS lint checks.
- prettier-write.yml: Enforce Prettier standards across supported files.
Automatically lint and format files before committing changes. Customize the hook behavior in .husky/pre-commit
.
Contributions are welcome! Feel free to submit a pull request or open an issue for discussion.
This repository is open-source and available under the MIT License.
Laravel Dev Kit simplifies the setup process for Laravel applications, integrating essential developer tools to streamline workflows and maintain code quality.
This project utilizes and integrates various tools and resources to provide an optimized development experience. Special thanks to:
- Laravel: For providing a robust PHP framework.
- Pint: Laravel's official code formatter for PHP.
- Prettier: An opinionated code formatter for JavaScript, CSS, and more.
- Husky: For Git hooks management to automate checks and ensure quality.
- Lint-Staged: For running linters against staged Git files.
- GitHub Actions: For seamless CI/CD workflows.
We acknowledge these open-source tools, frameworks, and the global development community for their contributions.
If you'd like to be recognized as a contributor to this repository, feel free to submit a pull request or raise an issue with solution.