{"id":23960512,"url":"https://github.com/stagerightlabs/fresh-laravel-project","last_synced_at":"2026-04-14T14:31:48.689Z","repository":{"id":270276809,"uuid":"909837537","full_name":"stagerightlabs/fresh-laravel-project","owner":"stagerightlabs","description":"My preferred way to start a fresh Laravel project","archived":false,"fork":false,"pushed_at":"2025-09-07T13:31:01.000Z","size":127,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"2025","last_synced_at":"2025-09-07T15:23:06.116Z","etag":null,"topics":["laravel","php","phpstan","postgresql","tailwindcss","vite"],"latest_commit_sha":null,"homepage":"","language":"Blade","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stagerightlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-29T22:49:26.000Z","updated_at":"2025-09-07T13:31:04.000Z","dependencies_parsed_at":"2024-12-30T00:17:43.121Z","dependency_job_id":"ae2e6eff-9245-4d10-993d-9976e60a8ffb","html_url":"https://github.com/stagerightlabs/fresh-laravel-project","commit_stats":null,"previous_names":["stagerightlabs/fresh-laravel-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stagerightlabs/fresh-laravel-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagerightlabs%2Ffresh-laravel-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagerightlabs%2Ffresh-laravel-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagerightlabs%2Ffresh-laravel-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagerightlabs%2Ffresh-laravel-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stagerightlabs","download_url":"https://codeload.github.com/stagerightlabs/fresh-laravel-project/tar.gz/refs/heads/2025","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagerightlabs%2Ffresh-laravel-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31801241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","php","phpstan","postgresql","tailwindcss","vite"],"created_at":"2025-01-06T19:29:14.335Z","updated_at":"2026-04-14T14:31:48.663Z","avatar_url":"https://github.com/stagerightlabs.png","language":"Blade","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How I Start a Laravel Project\n\n2025 Edition\n\nThis is my own preferred way to start a fresh Laravel project. It leverages some recommended Laravel defaults such as Vite and Laravel Pint, but it also deviates from the defaults in ways that I prefer, such as using my own docker setup instead of Laravel Sail.\n\n## Stack\n\n- [PHP 8.4](https://www.php.net/)\n- [Laravel 11](https://laravel.com/)\n- [Tailwind 3.4](https://tailwindcss.com/)\n- [Node 22](https://nodejs.org/)\n- [PostgreSQL 17](https://www.postgresql.org/)\n\n## Features\n\n- Vite for asset management\n- Yarn for node dependency management\n- Larastan and PHPStan for static analysis\n- Laravel Pint for PHP code formatting\n- Prettier for JavaScript and Blade code formatting\n- MailPit for email previews and testing\n\n## Getting Started\n\nYou can use this repository as a starting point for a new project:\n\n1. Clone the repository into a new project folder.\n2. Remove the existing `.git` file and run `git init` to start with a fresh git history.\n3. Run `docker compose build` to build the local environment images.\n4. Install and update the PHP dependencies: `docker compose run --rm php composer update`.\n5. Install the node dependencies: `docker compose run --rm node yarn`.\n6. Optional: Add an entry to your hosts file for the local project domain.\n7. Spin up the containers: `docker compose up -d`.\n8. Run the database migrations: `docker compose exec php php artisan migrate`\n\nYou should now be able to view the project in a web browser.\n\nTo view mail go to [localhost:8025](http://localhost:8025) when the containers are running.\n\n## Helper Script\n\nThis project includes an `ops.sh` script that serves as a helper for accessing tools in docker. This is an idea that I borrowed from Chris Fidao and his [Shipping Docker](https://serversforhackers.com/shipping-docker) course. To make best use of it, you will need to set up a bash alias:\n\n```sh\napp() {\n    cd /full/path/to/project\n    ./ops.sh ${*:-ps}\n    cd $OLDPWD\n}\n```\n\nYou can call the function whatever you would like. With this alias in place you can now easily run development tasks:\n\n```sh\nproject $ app artisan make:model Team -mfs # Make a new model with a migration, factory and seeder\nproject $ app composer require [package] # Add a PHP package with Composer\nproject $ app composer format # Run Laravel Pint to format PHP code\nproject $ app composer phpstan # Run PHPStan for static analysis\nproject $ app composer test # Run the test suite\nproject $ app psql app_dev # Drop into the postgres cli\nproject $ app yarn add [package] # Add a node dependency with Yarn\nproject $ app yarn format # Run a yarn script\n```\n\nThis script is easily extendible if you add more services to the docker environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagerightlabs%2Ffresh-laravel-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstagerightlabs%2Ffresh-laravel-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagerightlabs%2Ffresh-laravel-project/lists"}