A starter kit based on Laravel Breeze which includes Inertia, React, Typescript, Tailwindcss, Shadcn/ui and Spatie.
The starter kit also implement basic usage of spatie (roles & permissions) and provide a web for client/user/customer and console/portal/dashboard for admin (CMS). The routes system is modified to implement domain (for client) & subdomain (for console) routing include authentication middleware for console routes.
Note: check this
app\Providers\RouteServiceProvider.phpfile for details and see the complete installation instructions to ensure you can run the starter kit correctly.
- Clone this repository.
git clone https://github.com/yudayahya/laravel-inertia-react-shadcn-spatie.git- Change to file directory.
cd laravel-inertia-react-shadcn-spatie- Install the dependencies.
composer install
npm install- Create .env file from .env.example
cp .env.example .env-
Configure .env variables according to your needs and fill
APP_URLwith domain (ex:https://laravel-inertia-react-shadcn-spatie.test) to make sure the domain & subdomain routing works well. If you're usingWindowsOS and Laragon you can enableAuto-create Virtual Hosts(refer to https://laragon.org/docs/pretty-urls.html for the details). After you're able to use theLaragon Pretty URLcreate an empty folder with the folder name same as your project name and addsubdomainprefix (ex:console.laravel-inertia-react-shadcn-spatie) insidelaragon\wwwand restart your laragon, laragon will ask a prompt to add the folder name (subdomain like) to yourC:\Windows\System32\drivers\etc\hostsfile and createApache/Nginx.conffile automatically, after that remove your new folder and restart laragon, laragon will remove theApache/Nginx.conffile (we don't need this.conffile, we only need laragon to add your folder name tohostsfile). And now you should able to access your domain and subdomain from your browser. But our laravel application is not ready yet, proceed to the next installation instructions.Note: To setup (domain & subdomain availability) anything other than Windows with Laragon, you need to find and do it yourself.
-
Migrate the table
php artisan migrate- Running db seed
php artisan db:seed- Build the frontend bundle
npm run build- It's done, navigate to your domain URL in your browser (make sure your server/laragon is running). Use the super admin credentials to access the console page, you can find in
database\seeders\SuperAdminSeeder.phpseeder file.
The Starter Kit is open-sourced under the MIT license.