Local Development
Set up your local development environment for Larasonic
π¨ Frontend
Install the required dependencies using your preferred package manager:
Start the Vite development server for hot-reloading:
Build and minify assets for production:
β‘ Laravel Optimization
Optimize your Laravel application for production:
This command:
- Caches configuration
- Caches routes
- Pre-compiles views
If youβre using Filament, optimize it with:
π οΈ Frontend Tools
π― Icons
Larasonic uses Iconify for icons. Use them in your Vue components:
π§© UI Components
Larasonic leverages shadcn/vue for its UI components, which are styled with TailwindCSS and can be fully customized.
Configuration for shadcn is found in components.json
The base styles reside in resources/css/app.css
Customize these components to match your brand, and the entire project will reflect those changes.
To install components in a different location than the default, use:
Browse available components at shadcn-ui/vue
π§ Development Tools
π Styling with Laravel Pint and Rector
Larasonic comes with opinionated code styling rules configured for Laravel Pint and Rector so you donβt have to worry about styling and uses all the latest features from PHP 8.3.
Configure Laravel Pint in pint.json
and Rector in rector.php
to enforce consistent code styling and formatting.
Run Pint with:
π Static Analysis with PHPStan
Larasonic includes PHPStan for static code analysis at the highest level (9). The configuration is in phpstan.neon
.
Run PHPStan with:
π‘ IDE Helper (Optional)
If youβre using PhpStorm with the Laravel IDEA plugin, you can skip this section as the plugin provides superior autocompletion out of the box.
Larasonic includes Laravel IDE Helper for better IDE support and autocompletion. Generate helper files with:
π― Cursor Rules (Optional)
The .cursorrules
file helps you customize how Cursor behaves with your codebase, improving code navigation and AI suggestions.
Cursor rules sync across your team when committed to version control, ensuring consistent IDE behavior. For more configuration options, check out the Cursor Rules documentation.
β Troubleshooting
Troubleshooting Common Issues
Troubleshooting Common Issues
- Vite not starting: Clear the node_modules folder and reinstall dependencies
- Hot reload not working: Check if your file watcher limits are set correctly
- Build errors: Make sure all dependencies are up to date
- PHP Fatal Error: Refer to this issue for potential solutions
- Database Connection Issues: Verify your
.env
settings match your database configuration
Development Best Practices
Development Best Practices
- Run tests before committing:
php artisan test
- Keep dependencies updated regularly
- Use git hooks for automated checks
- Use Laravel Debugbar for development debugging
- Use Laravel Telescope in development for debugging
π Next Steps
You are now ready to start developing your application.
Check out the Features section to learn about customizing your application to your needs.