HYVE Docs
Dump

Dump is a Next.js application within the HYVE monorepo that processes, stores, and retrieves content from multiple sources.

Tech Stack

LayerTechnology
FrameworkNext.js 16 (App Router)
LanguageTypeScript
DatabaseSupabase (PostgreSQL + pgvector)
AIGoogle Gemini (categorization + embeddings)
AuthSupabase Auth (SSR)
UI@hyve/ui + Tailwind v4 + Framer Motion
Package Managerpnpm (workspace)

Project Structure

page.tsx
layout.tsx
validations.ts

Data Flow

Input

User provides a URL, text, or image via the UI or API.

Detection

detectSource() in lib/extractors/detect.ts matches the input against URL patterns to determine the source type.

Extraction

The registered extractor for that source type pulls structured content (ExtractionResult).

AI Processing

categorizeContent() assigns category, subcategories, tags, summary, language, and entities. embedContent() generates a 768-dim vector.

Storage

The item is inserted into dump_items table in Supabase with full-text and vector indexes.

Retrieval

Search combines PostgreSQL tsvector with pgvector ANN similarity, re-ranked by a composite score.

Database Schema

dump_items Table

ColumnTypeDescription
iduuidPrimary key
urltextSource URL (nullable)
source_typetextOne of 9 source types
titletextExtracted title
contenttextFull extracted content
raw_contentjsonbRaw extraction output
authortextContent author
author_urltextAuthor profile URL
media_urlstext[]Array of media URLs
categorytextAI-assigned root category
subcategoriestext[]AI-assigned subcategories
tagstext[]AI-assigned tags
summarytextAI-generated summary
languagetextISO 639-1 code
notestextUser notes
embeddingvector(768)Semantic embedding (pgvector)
source_datetimestamptzOriginal publication date
created_attimestamptzIngestion timestamp
created_byuuidUser ID (FK to auth.users)
metadatajsonbAdditional metadata

Key Interfaces

ExtractionResult
interface ExtractionResult {
  title: string | null
  content: string
  author: string | null
  author_url: string | null
  media_urls: string[]
  source_date: string | null
  source_type: SourceType
  raw_content: Record<string, unknown>
  metadata: Record<string, unknown>
}
Extractor
interface Extractor {
  extract(input: string): Promise<ExtractionResult>
}
CategorizationResult
interface CategorizationResult {
  category: string
  subcategories: string[]
  tags: string[]
  summary: string
  language: string
  entities: Entity[]
}

UI Components

Dump's UI is organized into functional groups:

GroupComponentsPurpose
CardsDumpCard, ArticleCard, YouTubeCard, TwitterCard, etc.Source-specific content display
HUDSearchBar, IngestOverlay, FilterSidebar, ViewSwitcherMain interface controls
IngestIngestContainer, IngestInput, ProcessingStateContent ingestion flow
DetailDetailModal, RelatedItemsItem detail view
FeedFeedEmptyState, FilterChips, InfiniteScrollTriggerFeed/list view
NavigationBottomTabBar, ModeBarApp navigation (dump/feed/search/radar)

Shared Packages

Dump uses these workspace packages:

PackagePurpose
@hyve/uiShared UI components
@hyve/utilsLogging, utilities
@hyve/supabaseDatabase client creation (route, server, SSR)
@hyve/ragRAG chunk ingestion

On this page