Dump is a Next.js application within the HYVE monorepo that processes, stores, and retrieves content from multiple sources.
Tech Stack
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Database | Supabase (PostgreSQL + pgvector) |
| AI | Google Gemini (categorization + embeddings) |
| Auth | Supabase Auth (SSR) |
| UI | @hyve/ui + Tailwind v4 + Framer Motion |
| Package Manager | pnpm (workspace) |
Project Structure
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
| Column | Type | Description |
|---|---|---|
id | uuid | Primary key |
url | text | Source URL (nullable) |
source_type | text | One of 9 source types |
title | text | Extracted title |
content | text | Full extracted content |
raw_content | jsonb | Raw extraction output |
author | text | Content author |
author_url | text | Author profile URL |
media_urls | text[] | Array of media URLs |
category | text | AI-assigned root category |
subcategories | text[] | AI-assigned subcategories |
tags | text[] | AI-assigned tags |
summary | text | AI-generated summary |
language | text | ISO 639-1 code |
notes | text | User notes |
embedding | vector(768) | Semantic embedding (pgvector) |
source_date | timestamptz | Original publication date |
created_at | timestamptz | Ingestion timestamp |
created_by | uuid | User ID (FK to auth.users) |
metadata | jsonb | Additional metadata |
Key Interfaces
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>
}interface Extractor {
extract(input: string): Promise<ExtractionResult>
}interface CategorizationResult {
category: string
subcategories: string[]
tags: string[]
summary: string
language: string
entities: Entity[]
}UI Components
Dump's UI is organized into functional groups:
| Group | Components | Purpose |
|---|---|---|
| Cards | DumpCard, ArticleCard, YouTubeCard, TwitterCard, etc. | Source-specific content display |
| HUD | SearchBar, IngestOverlay, FilterSidebar, ViewSwitcher | Main interface controls |
| Ingest | IngestContainer, IngestInput, ProcessingState | Content ingestion flow |
| Detail | DetailModal, RelatedItems | Item detail view |
| Feed | FeedEmptyState, FilterChips, InfiniteScrollTrigger | Feed/list view |
| Navigation | BottomTabBar, ModeBar | App navigation (dump/feed/search/radar) |
Shared Packages
Dump uses these workspace packages:
| Package | Purpose |
|---|---|
@hyve/ui | Shared UI components |
@hyve/utils | Logging, utilities |
@hyve/supabase | Database client creation (route, server, SSR) |
@hyve/rag | RAG chunk ingestion |