feature-ninja/react-starter-kit

Opinionated React starter kit based on the Official Laravel React starter kit

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:TypeScript

Type:project

1.0.3 2025-03-23 14:48 UTC

README

This starter kit is based on the official Laravel React Starter Kit that has been restructured in an opinionated way. It consists of marketing section and control panel, each with their own asset bundle. It also ships with a fully configured PHPStan setup thanks to Larastan!

Asset bundling

In order to simplify handling multiple asset bundles you can use the php artisan bundle <npm script> command. You can use the --clean-install flag to ensure the NPM dependencies are reinstalled, and limit which bundles to build by using the --only=<bundle a,bundle b,bundle c> option.

# Start Vite development server for both sections
php artisan bundle dev

# Build asset for production
php artisan bundle build

Structure

Besides the multiple sections the code is also grouped by feature and placed next to each other. So instead of putting all the controllers in a Controllers directory and all the form requests in a Requests directory they are now grouped together. Additionally, all the tests have been placed inlined with their feature.