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

# The Lake

> Understanding the central artifact storage

# The Lake

Docyard is built around a simple metaphor: **The Lake**.

The lake is a centralized storage pool where all artifacts—documents, files, digital content—live together regardless of their source. Think of it as a vast body of water where anyone can drop their artifacts, and anyone with the right keys can fish them out.

## Key Characteristics

### One Shared Pool

Unlike traditional document systems with tenant isolation, the lake has no boundaries. All artifacts coexist in one place:

* Insurance declaration pages from carrier A
* Loan agreements from carrier B
* Real estate contracts from carrier C

...all in the same lake, searchable by anyone with the right keys.

### Open Access

Anyone authenticated can:

* **Drop artifacts** into the lake (vian upload endpoints)
* **Fish artifacts** from the lake (via docks)

No pre-relationships required. No invitation-only access. If you have the keys, you can retrieve the artifact.

### Rule-Based Security

Access isn't controlled by complex permissions or whitelists. It's controlled by **keys** and **weights**:

* Distributors define what keys are needed (lock types)
* Distributors assign weights to each key
* Artifacts have a threshold score
* Collectors present keys → System calculates score → Access granted if score ≥ threshold

## The Lake vs. Traditional Systems

| Traditional Document Systems | The Lake                   |
| ---------------------------- | -------------------------- |
| Tenant-isolated storage      | Single shared pool         |
| Complex permission matrices  | Key-based access           |
| Pre-authorized recipients    | Open to anyone with keys   |
| Per-integration setup        | Connect once, access all   |
| Document-type specific       | Universal document storage |

## What's In The Lake?

Every artifact in the lake has:

1. **Content**: The actual file (PDF, image, document)
2. **Artifact Type**: The category/type of document (e.g., "Insurance Declaration")
3. **Locks**: The metadata fields that define access requirements
4. **Keys**: The values for those metadata fields
5. **Weights**: The scores assigned to each lock type
6. **Threshold**: The minimum score required for access
7. **Owner**: Who uploaded it (for audit purposes)

## Lake Access Points

To interact with the lake, you use specialized endpoints:

* **Uploads**: Upload artifacts into the lake
* **Docks**: Retrieve artifacts from the lake

These are covered in detail in their own sections.

## Visual Representation

```mermaid theme={null}
flowchart TB
    subgraph LAKE["🏞️ THE LAKE"]
        direction TB
        A1["📄 Insurance Declaration"]
        A2["📄 Loan Agreement"]
        A3["📄 Birth Certificate"]
        A4["📄 Insurance Declaration"]
        A5["📄 Closing Document"]
        A6["📄 Endorsement"]
    end

    subgraph DISTRIBUTORS["🏢 DISTRIBUTORS"]
        D1["Acme Insurance"]
        D2["Best Insurance"]
        D3["Title Company"]
    end

    subgraph COLLECTORS["👥 COLLECTORS"]
        C1["FirstCity Bank"]
        C2["Mortgage Lender"]
        C3["Auditor"]
    end

    D1 -->|📤 Upload via Upload| A1
    D2 -->|📤 Upload via Upload| A2
    D3 -->|📤 Upload via Upload| A3
    D1 -->|📤 Upload via Upload| A4
    D2 -->|📤 Upload via Upload| A5
    D3 -->|📤 Upload via Upload| A6

    A1 -->|🔍 Search via Dock| C1
    A4 -->|🔍 Search via Dock| C1
    A2 -->|🔍 Search via Dock| C2
    A3 -->|🔍 Search via Dock| C3
    A5 -->|🔍 Search via Dock| C2
    A6 -->|🔍 Search via Dock| C1

    style LAKE fill:#e1f5fe,stroke:#01579b,stroke-width:3px
    style DISTRIBUTORS fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px
    style COLLECTORS fill:#fff3e0,stroke:#ef6c00,stroke-width:2px
```

**How it works:**

* **Distributors** (left) upload documents through **Uploads** into the shared **Lake** (center)
* **Collectors** (right) search and retrieve documents through **Docks** from the **Lake**
* Anyone with the right **keys** can access any artifact—no pre-relationships needed

## Next Steps

* Learn about \[Uploads & Docks]\(/concepts/upload endpoints-and-docks)
* Understand [Artifact Types](/concepts/artifact-types)
* Explore the [Lock-Key-Weight Model](/concepts/lock-key-weight)
