HyperSaaS
FrontendDocuments

Overview

Document management UI with upload, viewer, and knowledge base organization.

The documents module provides a complete UI for uploading files, managing knowledge bases, viewing documents with chunk highlighting, and attaching knowledge bases to chat sessions.

Component Architecture

Knowledge Base Pages

    ├── KnowledgeBaseList (TanStack Table)
    │   ├── Search + sort + pagination
    │   ├── Create KB modal
    │   └── Delete KB confirmation

    └── KnowledgeBaseDetail
        ├── KB metadata (name, description, access)
        ├── DocumentsTable (documents in this KB)
        └── DocumentUpload (add files to KB)

Document Pages

    ├── WorkspaceDocumentsList
    │   ├── Documents table
    │   └── Upload button

    └── DocumentViewerPage
        ├── PDF renderer (pdfjs-dist)
        ├── Chunk highlighting
        └── Page navigation

Chat Integration

    └── ChatSettingsForm
        ├── Attach/detach KBs to session
        └── KB selector (multi-select command)

Pages

RouteComponentDescription
.../documentsWorkspaceDocumentsListAll documents in workspace
.../documents/[docId]/viewDocumentViewerPagePDF viewer with chunk highlights
.../knowledge-basesKnowledgeBaseListAll KBs in workspace
.../knowledge-bases/[kbId]KnowledgeBaseDetailKB detail + documents

Features

Document Upload

Drag-and-drop or click-to-select file upload using the S3 presigned URL flow. Supports multi-file upload with per-file progress tracking.

Knowledge Base Management

  • Create, edit, delete knowledge bases
  • Share with workspace or restrict to teams
  • Add/remove documents from KBs
  • View document count and status per KB

Document Viewer

Full-page PDF viewer powered by pdfjs-dist:

  • Page-by-page rendering
  • Chunk highlight overlay (when opened from a citation)
  • Page navigation controls
  • Responsive sizing

Chat Integration

Knowledge bases are attached to chat sessions via the settings panel. Once attached, the AI agent can search documents in those KBs using the search_knowledge_base tool.

Permission-Based UI

ActionOwnerAdminMember
View documentsYesYesYes
Upload documentsYesYesYes
Delete documentsYesYesNo
Create KBYesYesYes
Delete KBYesYesNo
Manage KB accessYesYesNo

On this page