DLRSDLRS
Features

Files & Documents — Global Knowledge Graph

Drive files, uploaded PDFs, notes, and links form one searchable graph. Learn indexing, parsing, and the “ask, don't browse” search.

Files vs Documents vs Notes

TypeWhereExampleTable
FileAny binarylogo.png, reels.zipfiles
DocumentParsed, searchablebrief.pdf with tablesdocuments
NoteUser-written markdown“Client prefers shorter reel”notes
LinkURL referencehttps://drive.google.com/...links

Beginner: One Graph

File “GB-logo.png” can be linked to Client GB, Project Social Media, Task “Create reel”, and Email thread — all at once. Search finds it regardless of where you look.

Drive Indexing — How Search Works

Connect Drive

OAuth as in Integrations → stores token in vault. No file content stored long-term, just metadata + index.

Indexing Job

Job: drive_index (weekly or manual POST /api/integrations/drive/sync)
For each file in Drive:
- files { id, workspace_id, name, mime, folder_path, drive_id, parent_id, size }
- Extract text: Drive export → unpdf for PDFs, text for Docs
- Link: heuristics — name contains client/project → link
- Index: push to search (lib/search: fuse-like + vector optional)

Example

Folder: "GB-Banquet/Assets/logo-final.png"
→ Linked to client=GB Banquet (name match)
→ Query "GB logo" → returns file with highlight

Upload & Storage

STORAGE_DIR="./.storage"
Path: .storage/<workspace>/files/<id>-<filename>
DB: files { storage_path, mime, size, uploaded_by }

Pluggable: lib/storage/index.ts -> LocalAdapter
Swap: change adapter to R2Adapter (S3 API)

Document Intelligence (PDF/DOCX)

Keyword: Document Intelligence

Turns a 15-page PDF into searchable knowledge: extracts text, tables, dates, requirements, and makes it part of the graph.
Parser: unpdf + custom table detector
1
PDF → text blocks with bbox
Preserves position for table detection
2
Detect tables via line alignment
Finds columns: Requirements | Deliverable | Due
3
Extract columns
Requirements | Deliverable | Due
4
Summarize via LLM
3-sentence summary for search
5
Store
documents { title, content_text, summary, extracted_json, file_id }
Use: Brief says “Requirements: a) Use latest logo b) 9 photos” → becomes checklist items

Personal Search — One Query, All Sources

Route: /w/[workspace]/search or ⌘ K or Assistant “Show everything for GB Banquet”.

Query: "Where is GB latest logo?"
→Search Agent
Drive: GB-logo.png
0.95
Emails: attachment in Sarah's email
0.82
Tasks: previous task "Use logo"
0.77
Notes: "Use summer banner"
Ranking: recency + exact match + workspace_id filter → ranked list with file preview, provenance

Implementation: lib/search — current is keyword (Fuse), vector (pgvector) optional for future.

Context Pack Revisited

Every File/Document can appear in Task's Context Pack:

GB reel — Context Pack
Files: logo-final.png Open Drive
Documents: brief.pdf View Parsed
Links: drive.google.com/GB-Dec-2025
Related emails: thread
Click logo → preview without leaving task

Tiptap Document Editor & Public Sharing

Every Document has its own full-viewport editor page at /w/[workspace]/documents/[id] with an embedded Tiptap rich text canvas, live word wrapping, and fixed pinned controls:

  • Rich Authoring: Tables, headings, checklists, links, bold/italic, and quotes.
  • AI Summary & Context: Author or update the AI semantic summary used across agent context packs.
  • Public Link Sharing: Toggle public access and generate read-only sharing URLs (/share/[token] or /share/[id]) with downloadable source files.

Database & Keywords

files — binary
{ id, workspace_id, name, mime, size, storage_path, drive_id, folder_path, linked_client_id, linked_project_id }
documents — parsed
{ id, workspace_id, file_id, title, content_text, summary, extracted_json }
notes / links
{ id, workspace_id, title, content_md, linked_task_id }
Keywords: files (binary), documents (parsed), notes (markdown), links (URL), vault_items (encrypted)

On this page