From 0a5aec8bb2cd79d89ceb65c56141041aee42bd36 Mon Sep 17 00:00:00 2001 From: CodeWithDennis <23448484+CodeWithDennis@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:36:30 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 113 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 702b54b..451f6db 100644 --- a/README.md +++ b/README.md @@ -6,67 +6,88 @@ [![Total Installs](https://img.shields.io/packagist/dt/codewithdennis/larament.svg?style=flat-square)](https://packagist.org/packages/codewithdennis/larament) [![Latest Version on Packagist](https://img.shields.io/packagist/v/codewithdennis/larament.svg?style=flat-square)](https://packagist.org/packages/codewithdennis/larament) -![larament](https://raw.githubusercontent.com/CodeWithDennis/larament/main/resources/images/larament.png) +![Larament](https://raw.githubusercontent.com/CodeWithDennis/larament/main/resources/images/larament.png) -Kickstart your project and save time with Larament! This time-saving starter kit includes a Laravel project with FilamentPHP already installed and set up, along with extra features. +**Larament** is a time-saving starter kit to quickly launch Laravel projects. It includes **FilamentPHP** pre-installed and configured, along with additional tools and features to streamline your development workflow. -> [!NOTE] -> This starter kit includes **Laravel 11** and **FilamentPHP 3** with some packages that improve the development experience. This will not contain any bloated features or unnecessary packages. If you want to add more features, you can do so by installing the necessary packages. +--- -## Configuration +## Table of Contents + +- [Features](#features) + - [Security and Testing](#security-and-testing) + - [Quality of Life](#quality-of-life) + - [Design](#design) +- [Default User](#default-user) +- [Included Packages](#included-packages) +- [Installation](#installation) + - [CLI Installation](#cli-installation) + +--- + +## Features ### Security and Testing -![pest-php](https://raw.githubusercontent.com/CodeWithDennis/larament/main/resources/images/pest-php.png) -- A handfull of [PESTPHP](https://pestphp.com/docs/installation) test cases are included for testing. -- [Should be strict](https://laravel-news.com/shouldbestrict) - - Prevents lazy loading (N+1) queries. - - It prevents silently discarding attributes. - - It prevents accessing missing attributes. -- [Prevent destructive commands from running in production](https://laravel-news.com/prevent-destructive-commands-from-running-in-laravel-11) -- Archtest is included for architectural testing. -- PHPStan is included for static analysis. -- Laravel debugbar is included for debugging. +![PESTPHP](https://raw.githubusercontent.com/CodeWithDennis/larament/main/resources/images/pest-php.png) + +- **PESTPHP**: Preconfigured with test cases for streamlined testing. ([Learn more](https://pestphp.com/docs/installation)) +- **Strict mode enabled** via [Should Be Strict](https://laravel-news.com/shouldbestrict): + - Prevents lazy loading (N+1 queries). + - Guards against discarding or accessing missing attributes. +- **Production safeguards**: Prevents destructive commands in production. ([Learn more](https://laravel-news.com/prevent-destructive-commands-from-running-in-laravel-11)) +- **Architectural testing** with Archtest. +- **Static analysis** using PHPStan. +- **Debugging** with Laravel Debugbar. ### Quality of Life -![global-search-keybinding](https://raw.githubusercontent.com/CodeWithDennis/larament/main/resources/images/global-search-keybinding.jpg) -- A custom login page autofills email and password with seeded data, streamlining local testing. -- A custom password generator action is available on the user profile and user resource pages. -- Global user search includes email addresses in results for better user discovery. -- All component labels are automatically translatable. -- A `composer review` command that runs PINT, PHPStan, and PEST. -- Helper file is included for custom helper functions. -- A custom `php artisan make:filament-action` command is available for creating actions. +![Global Search Keybinding](https://raw.githubusercontent.com/CodeWithDennis/larament/main/resources/images/global-search-keybinding.jpg) + +- Custom login page autofills email and password with seeded data for quicker testing. +- Built-in password generator action on the user profile and user resource pages. +- Enhanced global search includes email addresses for better discoverability. +- Auto-translatable component labels. +- `composer review`: A single command to run Pint, PHPStan, and PEST. +- Helper functions available through a dedicated helper file. +- Custom `php artisan make:filament-action` command for generating Filament actions. ### Design -![user-global-search](https://raw.githubusercontent.com/CodeWithDennis/larament/main/resources/images/user-global-search.jpg) -- The Filament Panel's primary color is set to blue. -- Single Page Application (SPA) mode is enabled by default. -- Global search keybinding is preset to `CTRL + K` or `CMD + K`. -- A ready-to-use FilamentPHP [custom theme](https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme) that also includes a sidebar separator. -- A custom profile that includes the password generator action. +![User Global Search](https://raw.githubusercontent.com/CodeWithDennis/larament/main/resources/images/user-global-search.jpg) + +- Filament Panel's primary color is preset to blue. +- Single Page Application (SPA) mode enabled by default. +- Global search keybinding set to `CTRL + K` or `CMD + K`. +- A ready-to-use FilamentPHP custom theme, including a sidebar separator. +- Enhanced profile page with a built-in password generator. + +--- ## Default User -The default user is seeded with the following credentials which is autofilled on the login page. + +A default user is seeded with the following credentials, pre-filled on the login page for quick access: ```dotenv +DEFAULT_USER_NAME="John Doe" DEFAULT_USER_EMAIL="admin@example.com" DEFAULT_USER_PASSWORD="password" ``` -## Packages - -- [timokoerber/laravel-one-time-operations](https://github.com/TimoKoerber/laravel-one-time-operations) -- [barryvdh/laravel-debugbar](https://github.com/barryvdh/laravel-debugbar) -- [phpstan/phpstan](https://phpstan.org/user-guide/getting-started) -- [pestphp/pest](https://pestphp.com/docs/installation) - - [pestphp/pest-plugin-faker](https://pestphp.com/docs/plugins#faker) - - [pestphp/pest-plugin-laravel](https://pestphp.com/docs/plugins#laravel) - - [pestphp/pest-plugin-livewire](https://pestphp.com/docs/plugins#livewire) +## Included Packages -## Installation +The following packages are pre-installed: -**[Use this template](https://github.com/new?template_name=larament&template_owner=CodeWithDennis)** to create a new repository and clone it to your local machine, then navigate to the project directory to run the necessary commands. +- timokoerber/laravel-one-time-operations +- barryvdh/laravel-debugbar +- phpstan/phpstan +- pestphp/pest, along with plugins: + - pestphp/pest-plugin-faker + - pestphp/pest-plugin-laravel + - pestphp/pest-plugin-livewire +## Installation +### Using the Template +- Create a repository using the Larament template. +- Clone your repository to your local machine. + Navigate to the project directory and run the following commands: ```bash composer install npm install && npm run build @@ -76,21 +97,21 @@ php artisan migrate php artisan db:seed ``` -### CLI Installation - -You can also use the following command to create a new project with Larament. +## CLI Installation +Alternatively, you can use the following command to create a new project with Larament: ```bash composer create-project --prefer-dist CodeWithDennis/larament example-app ``` -If you don't want to remember the composer installation syntax for future projects, you can create an alias for your terminal: +### Create a Terminal Alias +For easier usage in future projects, create an alias in your terminal: ```bash alias larament="composer create-project --prefer-dist CodeWithDennis/larament" ``` -This allows you to simply use `larament my-cool-app` in your terminal. +Now, you can create a new project with a simple command: ```bash larament my-cool-app From e78aaa9c2780d952ca9cb91d0507e0423934c6d6 Mon Sep 17 00:00:00 2001 From: Dennis Elsinga Date: Thu, 12 Dec 2024 15:38:49 +0100 Subject: [PATCH 2/2] Update links for pre-installed packages in README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 451f6db..b569485 100644 --- a/README.md +++ b/README.md @@ -75,13 +75,13 @@ DEFAULT_USER_PASSWORD="password" The following packages are pre-installed: -- timokoerber/laravel-one-time-operations -- barryvdh/laravel-debugbar -- phpstan/phpstan -- pestphp/pest, along with plugins: - - pestphp/pest-plugin-faker - - pestphp/pest-plugin-laravel - - pestphp/pest-plugin-livewire +- [timokoerber/laravel-one-time-operations](https://github.com/TimoKoerber/laravel-one-time-operations) +- [barryvdh/laravel-debugbar](https://github.com/barryvdh/laravel-debugbar) +- [phpstan/phpstan](https://phpstan.org/user-guide/getting-started) +- [pestphp/pest](https://pestphp.com/docs/installation) + - [pestphp/pest-plugin-faker](https://pestphp.com/docs/plugins#faker) + - [pestphp/pest-plugin-laravel](https://pestphp.com/docs/plugins#laravel) + - [pestphp/pest-plugin-livewire](https://pestphp.com/docs/plugins#livewire) ## Installation ### Using the Template