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.
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:
Install (pin carefully — the package is archived):
composer require nicolasbeauvais/nova-algolia-card
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.
Register the card in app/Nova/NovaServiceProvider.php:
public function cards()
{
return [
new \NicolasBeauvais\NovaAlgoliaCard\NovaAlgoliaCard,
];
}
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.
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:
php artisan scout:import "App\Models\Post".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.
Archived — treat as frozen. The package is archived, so:
laravel-nova tooling. If the card breaks visually, you'll need to fork and rebuild the component yourself.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.storage/logs/laravel.log for the underlying Algolia API exception (404 index not found, 403 forbidden).tinker using Algolia\AlgoliaSearch\SearchClient::create($appId, $adminKey)->listIndices() to confirm credentials before blaming the card.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:
listIndices() directly — you control caching, auth, and layout.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.
How can I help you explore Laravel packages today?