- About Laradev React
- Features
- Tech Stack
- Installation - Local Development
- Changelog
- Contributing
- Available Scripts
- Available Scripts - DDEV
- Releasing a new version
- Security
- License
- Credits
Laradev-React is a sample Laravel app that can be used as a skeleton for your next Laravel project.
It includes a basic setup for both the backend and frontend, with support for both DDEV and Native (PHP, Composer, etc running locally) development environments.
- Support for both DDEV and Native development environments
- React.js/Inertia frontend with Vite for faster development
- Tailwind CSS with shadcn/ui components
- SCSS support with PostCSS
- TypeScript support
- Automated code formatting (PHP, JS/TS, SCSS)
- Git hooks for code quality
- Comprehensive test suite using Pest
- Role-based authentication using Spatie Permissions
- Dark mode support
- Responsive design
- GitHub Actions for CI/CD
-
Backend:
- Laravel 11.x
- PHP 8.3+
- MySQL/SQLite
- Laravel Pint (Code Styling)
- PHPStan (Static Analysis)
- Pest (Testing)
-
Frontend:
- React 19
- TypeScript
- Tailwind CSS
- shadcn/ui Components
- Vite
- ESLint + Prettier
In order to start developing with Laradev, you will need to read the guide in the LOCAL-DEVELOPMENT.md file.
Please see CHANGELOG for more information on what has changed recently.
To contribute to the application, follow these steps:
- Fork this repository.
- Read the CONTRIBUTING file.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request
This application uses Laravel Pint in order to perform code-styling checks and fixes.
In order to run the styler, run :
./vendor/bin/pint --test -v # the --test will not do any changes, it will just output the changes needed
./vendor/bin/pint -v # this command will actually perform the code style changes
To run the tests, run the following command:
./vendor/bin/pest
Or, under DDEV:
ddev test
To run the tests with coverage, run the following command:
XDEBUG_MODE=coverage ./vendor/bin/pest --coverage
To filter tests, use the --filter
flag. For example:
./vendor/bin/pest --filter testName
This application uses PHPStan in order to perform code-scanning checks.
In order to run the code-scanner, run the following command:
./vendor/bin/phpstan analyse
The project includes pre-commit hooks that automatically format code. They're installed automatically with:
composer install
npm run dev
- Start Vite development servernpm run build
- Build for productionnpm run lint
- Run ESLintnpm run lint:fix
- Fix ESLint issuesnpm run types
- Check TypeScript typescomposer format
- Format PHP codecomposer analyse
- Run static analysis
ddev artisan migrate
- Migrate the databaseddev artisan db:seed
- Seed the databaseddev artisan db:refresh
- Refresh the databaseddev artisan db:reset
- Reset the databaseddev artisan key:generate
- Generate the application keyddev artisan migrate:fresh
- Refresh the database and migrateddev artisan migrate:fresh --seed
- Refresh the database and seedddev artisan migrate:fresh --seed --seeder=DatabaseSeeder
- Refresh the database and seed with the DatabaseSeederddev pint
- Format PHP codeddev test
- Run testsddev analyse
- Run static analysisddev format
- Format all code
After you have committed your changes, create a new git tag:
git tag -a vx.y.z -m "This is a nice tag name"
(for the x.y.z
version number, follow the Semantic Versioning guidelines).
Then, push the tag:
git push origin vx.y.z
Then, in the GitHub Releases page, create a new Release * and correlate it with the tag that you just created.*
Also, don't forget to update the CHANGELOG.md
file with the new version name, release date, and release notes.
If you discover any security-related issues, please email info[at]scify.org
, instead of using the issue tracker.
This project is open-sourced software licensed under the Apache License, Version 2.0.