Cards Overview
Cards are the fundamental building blocks of Teak. Every piece of content you save—whether it’s a quick thought, a link, an image, or a document—becomes a card in your personal knowledge hub.What is a Card?
A card is a unified data structure that can represent different types of content. All cards share common properties while supporting type-specific metadata and features.Common Card Properties
Every card includes:- Content: The main text or data associated with the card
- Type: One of 8 card types (text, link, image, video, audio, document, palette, quote)
- Tags: User-defined labels for organization
- Notes: Additional context or annotations
- Timestamps: Creation time (
createdAt) and last update time (updatedAt) - Favorite status: Quick access to important cards
- Deletion state: Soft-delete support for trash functionality
Type-Specific Properties
Depending on the card type, additional properties may include:- URL: For link cards
- File storage: References to uploaded files (
fileId,thumbnailId) - Metadata: Rich preview data for links, file information for media
- AI-generated fields: Auto-extracted tags, summaries, and transcripts
- Colors: Palette information for image and palette cards
All cards have a unique identifier (
_id) and creation timestamp (_creationTime) automatically added by Convex.Card Schema
Here’s the core card validator from the schema:Card Lifecycle
1. Creation
When a card is created:- Basic properties are set (content, type, userId)
- Timestamps are recorded
- Processing pipeline is triggered (if AI features enabled)
2. Processing
New cards enter an AI processing pipeline that:- Classifies the content type (if not explicitly provided)
- Categorizes links into specific types (articles, videos, products, etc.)
- Extracts metadata (AI tags, summaries, transcripts)
- Generates renderables (thumbnails for images/videos/documents)
processingStatus field:
3. Updates
Cards can be updated at any time:- User-editable fields:
content,tags,notes,isFavorited - System-managed fields:
aiTags,aiSummary, metadata - The
updatedAttimestamp is automatically refreshed
4. Deletion
Teak uses soft-deletion:- Cards are marked with
isDeleted: trueanddeletedAt: timestamp - Deleted cards remain queryable for trash/recovery features
- Hard deletion removes cards permanently from the database
Indexing & Performance
Cards are indexed for fast queries:Search Indexes
Full-text search is enabled across multiple fields:content- Main card contentnotes- User annotationsaiSummary- AI-generated summariesaiTranscript- Audio/video transcriptsmetadataTitle- Link preview titlesmetadataDescription- Link preview descriptionstags- User-defined tagsaiTags- AI-generated tagsvisualStyles- Visual style classificationscolorHexes- Color palette hex codescolorHues- Color hue categories
Each search index supports filtering by
userId, isDeleted, type, and isFavorited for efficient queries.File Storage
Cards can reference files stored in Convex’s file storage system:- fileId: Primary file (original image, video, audio, document)
- thumbnailId: Generated thumbnail for preview
- fileMetadata: Detailed file information
Metadata Structure
Link cards include rich preview metadata:Next Steps
Card Types
Explore all 8 card types in detail
AI Processing
Learn how AI enhances your cards
Search
Discover powerful search capabilities
Organization
Master tags, favorites, and filters