Admin: Verified Search
Administration reference for the Verified Search feature — monitoring, shared content management, subscription gating, and technical architecture.
Admin Overview#
The Verified Search feature operates autonomously with no dedicated admin management UI. User data is stored in the SearchConversation, SearchMessage, and SearchSpace tables. Sharing creates public URLs accessible without authentication. Subscription tier gating is enforced at the API level via getUserTier() and hasFeatureAccess().
No Dedicated Admin Page
Database Impact#
The Perplexity Search Parity update added one new table and modified two existing tables:
| Table | Change | Growth Estimate |
|---|---|---|
| SearchSpace (NEW) | User-private workspaces with custom instructions | ~3 rows per active user |
| SearchConversation | Added shareToken (unique), isPublic (boolean), spaceId (FK) | ~10% of rows will have shareToken |
| SearchMessage | Added attachments (JSON, nullable) | ~8% of rows will have attachments |
Monitoring Search Usage#
Use these database queries to monitor adoption of search parity features:
Space Adoption
SearchSpace records to measure how many users are creating Spaces. Group by userId for per-user adoption.Sharing Adoption
SearchConversation records where shareToken IS NOT NULL to measure sharing usage.File Upload Usage
SearchMessage records where attachments IS NOT NULL to measure file upload adoption.Space Assignment Rate
SearchConversation records where spaceId IS NOT NULL to measure how many threads are organized into Spaces.Managing Shared Content#
If reported content is shared publicly via a share link, you can revoke access by updating the database directly:
Identify the conversation
SearchConversation record by its shareToken or id.Revoke the share link
isPublic = false and shareToken = NULL on the record. This immediately makes the public URL return a 404.Important
Subscription Gating#
All tier gating uses getUserTier() from lib/subscriptions/plan-gate.tsand hasFeatureAccess() from lib/subscriptions/feature-flags.ts. Limits are hardcoded in API route handlers (not configurable via admin UI).
| Limit | Explorer | Professional | Business | Enterprise |
|---|---|---|---|---|
| File Upload | 1 file / 5 MB | 5 files / 20 MB | 10 files / 40 MB | 10 files / 40 MB |
| Spaces | 3 | 25 | Unlimited | Unlimited |
| DOCX Export | Blocked | Allowed | Allowed | Allowed |
| PDF Branding | Always on | Optional | Optional | Optional |
| Image Generation | Blocked | Allowed | Allowed | Allowed |
| Personalization | Blocked | Allowed | Allowed | Allowed |
Data Models#
| Model | Key Fields | Purpose | Created By |
|---|---|---|---|
| SearchConversation | shareToken, isPublic, spaceId | Conversation with sharing and Space support | User starting a search |
| SearchMessage | attachments (JSON) | Message with optional file attachments | Each search query/response |
| SearchSpace | name, customInstructions, isDefault, userId | User-private workspace | User creating a Space |
API Endpoints#
| Method | Route | Auth | Purpose |
|---|---|---|---|
| POST/GET/DELETE | /api/search/conversations/[id]/share | Auth (owner) | Create/get/revoke share link |
| GET | /api/search/conversations/shared/[token] | Public | Fetch shared thread for public view |
| POST | /api/search/export | Auth | Generate PDF/DOCX export |
| POST | /api/search/upload | Auth | Upload files with text extraction |
| GET/POST | /api/search/spaces | Auth | List/create Spaces |
| GET/PATCH/DELETE | /api/search/spaces/[id] | Auth | Space detail/update/delete |
| POST | /api/search/generate-image | Auth (Professional+) | Generate image from prompt |
| GET/POST | /api/search/conversations | Auth | List (with spaceId filter) / create conversations |
| PATCH | /api/search/conversations/[id] | Auth | Update conversation (incl. spaceId move) |
Key Components#
| Component | File | Purpose |
|---|---|---|
| ShareThreadDialog | components/search/ShareThreadDialog.tsx | Share link creation/revocation modal |
| SharedThreadView | components/search/SharedThreadView.tsx | Read-only shared conversation renderer |
| ExportMenu | components/search/ExportMenu.tsx | PDF/DOCX/Markdown export dropdown |
| FileUploadZone | components/search/FileUploadZone.tsx | Drag-and-drop file upload |
| MediaResults | components/search/MediaResults.tsx | Image/video result cards |
| VoiceInputButton | components/search/VoiceInputButton.tsx | Web Speech API microphone |
| SpacesManager | components/search/SpacesManager.tsx | Space list with CRUD operations |
| SpaceInstructionsEditor | components/search/SpaceInstructionsEditor.tsx | Custom instructions editor |
| HomeFeed | components/search/HomeFeed.tsx | Starter suggestions + recent threads |
| ImageGenerationButton | components/search/ImageGenerationButton.tsx | Inline image generation |
| FocusModeSelector | components/search/FocusModeSelector.tsx | 10 focus mode chips |
Feature Gating Configuration#
Eight new feature keys were added to lib/subscriptions/feature-flags.ts:
| Feature Key | Explorer | Professional | Business | Enterprise |
|---|---|---|---|---|
| search:share | Yes | Yes | Yes | Yes |
| search:export-pdf | Yes | Yes | Yes | Yes |
| search:export-docx | No | Yes | Yes | Yes |
| search:file-upload | Yes | Yes | Yes | Yes |
| search:spaces | Yes | Yes | Yes | Yes |
| search:personalization | No | Yes | Yes | Yes |
| search:pages | No | Yes | Yes | Yes |
| search:generation | No | Yes | Yes | Yes |
Troubleshooting#
Search page returns 500 error
/api/search/spaces or /api/search/conversations.Cause: Database schema is out of sync — Prisma client expects columns that don't exist in the database.
Fix: Run
npx prisma db push to sync the schema, then restart.Share link returns 404
Cause: The share link was revoked, or the token is invalid.
Fix: Check if
shareToken exists on the SearchConversation record. If cleared, the owner must create a new share link.Export fails with 403
Cause: User is on Explorer tier attempting a gated feature.
Fix: User needs to upgrade. Verify tier via
getUserTier(userId).Space creation fails
Cause: User has reached their plan's Space limit.
Fix: Delete unused Spaces or upgrade plan. Check limits: Explorer=3, Professional=25, Business/Enterprise=unlimited.
File upload returns size error
Cause: File exceeds plan limits.
Fix: Check tier limits in
app/api/search/upload/route.ts. Explorer: 1 file/5MB, Professional: 5 files/20MB, Business+: 10 files/40MB.