Weave 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

Nova Algolia Card Laravel Package

nicolasbeauvais/nova-algolia-card

A Laravel Nova card that brings Algolia search analytics into your dashboard, showing top queries, no-result searches, and key metrics so you can monitor and improve search performance without leaving Nova.

View on GitHub
Deep Wiki
Context7

Getting Started

The package is a Nova dashboard card that surfaces Algolia index metrics (record counts, index health/sync state) inside your Nova admin, so you get at-a-glance visibility into search data without leaving the admin panel.

Minimal setup:

  1. Install (pin carefully — the package is archived):

    composer require nicolasbeauvais/nova-algolia-card
    
  2. Configure Algolia credentials. The card reads your existing Algolia credentials — most commonly the same env vars Scout uses:

    ALGOLIA_APP_ID=XXXXXXXXXX
    ALGOLIA_SECRET=your-admin-api-key
    

    If the package ships a config file, publish it first and check the key names:

    php artisan vendor:publish --provider="NicolasBeauvais\NovaAlgoliaCard\NovaAlgoliaCardServiceProvider"
    

    Confirm the exact provider/config keys against the README in vendor/nicolasbeauvais/nova-algolia-card — the package is archived, so the README is the source of truth, not the docs site.

  3. Register the card in app/Nova/NovaServiceProvider.php:

    public function cards()
    {
        return [
            new \NicolasBeauvais\NovaAlgoliaCard\NovaAlgoliaCard,
        ];
    }
    
  4. First use case: open /nova as an admin and confirm the card renders index stats. Then click through to the Algolia dashboard if a link is provided. If record counts are non-zero and match scout:import/scout:flush results, you're done.

Where to look first: the package's src/ directory (card class + Vue component) and its README. Since it's archived and low-star, assume the README is the only documentation and budget time to read the card class to understand exactly which Algolia API calls it makes.

Implementation Patterns

Dashboard monitoring card. The primary pattern is a single card on the Nova dashboard showing per-index record counts. Place it near your other operational cards (Horizon, queue metrics) so sync lag between your DB and Algolia is obvious:

public function cards()
{
    return [
        (new \NicolasBeauvais\NovaAlgoliaCard\NovaAlgoliaCard)->index('posts'),
        (new \NicolasBeauvais\NovaAlgoliaCard\NovaAlgoliaCard)->index('products'),
    ];
}

(Verify whether the card is configurable per-instance or per-config-file; a single-instance design would mean one card per index only if the package supports it.)

Pair with Scout. If you use laravel/scout with the Algolia driver, this card complements your import workflow. A practical workflow:

  1. Run php artisan scout:import "App\Models\Post".
  2. Refresh the Nova dashboard and watch the record count converge.
  3. Add the card to a "Search" dashboard or group so it's not cluttering the main dashboard in large apps.

Sync-gap auditing. Use the card as a smoke test after deploys or queue backfills: compare the card's record count against Model::searchable()->count() (or a raw DB count in a tinker session). Mismatches are your first signal that queue workers or Scout import jobs failed.

Resource-level embedding. Nova allows cards inside resources too. If the package's card supports it, mount it on a searchable model's resource page to show "records in Algolia for this index" next to the model itself — useful for editors who don't need full Algolia dashboard access.

Access control. Wrap the card in Nova's authorization/visibility helpers if supported, or gate the whole Nova dashboard group behind a policy. The card will use your admin API key server-side, so keep it out of lower-privilege Nova users' views where possible.

Gotchas and Tips

Archived — treat as frozen. The package is archived, so:

  • No fixes for new Nova major versions (Nova 4/5 compatibility is not guaranteed). Pinning your Nova version is essential; test upgrades in a branch.
  • The bundled Vue assets may not build against current laravel-nova tooling. If the card breaks visually, you'll need to fork and rebuild the component yourself.
  • Audit it before adoption in a commercial project — low stars + archived status means limited community vetting.

Admin key required. Record counts and index metadata generally require an admin-level API key. A search-only key will often 403/401 on stats endpoints. Don't reuse your production admin key in local .env files — use a scoped Algolia key restricted to the relevant indexes where possible.

Credentials must stay server-side. Nova cards are server-rendered then hydrated in Vue. Verify the card doesn't leak the admin key into the JS payload (inspect network responses). If it does, fork and strip it — this is the kind of thing archived packages won't fix.

Index names are exact. Algolia index names are case-sensitive and can be environment-suffixed (Scout typically prefixes with ALGOLIA_PREFIX / app env, e.g. production_posts). A card showing 0 records often just means you configured the wrong index name. Check config/scout.php for the prefix.

Rate limits. Every dashboard load hits Algolia's API. Multiple cards × many admins can burn through your requests-per-minute quota on the free/entry tier. Cache the card output (e.g. Cache::remember('algolia-stats', 300, ...)) if the card doesn't already do so — likely requires a small fork.

Debugging. If the card shows an error or blank state:

  • php artisan config:clear after .env changes.
  • Check storage/logs/laravel.log for the underlying Algolia API exception (404 index not found, 403 forbidden).
  • Test the same call directly with tinker using Algolia\AlgoliaSearch\SearchClient::create($appId, $adminKey)->listIndices() to confirm credentials before blaming the card.
  • Run php artisan nova:publish and npm run dev in the Nova directory if assets look stale.

Extension points are limited. With an archived package, the realistic extension path is forking: copy the card class and Vue component into app/Nova/Cards, rename it, and iterate. That's usually less painful than trying to patch a vendor/ package.

Consider alternatives before committing. Given the archived status, weigh:

  • A custom Nova card (~1 file controller + 1 Vue component) calling listIndices() directly — you control caching, auth, and layout.
  • Algolia's own dashboard + a simple Nova metric for record counts.
  • algolia/scout-extended (same author, actively maintained) for the underlying search concerns, and drop the card entirely if it's only decorative.

Don't rely on it for correctness. Treat the card as a visual hint, not a monitoring source of truth. Pair it with a scheduled job that asserts Algolia record counts equal DB counts and alerts on drift — that's what actually protects search quality.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib