A powerful and modern web development boilerplate that combines:
- Laravel - Robust PHP framework
- GrapesJS - Visual website builder
- Filament - Modern admin panel
- π¨ Visual Page Builder - Drag & drop website building with GrapesJS
- π± Responsive Design - Built with Tailwind CSS
- π§ Admin Panel - Beautiful Filament admin interface
- π Page Management - Create, edit, and manage pages visually
- π SEO Optimized - Built-in meta tags and SEO features
- π Production Ready - Optimized for performance
- PHP 8.2+
- Composer
- Node.js & NPM
- SQLite/MySQL/PostgreSQL
- Install PHP dependencies
composer install- Install Node dependencies
npm install- Set up environment
cp .env.example .env
php artisan key:generate-
Configure database Edit
.envfile with your database credentials or use SQLite (default). -
Run migrations
php artisan migrate- Create admin user
php artisan make:filament-user- Build assets
npm run build- Start development server
php artisan serveVisit http://localhost:8000 to see your site!
Admin panel: http://localhost:8000/admin
- Go to the admin panel (
/admin) - Navigate to "Pages"
- Click "Create Page"
- Fill in basic information
- Use the "Visual Editor" tab to design your page with GrapesJS
- Publish when ready!
The GrapesJS editor includes:
-
Pre-built Components:
- Hero sections
- Text blocks
- Images & videos
- Buttons & forms
- Cards & columns
- And more!
-
Responsive Design: Preview and edit for desktop, tablet, and mobile
-
Style Manager: Customize colors, fonts, spacing, and more
-
Layer Management: Organize your page elements
- Responsive navigation with mobile menu
- SEO-optimized page rendering
- Clean, modern design with Tailwind CSS
- Automatic sitemap generation (coming soon)
- Page: Stores page content, metadata, and GrapesJS data
- PageController: Handles frontend page display
- PageResource: Filament admin resource for page management
- components/layout/app.blade.php: Main application layout
- components/layout/header.blade.php: Site header with navigation
- components/layout/footer.blade.php: Site footer
- components/layout/grapejs-edit-bar.blade.php: GrapesJS edit controls
- pages/show.blade.php: Frontend page template (simplified)
- filament/forms/components/grapesjs-editor.blade.php: GrapesJS editor component
- app.js: Alpine.js components and site functionality
- site.css: Site-wide styles and component styling
- Tailwind CSS: For styling and responsive design
- BlockService: Dynamic block loading and management
LaralGrape includes a powerful dynamic block system that automatically loads blocks from resources/views/filament/blocks/. Blocks are organized by category:
resources/views/filament/blocks/
βββ layouts/ # Layout blocks (hero, section, columns)
βββ content/ # Content blocks (text, heading)
βββ media/ # Media blocks (image, video)
βββ forms/ # Form blocks (contact form, newsletter)
βββ components/ # Component blocks (card, button)
- Choose a category and create a
.blade.phpfile - Add metadata at the top of the file:
{{-- @block id="my-block" label="My Block" description="A description of my block" --}}
<div class="my-block">
<!-- Your HTML content here -->
</div>- Make elements editable with GrapesJS attributes:
<h3 data-gjs-type="text" data-gjs-name="title">Editable Title</h3>See BLOCKS_README.md for detailed documentation.
Edit resources/js/grapesjs-editor.js and add new blocks to the blockManager.blocks array:
{
id: 'custom-block',
label: 'Custom Block',
content: '<div class="custom-block">Your HTML here</div>'
}- Global styles:
resources/views/pages/show.blade.php - Admin styles: Use Filament's theming system
- Custom CSS: Add to the page template or via GrapesJS
Add new page templates by:
- Adding options to the PageResource template select
- Creating corresponding view files
- Updating the PageController logic
app/
βββ Filament/
β βββ Forms/Components/ # Custom Filament form components
β βββ Resources/ # Filament admin resources
βββ Http/Controllers/ # Web controllers
βββ Models/ # Eloquent models
βββ Services/ # Application services
resources/
βββ js/ # JavaScript files
β βββ app.js # Alpine.js components
βββ css/ # Stylesheets
β βββ app.css # Main CSS with imports
β βββ site.css # Site-specific styles
βββ views/
βββ components/ # Reusable components
β βββ layout/ # Layout components
β β βββ app.blade.php
β β βββ header.blade.php
β β βββ footer.blade.php
β β βββ grapejs-edit-bar.blade.php
β βββ blocks/ # Block components (future)
β βββ forms/ # Form components (future)
βββ filament/
β βββ blocks/ # Dynamic block system
β β βββ layouts/ # Layout blocks
β β βββ content/ # Content blocks
β β βββ media/ # Media blocks
β β βββ forms/ # Form blocks
β β βββ components/ # Component blocks
β βββ forms/components/ # Filament form components
βββ pages/ # Frontend page templates
database/
βββ migrations/ # Database migrations
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open-sourced software licensed under the MIT license.
GrapesJS not loading:
- Ensure
npm run buildwas executed - Check browser console for JavaScript errors
Pages not displaying:
- Verify routes are correctly set up
- Check that pages are marked as published
Admin panel not accessible:
- Run
php artisan make:filament-userto create an admin user - Clear cache:
php artisan optimize:clear
For issues and questions:
- Check the documentation
- Search existing issues
- Create a new issue with detailed information
- Set
APP_ENV=production - Set
APP_DEBUG=false - Configure database
- Run
php artisan optimize - Run
npm run build - Set up proper file permissions
- Configure web server
- Set up SSL certificate
Built with β€οΈ using Laravel, GrapesJS, and Filament.
Made by Streats22 // StreatsDesign