Architecture
Data Model
Node Tree
Uses MongoDB materialized paths. All files and folders are nodes in a unified tree.
| Node Kind | Description |
|---|---|
project | Top-level project node |
episode | Recording session |
folder | Organizational directory |
file, video, audio, image, text, code | Leaf nodes |
Path convention: root = ",", depth 1 = ",camera,", depth 2 = ",camera,front,".
Auth
Two-token system:
- Login — OAuth device flow via vuer-auth → short-lived token
- Exchange —
POST /auth/exchange→ long-lived dreamlake JWT (HS256) - API calls —
Authorization: Bearer <dreamlake-token>
First login auto-creates User + Namespace records.
Upload Flow
Uploads are resumable. State persisted to ~/.dreamlake/uploads/.
Tech Stack
| Component | Technology |
|---|---|
| Server | Fastify, MongoDB (Prisma), JWT |
| Storage | S3 via BSS |
| Search | Qdrant (CLIP embeddings) |
| CLI | Python, click |