Add platform filter to Discover, alongside keyword and TLD

Filters sites by server/powered_by/generator (e.g. "Shopify",
"WordPress", "nginx"), combinable with the existing keyword/TLD
filters. Results table now also shows each site's detected platform.

Verified: platform=Wix correctly isolates the one known Wix site,
tld=es+platform=nginx narrows to the 12 real nginx-hosted .es sites,
and the no-match case renders the empty state correctly.
This commit is contained in:
m105
2026-07-22 22:18:49 +03:00
parent c7299fe928
commit 27f91c7fea
2 changed files with 30 additions and 5 deletions
@@ -1,7 +1,7 @@
<div class="mx-auto max-w-5xl px-4 py-8">
<h1 class="text-2xl font-semibold">Discover competitors</h1>
<p class="mt-1 text-sm text-neutral-500">
Find sites by what they sell and where — e.g. keyword "honey", TLD "es".
Find sites by what they sell, where, and what they're built on — e.g. keyword "honey", TLD "es", platform "Shopify".
</p>
<div class="mt-6 flex flex-wrap gap-3">
@@ -17,6 +17,12 @@
placeholder="TLD, e.g. es"
class="w-full max-w-[10rem] rounded-md border border-neutral-300 px-3 py-2 text-sm focus:border-neutral-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"
>
<input
type="text"
wire:model.live.debounce.400ms="platform"
placeholder="Platform, e.g. WordPress"
class="w-full max-w-[14rem] rounded-md border border-neutral-300 px-3 py-2 text-sm focus:border-neutral-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"
>
</div>
<div class="mt-6 overflow-hidden rounded-lg border border-neutral-200 dark:border-neutral-800">
@@ -25,6 +31,7 @@
<tr>
<th class="px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-neutral-500">Domain</th>
<th class="px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-neutral-500">Title</th>
<th class="px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-neutral-500">Platform</th>
<th class="px-4 py-2 text-right text-xs font-medium uppercase tracking-wide text-neutral-500">Matching pages</th>
</tr>
</thead>
@@ -37,15 +44,16 @@
</a>
</td>
<td class="px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400">{{ $site->title ?? '—' }}</td>
<td class="px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400">{{ $site->generator ?? $site->powered_by ?? $site->server ?? '—' }}</td>
<td class="px-4 py-2 text-right text-sm text-neutral-600 dark:text-neutral-400">{{ $site->matching_pages_count }}</td>
</tr>
@empty
<tr>
<td colspan="3" class="px-4 py-6 text-center text-sm text-neutral-500">
<td colspan="4" class="px-4 py-6 text-center text-sm text-neutral-500">
@if ($hasQuery)
No matching sites.
@else
Enter a keyword or TLD to search.
Enter a keyword, TLD, or platform to search.
@endif
</td>
</tr>