> ## Documentation Index
> Fetch the complete documentation index at: https://docs.divorce.law/llms.txt
> Use this file to discover all available pages before exploring further.

# LexVault Document Management

> Enterprise document management with AI-powered processing and semantic search

## What is LexVault?

LexVault is Victoria AI OS's **enterprise document management system** that combines traditional document storage with cutting-edge AI processing. Every document you upload is automatically processed, indexed, and made searchable—both by keywords and semantic meaning.

## Key Features

<CardGroup cols={2}>
  <Card title="AI-Powered Processing" icon="wand-magic-sparkles">
    Automatic extraction of facts, dates, amounts, and key information from every document
  </Card>

  <Card title="Hybrid Search" icon="magnifying-glass">
    Find documents by keywords, semantic meaning, or natural language questions
  </Card>

  <Card title="Smart Categorization" icon="folder-tree">
    Auto-categorization by document type with custom folder organization
  </Card>

  <Card title="SOC 2 Compliant Storage" icon="shield-check">
    Bank-level encryption and multi-tenant isolation for attorney-client privilege
  </Card>
</CardGroup>

## Supported File Types

LexVault supports all common legal document formats:

### Documents

* **PDF** - Full OCR and text extraction
* **Word** (.doc, .docx) - Native text extraction
* **Excel** (.xls, .xlsx) - Table and data extraction

### Images

* **JPG/JPEG** - OCR text extraction
* **PNG** - OCR text extraction
* **TIFF** - Multi-page document scanning

### Emails

* **MSG** - Outlook email files
* **EML** - Standard email format

### Other

* **TXT** - Plain text files
* **CSV** - Data import

<Tip>
  Maximum file size: 100MB per file. For larger files, contact support for enterprise upload options.
</Tip>

## Upload Process

<Steps>
  <Step title="Select Files">
    Drag and drop files into LexVault or click **Upload** to select files:

    * Single or multiple files at once
    * Entire folders (desktop app)
    * From email attachments
  </Step>

  <Step title="AI Processing">
    LexVault automatically:

    * Extracts text via OCR or native parsing
    * Identifies document type
    * Extracts key facts and metadata
    * Generates embeddings for semantic search
    * Creates thumbnail preview

    Processing time: 10-60 seconds per document
  </Step>

  <Step title="Fact Extraction">
    Extracted information flows to CaseMind:

    * Parties mentioned
    * Financial amounts
    * Dates and deadlines
    * Legal issues
    * Asset descriptions
  </Step>

  <Step title="Ready to Use">
    Documents are immediately searchable and available to Victoria AI agents
  </Step>
</Steps>

## Document Organization

### Auto-Categorization

LexVault automatically categorizes documents:

| Category           | Document Types                           | Examples                     |
| ------------------ | ---------------------------------------- | ---------------------------- |
| **Pleadings**      | Petitions, Responses, Motions            | Petition for Dissolution     |
| **Financial**      | Affidavits, Bank Statements, Tax Returns | Financial Affidavit (FL-150) |
| **Discovery**      | Requests, Responses, Interrogatories     | Request for Production       |
| **Court Orders**   | Orders, Judgments, Decrees               | Temporary Order              |
| **Correspondence** | Letters, Emails                          | Attorney demand letter       |
| **Evidence**       | Photos, Screenshots, Documents           | Text message screenshots     |
| **Expert Reports** | Appraisals, Evaluations                  | Real estate appraisal        |

### Custom Folders

Create your own folder structure:

```
Case: Smith v. Smith
├── Court Filings
│   ├── Petitions & Responses
│   └── Motions
├── Financial Documents
│   ├── Tax Returns
│   ├── Bank Statements
│   └── Appraisals
├── Discovery
│   ├── Requests
│   └── Responses
└── Correspondence
    ├── Client
    └── Opposing Counsel
```

## Search Capabilities

LexVault offers three powerful search methods:

### 1. Keyword Search

Traditional full-text search:

```
"financial affidavit" → Finds exact phrase
2023 W-2 → Finds documents mentioning both terms
bank statement -checking → Excludes "checking"
```

### 2. Semantic Search

Natural language questions:

```
"What is the husband's income?" → Finds pay stubs, W-2s, affidavits
"When did they buy the house?" → Finds deeds, purchase agreements
"What cars do they own?" → Finds registrations, titles, loan docs
```

### 3. Metadata Filters

Filter by:

* **Document type** (Financial, Pleading, Discovery, etc.)
* **Upload date** (Last 7 days, Last month, Custom range)
* **File type** (PDF, Word, Excel, etc.)
* **Uploaded by** (Which team member)
* **Tags** (Custom labels)

<Tip>
  Combine search methods: Use semantic search to find relevant documents, then refine with filters.
</Tip>

## Document Viewer

View documents directly in LexVault:

* **PDF Rendering** - High-quality display with zoom
* **Text Selection** - Copy text from any document
* **Page Navigation** - Jump to specific pages
* **Annotations** - Highlight and comment (coming soon)
* **Download** - Original file download anytime

## Victoria AI Integration

Every Victoria AI agent can access LexVault documents:

### Document-Grounded Responses

When you ask Victoria a question, she:

1. Searches LexVault for relevant documents
2. Reads the document content
3. Provides answers with specific citations

**Example:**

```
You: "What is the husband's monthly income?"

Victoria searches LexVault → Finds "Pay Stub - John Smith - Oct 2024"
Victoria reads: Monthly gross income $12,500

Victoria: "According to the October 2024 pay stub,
John Smith's monthly gross income is $12,500."
```

### Citation Links

Victoria's responses include clickable links to source documents:

* Click to open the exact document
* Highlights the relevant section
* Verifies information independently

## Security & Access Control

### Firm-Level Isolation

LexVault implements strict multi-tenant isolation:

* Each firm's documents are completely separate
* Subdomain-based access control
* Database Row Level Security (RLS)
* No cross-firm data leakage possible

### Case-Level Permissions

Control who sees what within your firm:

* **Firm Admins**: Access all cases
* **Lawyers**: Access assigned cases only
* **Staff**: Access based on role settings
* **Clients**: View-only access to their case documents

### Encryption

All documents protected by:

* **At Rest**: AES-256 encryption on Cloudflare R2
* **In Transit**: TLS 1.3 for all uploads/downloads
* **Backups**: Encrypted multi-region replication

### Audit Logs

Every document action is logged:

* Who uploaded
* When accessed
* Who downloaded
* Any deletions (soft delete with recovery)

## Document Processing Details

### Text Extraction

LexVault uses multiple extraction methods:

| File Type     | Method          | Quality        |
| ------------- | --------------- | -------------- |
| PDF (digital) | Native text     | Excellent      |
| PDF (scanned) | OCR (Tesseract) | Very Good      |
| Word/Excel    | Native parsing  | Excellent      |
| Images        | OCR             | Good-Very Good |

### OCR Technology

For scanned documents and images:

* **Engine**: Tesseract OCR + LlamaCloud
* **Accuracy**: 95-99% depending on scan quality
* **Languages**: English (primary), Spanish support
* **Preprocessing**: Auto-rotation, contrast enhancement

<Warning>
  For best OCR results, upload documents at 300 DPI or higher. Low-quality scans may have reduced accuracy.
</Warning>

### Metadata Extraction

LexVault automatically extracts:

* **File metadata**: Creation date, author (when available)
* **Legal metadata**: Case name, court, filing date
* **Financial metadata**: Amounts, account numbers, dates
* **Party metadata**: Names, addresses, contact info

## Storage & Limits

### Storage Quotas

| Plan         | Storage   | Documents      |
| ------------ | --------- | -------------- |
| Starter      | 50 GB     | \~25,000 docs  |
| Professional | 500 GB    | \~250,000 docs |
| Enterprise   | Unlimited | Unlimited      |

### Document Retention

* **Active cases**: Unlimited retention
* **Closed cases**: 7 years default (configurable)
* **Deleted documents**: 30-day recovery period
* **Exports**: Download all documents anytime

<Tip>
  Storage is pooled across all cases in your firm. You don't need to manage per-case limits.
</Tip>

## Best Practices

<AccordionGroup>
  <Accordion title="Name Files Clearly" icon="file-signature">
    Use descriptive filenames:

    * ✅ "2023-W2-John-Smith.pdf"
    * ✅ "Financial-Affidavit-FL150-2024-01-15.pdf"
    * ❌ "document.pdf"
    * ❌ "IMG\_1234.jpg"
  </Accordion>

  <Accordion title="Upload Early" icon="clock">
    Upload documents as soon as you receive them:

    * AI processing takes 10-60 seconds
    * Facts flow into CaseMind immediately
    * Victoria can reference them in conversations
  </Accordion>

  <Accordion title="Organize by Case" icon="folder-tree">
    Keep documents organized:

    * Upload to the correct case
    * Use folders for different document types
    * Tag documents with custom labels
  </Accordion>

  <Accordion title="Verify Sensitive Documents" icon="eye">
    Before uploading, check for:

    * Redaction of confidential information
    * Client authorization for third-party documents
    * Compliance with discovery protective orders
  </Accordion>
</AccordionGroup>

## Bulk Operations

### Bulk Upload

* Drag entire folders at once
* Up to 50 files per upload
* Progress tracking for each file

### Bulk Download

* Select multiple documents
* Download as ZIP archive
* Preserves folder structure

### Bulk Delete

* Select multiple documents
* Soft delete with 30-day recovery
* Requires confirmation for safety

## Integration Features

### Email Integration

Forward emails to your case-specific address:

```
smith-v-smith@[your-firm].divorce.law
```

Emails automatically:

* Saved to LexVault
* Attachments extracted
* Facts added to CaseMind

### API Access (Enterprise)

Programmatic document management:

* Upload via API
* Search and retrieve documents
* Webhook notifications on processing completion

## Next Steps

<CardGroup cols={2}>
  <Card title="Using Victoria AI" icon="brain" href="/features/victoria-ai">
    See how Victoria uses LexVault documents in responses
  </Card>

  <Card title="Case Workspace" icon="briefcase" href="/features/case-workspace">
    Learn about the unified case management interface
  </Card>
</CardGroup>
