Superduper Filament Starter Kit

repository·master·Indexed 42 days ago

https://github.com/riodwanto/superduper-filament-starter-kit

A comprehensive Filament 3 starter kit designed to accelerate application development. It includes pre-installed plugins for user management, media handling, content management, and localization, along with custom CLI tools like superduper:setup for automated configuration and superduper:lang-translate for Google Translate-powered language file translation.

Tokens
10.7K
Snippets
49
Records
73
Agent score
55%

What's inside Superduper Filament Starter Kit

  1. Understand the Project Structure

    master

    The starter kit follows a standard Laravel structure with specific directories for Filament and frontend assets:

    • app/Filament/: Contains Filament resources and pages.
    • app/Http/: Contains Controllers, middleware, etc.
    • app/Models/: Contains Eloquent models.
    • app/Policies/: Contains authorization policies.
    • config/: Contains system configuration files.
    • database/migrations/: Database schema definitions.
    • database/seeders/: Database seeders for initial data.
    • resources/css/: Custom CSS files.
    • resources/docs/: Documentation files.
    • resources/js/: JavaScript files.
    • resources/views/: Blade templates.
    • tests/: Test files.
    app/
    ├── Filament/           # Filament resources and pages
    ├── Http/               # Controllers, middleware, etc.
    ├── Models/             # Eloquent models
    ├── Policies/           # Authorization policies
    resources/
    ├── css/                # Custom CSS
    ├── docs/               # Documentation files
    ├── js/                 # JavaScript files
    ├── views/              # Blade templates
    config/                 # Configuration files
    database/
    ├── migrations/         # Database migrations
    ├── seeders/            # Database seeders
    tests/                  # Test files
  2. Manage Users and Access Control

    master

    The starter kit includes a pre-configured Role-based Access Control (RBAC) system. You can manage users, assign roles, and define granular permissions through the Admin Panel.

    Supported roles include:

    • Super Admin
    • Admin
    • Editor
    • User

    For debugging purposes, the system supports user impersonation, allowing administrators to act as other users to troubleshoot permission or UI issues.

  3. Quick Start with SuperDuper Filament Starter Kit

    master

    To set up a new project using the SuperDuper Filament Starter Kit, follow these three steps:

    1. Create the project using Composer.
    2. Run the setup wizard to configure the environment and initial settings.
    3. Access the admin panel using the default credentials provided below.

    Default Admin Credentials:

    • URL: http://localhost:8000/admin
    • Email: superadmin@starter-kit.com
    • Password: superadmin
    # 1. Create a new project
    composer create-project riodwanto/superduper-filament-starter-kit
    
    # 2. Run the setup wizard
    php bin/setup.php
  4. Optimize frontend assets and images

    master

    Improve frontend loading speeds by optimizing assets and images:

    Asset Optimization

    1. Minify CSS and JavaScript by running: npm run production.
    2. Enable gzip compression on your web server.
    3. Use a Content Delivery Network (CDN) for static assets.

    Image Optimization

    1. Use responsive images with srcset and sizes attributes to serve appropriate sizes for different devices.
    2. Use modern formats like WebP.
    <img 
        srcset="image-320w.jpg 320w,
                image-480w.jpg 480w,
                image-800w.jpg 800w"
        sizes="(max-width: 320px) 280px,
               (max-width: 480px) 440px,
               800px"
        src="image-800w.jpg"
        alt="Description">
    npm run production
  5. Install the Superduper Filament Starter Kit

    master

    You can create a new project using Composer. Follow these steps to initialize the project and install all necessary dependencies.

    1. Create the project:
    composer create-project riodwanto/superduper-filament-starter-kit
    cd superduper-filament-starter-kit
    1. Install PHP and Node dependencies:
    composer install && npm install
    composer create-project riodwanto/superduper-filament-starter-kit
    cd superduper-filament-starter-kit
    composer install && npm install
  6. Customize the Filament Theme with Tailwind CSS

    master

    To change the visual appearance of the Filament panel, edit tailwind.config.js. Ensure you import the Filament preset and include the necessary paths in the content array so Tailwind can scan Filament's PHP and Blade files. You can then extend the theme.extend.colors object to override the primary color palette.

    import preset from './vendor/filament/support/tailwind.config.preset'
    
    export default {
        presets: [preset],
        content: [
            './app/Filament/**/*.php',
            './resources/views/filament/**/*.blade.php',
            './vendor/filament/**/*.blade.php',
        ],
        theme: {
            extend: {
                colors: {
                    primary: {
                        50: '#f0f9ff',
                        // ... other colors
                        900: '#0c4a6e',
                    },
                },
            },
        },
    }