Laranext is a React+Shadcn starter kit for building Laravel applications. It merges the ideas portrayed in the Laravel Inertia.js, React Inertia, and Nextjs projects into a single starter kit.
This kit is designed to be a lightweight and easy-to-use solution for building beautiful, modern, fast, robust and responsive web applications with Laravel and React.
Want a vuejs version? We've got a Kick-Starter Campaign over at Kofi to help with a few development costs.
- CI-CD via Github Actions
- ShadCN-UI React Library
- Laravel 11 + Postgre (Neon)
- React 18 + zustand
- Social Login
- Live-Chat
- SEO mgmt
- Admin Dashboard
- Server Load Info + Application monitoring
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, powerful, and provides tools required for large, robust applications.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
- PHP 8.3+
- Node.js 20+
- Composer 2
- Postgres
For testing purposes, you may also use sqlite. But we highly encourage Postgres.
Neon DB is a serverless platform designed to help you build reliable and scalable applications faster using Postgres.
- Clone the repository into your Sites directory
- (Hope you're using Laravel Herd or Laravel Valet to serve your sites)
git clone https://github.com/syntaxlexx/laranext.git
- Copy the
.env.example
file to.env
and update the values accordingly.
cp .env.example .env
- Install the dependencies (both for PHP and Node.js)
composer install
pnpm install
- Generate the application key
php artisan key:generate
- Run the database migrations
php artisan migrate
- Seed the database
php artisan db:seed
- Refresh IDE metadata files and generate typescript types
composer ide-helper
composer generate-types
- Start the development server
npm run dev
-
Visit the application at http://laranext.test
- If you prefer to serve the application, you can run the following command:
php artisan serve
Remember to update the .env
file with the correct URL values.
The starter-kit uses Pest for testing.
php artisan test
# run tests in parallel
php artisan test --parallel
- Landing page
- Demo pages for layout stuff
- Models -> typescript generator
- Blog
- Post + Comments
- Live-chat - Laravel Reverb + Echo
- Auth pages
- Login
- Register
- Reset password
- Social Login
- Admin
- Dashboard
- Posts mgmt
- Comments mgmt
- Users mgmt
- Profile mgmt
- Settings - Update .env
- Settings - Update SEO metadata
- Server info - Laravel Pulse
- Dashboard for Users
- Liked Posts
- Bookmarks
- Posts mgmt
- Comments
- Profile mgmt
Install supervisor to automatically manage your background processes
sudo nano /etc/supervisor/conf.d/laranext-worker.conf
Update script
[program:laranext-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/laranext/artisan queue:work redis --queue=laranext --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=sudouser
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/laranext/storage/logs/worker.log
stopwaitsecs=3600
Supervisor management
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start "laranext-worker:*"
sudo supervisorctl status
Laravel Pulse is excellent in monitoring background processes.
Remember to use the Redis
driver.
sudo nano /etc/supervisor/conf.d/laranext-pulse.conf
Update Script
[program:laranext-pulse]
process_name=%(program_name)s
command=php /var/www/laranext/artisan pulse:work
autostart=true
autorestart=true
user=sudouser
redirect_stderr=true
stdout_logfile=/var/www/laranext/storage/logs/pulse.log
stopwaitsecs=3600
Then remember to run:
sudo supervisorctl reread
sudo supervisorctl update
supervisorctl start laranext-pulse
sudo supervisorctl status
Laravel Reverb is a first-party WebSocket server for Laravel applications, bringing real-time communication between client and server directly to your fingertips.
Ensure you set the REVERB_*
values accordingly in your .env
file.
Read More on it here on how to get started.
Laravel Horizon provides a beautiful dashboard and code-driven configuration for your Laravel powered Redis queues.
Ensure you set the QUEUE_CONNECTION
as redis
in your .env
file.
Auto-run commands. The commands are run in a cronjob
crontab -e
Enter the following script
# Scheduler
* * * * * cd /var/www/laranext && php artisan schedule:run >> /dev/null 2>&1
Create a Slack App here Bot Scopes required
- incoming webhooks
- chat:write
- channels:read
- groups:read
Also remember to go to the slack itself, create a bot-github
channel, and run this command from chat
/install
Select the app to install
php artisan about
-> view info about your appphp artisan schedule:list
-> view scheduled commandsphp artisan horizon:clear
-> delete all jobs from your application's default queuephp artisan horizon:clear --queue=emails
-> delete all jobs from specific queuephp artisan scout:flush "App\Models\Todo"
-> delete all scout indexed dataphp artisan scout:import "App\Models\Todo"
-> recreate all scout data
php artisan scout:flush "App\Models\Todo" && php artisan scout:import "App\Models\Todo"
Thank you for considering contributing to the Laranext Starter Kit! We welcome contributions from the community.
- /SyntaxLexx - Twitter
- ArthurYdalgo - Laravext
- AceLords - Server Resources
If you discover a security vulnerability within Laravel, please send an e-mail to SyntaxLexx via syntaxlexx@gmail.com. All security vulnerabilities will be promptly addressed.
-
The Laravel framework is open-sourced software licensed under the MIT license.
-
The LaraNext Starter Kit is open-sourced software licensed under the MIT license.