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

Spotlight Laravel Package

wire-elements/spotlight

Livewire Spotlight adds an Alfred-like command palette to Laravel. Open with configurable keyboard shortcuts or toggle via events, then search, navigate, and run actions from a sleek input bar. Easy Composer install and Livewire directive.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enhancing User Experience (UX) for Power Users

    • Implement a Spotlight/Alfred-like search to reduce friction for frequent actions (e.g., navigation, commands, or workflows). Ideal for admin dashboards, SaaS platforms, or internal tools where users perform repetitive tasks.
    • Example Use Cases:
      • Quick navigation to settings, reports, or user profiles.
      • Triggering workflows (e.g., "Create invoice for Team X").
      • Searching and filtering data without leaving the current view.
  • Accelerating Developer Velocity

    • Build vs. Buy Decision: Avoid reinventing a global search/command system from scratch. This package provides a pre-built, extensible solution with Laravel/Livewire integration, reducing dev time by ~80%.
    • Roadmap Alignment: If your product roadmap includes power-user features (e.g., CLI-like shortcuts, macro commands, or AI-assisted workflows), this is a low-risk foundation to extend later.
  • Reducing Cognitive Load

    • Replace cluttered menus or deep navigation with a unified search interface. Particularly valuable for:
      • Complex dashboards (e.g., analytics tools, CRM platforms).
      • Multi-tenant applications where users need to switch contexts quickly.
      • Internal tools where users have diverse, ad-hoc needs.
  • A/B Testing and Feature Flags

    • Deploy Spotlight as a feature flag to test adoption before full rollout. Track metrics like:
      • Shortcut usage frequency (CTRL/K adoption).
      • Command completion rates (e.g., "How often do users trigger the 'Logout' command?").
      • Time saved (e.g., navigation tasks reduced from 5 clicks to 1 search).

When to Consider This Package

  • Look Elsewhere If:

    • Your app is static or content-light: Spotlight thrives on dynamic, action-driven workflows. Avoid if your primary use case is static content browsing (e.g., a blog).
    • You need deep customization beyond Livewire: If you require non-Livewire frontend frameworks (e.g., React/Vue) or serverless architectures, this package may not fit.
    • Performance is critical for search: Spotlight uses Fuse.js for client-side fuzzy search. For large datasets (>10K items), consider a dedicated search backend (e.g., Algolia, Meilisearch) with server-side indexing.
    • Accessibility is a priority: Spotlight’s default UI may not meet WCAG AA/AAA standards out of the box. Audit the published views (resources/views) before adoption.
    • You lack Livewire expertise: Requires familiarity with Livewire components, Alpine.js, and Laravel service providers. Not ideal for teams new to these tools.
  • Consider Alternatives If:

    • You need AI-powered suggestions: Pair with a LLM backend (e.g., Laravel Scout + Pinecone) for context-aware commands.
    • Mobile support is required: Spotlight is desktop-focused (keyboard shortcuts). For mobile, consider a bottom-sheet search bar (e.g., Laravel Nova’s search).
    • Multi-language support is critical: Default translations are limited. Extend via vendor:publish --tag=livewire-ui-spotlight-translations.

How to Pitch It (Stakeholders)

For Executives (Business Case)

*"Spotlight is a productivity multiplier for our power users—like giving them a keyboard-driven superpower. For example, in [Product X], users spend 15 minutes/day navigating menus to complete tasks. With Spotlight, we can cut that to 2 minutes by letting them search and execute actions via shortcuts (e.g., 'Create report for Q2' or 'Navigate to billing').

ROI:

  • Reduces support tickets by surfacing hidden features (e.g., 'How do I reset my password?' becomes a searchable command).
  • Increases retention for SaaS products by delighting advanced users.
  • Low dev cost: Leverages existing Laravel/Livewire stack; no new backend infrastructure.

Risk: Minimal—we can A/B test with a subset of users and measure adoption via shortcut usage analytics."*

For Engineers (Technical Summary)

*"Spotlight is a Livewire component that adds Alfred/Spotlight-like search to Laravel apps. Key benefits:

  • Plug-and-play: Install via Composer, add @livewire('livewire-ui-spotlight') to your layout, and define custom commands.
  • Extensible: Build commands with dependencies (e.g., 'Create user' → prompts for team + name) using Laravel’s DI container.
  • Customizable: Override shortcuts, UI, and translations via config files.
  • Performance: Client-side fuzzy search (Fuse.js) for instant results; no API calls until command execution.

Implementation Path:

  1. Phase 1: Integrate core Spotlight + 3–5 critical commands (e.g., Logout, Search Users, Navigate to Dashboard).
  2. Phase 2: Add dependency-driven commands (e.g., 'Create Invoice' → prompts for client + amount).
  3. Phase 3: Extend with analytics (track command usage) and A/B testing.

Dependencies:

  • Livewire 2/3.
  • Alpine.js (auto-included if using Livewire 2).
  • Tailwind CSS (optional; package includes fallback CSS).

Example Command:

class SearchUser extends SpotlightCommand {
    protected $name = 'Search User';
    protected $description = 'Find a user by name or email';

    public function execute(Spotlight $spotlight) {
        $spotlight->redirect('/users?search=' . request('query'));
    }
}
```"*

For Designers (UX Impact)

*"Spotlight transforms discovery and execution into a single action:

  • Before: Users hunt through menus (e.g., Dashboard → Reports → Q2 → Export).
  • After: They type 'export q2 report' and hit Enter.

Key UX Wins:

  • Reduces cognitive load: No more memorizing menu hierarchies.
  • Surfaces hidden features: Commands can include 'less obvious' actions (e.g., 'Purge cache').
  • Consistent UI: Uses a familiar modal pattern (like macOS Spotlight).

Design Considerations:

  • Ensure the placeholder text (e.g., 'What do you want to do?') aligns with your app’s tone.
  • Test keyboard shortcuts (CTRL/K) for accessibility and conflict with existing shortcuts.
  • Customize the command list styling to match your design system (publish views with vendor:publish)."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests