Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Search Spotlight Laravel Package

wezlo/filament-search-spotlight

Full-screen Spotlight/command-palette search for Filament panels (⌘K/Ctrl+K). Aggregates global search records plus resources, pages, and actions, with recent/pinned items stored in localStorage. Keyboard navigation, configurable per panel and via config.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Pros:

    • Native Filament Alignment: Built for Filament’s ecosystem, leveraging GlobalSearchProvider and resource/page architecture. Minimal architectural friction for Laravel/Filament-based admin panels.
    • Decoupled Components: Categories (records, resources, pages, actions) are modular, allowing selective enablement or custom replacements (e.g., override RecordsCategory for advanced search logic).
    • Client-Side Efficiency: LocalStorage persistence for recent/pinned items eliminates server-side state management, reducing database load and complexity.
    • Action-Driven UX: The SpotlightAction registry enables dynamic, keyword-searchable actions (e.g., "Clear Cache") without custom development, aligning with Filament’s action system.
    • Config-Driven Customization: Fluent API and config file support enable panel-specific tweaks (e.g., disable default global search, exclude resources) without code changes.
    • Keyboard-First Design: Native support for keyboard navigation (arrow keys, escape) improves accessibility and power-user efficiency, a key differentiator from top-bar search.
  • Cons:

    • Filament Dependency: Tight coupling to Filament’s resource/page structure (e.g., getGloballySearchableAttributes()) limits reuse in non-Filament Laravel apps. Would require abstraction layers for broader adoption.
    • Search Limitations: Relies on Filament’s built-in search providers; advanced features (e.g., fuzzy matching, synonyms) require custom category implementations.
    • No Server-Side Analytics: Client-side persistence precludes tracking search patterns or user behavior, which may be critical for data-driven teams.
    • Tailwind Assumption: Designed for Tailwind users; non-Tailwind projects would need manual CSS integration, adding complexity.

Integration Feasibility

  • Stack Fit:
    • Laravel/Filament: Zero friction for Filament v3+ panels. Leverages existing GlobalSearchProvider and resource architecture.
    • Tailwind CSS: Native support via @source directive for compiled themes. Non-Tailwind projects would require manual asset inclusion.
    • PHP 8.1+: Compatible with modern Laravel versions (tested up to 2026-07-01).
  • Migration Path:
    • Step 1: Install via Composer (wezlo/filament-search-spotlight).
    • Step 2: Register plugin in PanelProvider (1 line).
    • Step 3: Update Tailwind config (if applicable) and rebuild assets.
    • Step 4: Optional: Publish config file and customize via fluent API or config.
  • Compatibility:
    • Filament v3+: Full support; v2 may require adjustments.
    • Custom Resources: Auto-detects getGloballySearchableAttributes(); non-compliant resources can be excluded via excludeResources().
    • Localization: Supports English and Central Kurdish (Sorani); additional languages would need manual translation files.

Technical Risk

  • Low-Medium:
    • Tailwind Dependency: Risk of broken styles if not configured correctly (mitigated by clear docs).
    • Custom Category Complexity: Extending functionality (e.g., adding a "Reports" category) requires implementing the Category contract (moderate effort).
    • Keyboard Conflict: Default mod+k binding could clash with existing shortcuts (configurable via keyBinding()).
    • LocalStorage Quirks: Client-side persistence may cause inconsistencies in shared sessions or multi-tab scenarios (e.g., pinned items not syncing).
  • Mitigation:
    • Test in a staging environment with representative Filament resources.
    • Use the fluent API to override defaults (e.g., keyBinding('ctrl+shift+f')).
    • Document limitations of client-side persistence for support teams.

Key Questions

  1. User Needs:
    • Are power users in your Filament panels frustrated with current navigation? (Validate via analytics or user feedback.)
    • Do users frequently perform actions like "Create [Resource]" or "Impersonate User"? (Spotlight actions could replace custom buttons.)
  2. Technical Constraints:
    • Is your Filament panel using Tailwind CSS? If not, can you manually include the package’s CSS?
    • Are there existing keyboard shortcuts that conflict with mod+k?
  3. Customization Requirements:
    • Do you need to add custom search categories (e.g., "Settings," "API Endpoints")?
    • Should recent/pinned items be synced across devices or logged server-side?
  4. Scaling:
    • How many Filament panels/resources will use this? (Performance impact of aggregating results is minimal but should be tested at scale.)
    • Will you need to disable the default global search input for consistency?

Integration Approach

Stack Fit

  • Primary Stack:
    • Laravel 10+: Compatible with modern Laravel versions (tested up to 2026-07-01).
    • Filament v3+: Native integration with Filament’s resource/page system. Assumes GlobalSearchProvider is implemented for records.
    • Tailwind CSS: Optimized for Tailwind users (utility classes are preserved via @source directive). Non-Tailwind projects require manual CSS inclusion.
    • PHP 8.1+: Uses modern PHP features (e.g., named arguments, enums).
  • Secondary Stack:
    • Livewire/Inertia: Works alongside Filament’s frontend stack; no conflicts expected.
    • Custom Frontend: Can be adapted for non-Tailwind projects with minimal effort (copy/paste CSS from resources/views).

Migration Path

  1. Preparation:
    • Verify Filament version (>=3.0).
    • Check Tailwind setup (if using compiled themes).
    • Identify existing keyboard shortcuts that might conflict with mod+k.
  2. Installation:
    composer require wezlo/filament-search-spotlight
    
  3. Plugin Registration: Update PanelProvider (e.g., app/Providers/Filament/AdminPanelProvider.php):
    ->plugins([
        FilamentSearchSpotlightPlugin::make()
            ->keyBinding('mod+k') // Optional: customize binding
            ->placeholder('Jump to...'), // Optional
    ])
    
  4. Tailwind Configuration (if applicable): Update resources/css/filament/admin/theme.css:
    @source '../../../../vendor/wezlo/filament-search-spotlight/resources/views/**/*';
    
    Rebuild assets:
    npm run build
    
  5. Optional Customization:
    • Publish config file:
      php artisan vendor:publish --tag=filament-search-spotlight-config
      
    • Register global actions in AppServiceProvider::boot():
      SpotlightAction::make('clear-cache')
          ->label('Clear Cache')
          ->keywords(['flush', 'cache'])
          ->url(route('admin.cache.clear'))
          ->register();
      
    • Exclude resources or disable categories via fluent API or config.

Compatibility

  • Filament Resources:
    • Auto-detects resources with getGloballySearchableAttributes(). Non-compliant resources can be excluded via excludeResources([Resource::class]).
    • Auto-generates "Create [Resource]" actions for resources with a create page (disable with disableCreateActions()).
  • Pages:
    • Fuzzy-matches standalone panel pages by navigation label.
  • Actions:
    • Supports both global (app-wide) and panel-scoped actions. Plugin-scoped actions override global ones with the same name.
  • Localization:
    • Out-of-the-box support for English and Central Kurdish (Sorani). Additional languages require manual translation files.

Sequencing

  1. Phase 1: Basic Integration (1 day):
    • Install package, register plugin, test default functionality.
    • Validate keyboard binding and search results across key resources/pages.
  2. Phase 2: Customization (0.5–1 day):
    • Configure placeholder text, max width, or result limits.
    • Exclude non-relevant resources or disable categories.
    • Register custom actions (e.g., "Log Out," "Impersonate User").
  3. Phase 3: Advanced Use Cases (1–2 days):
    • Implement custom categories (e.g., "Settings," "Reports").
    • Extend SpotlightAction for dynamic URLs or conditional logic.
    • Test edge cases (e.g., empty results, keyboard navigation).
  4. Phase 4: Rollout (0.5 day):
    • Deploy to staging, gather feedback.
    • Update documentation for support teams.
    • Monitor for performance issues or conflicts.

Operational Impact

Maintenance

  • Pros:
    • Minimal Server-Side Maintenance: No database migrations or server-side state management. LocalStorage handles persistence.
    • No Dependencies: Isolated from Filament core updates (backward-compatible with v3+).
    • Lightweight Updates: Package updates are infrequent (last release: 2026-07-01) and focused on bug fixes/feature additions.
  • Cons:
    • **Client-S
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky