Folders are a separate record type (app.opake.cloud.folder), not overloaded documents
Folders are purely organizational — no crypto meaning. Access is determined by per-document encryption (direct or keyring), not folder membership
Keyrings remain separate — a folder may conventionally use a keyring (UI enforces at upload time), but the schema doesn't couple them
document.parent → document.folder — rename the field and change its target from app.opake.cloud.document to app.opake.cloud.folder
Folder record: app.opake.cloud.folder
Fields: name, parent (optional AT-URI to another folder for nesting), createdAt, modifiedAt. No tags, no description for MVP.
Sharing model (3 levels)
1. Single file — direct grant wraps content key to recipient DID 2. Keyring membership — add DID to keyring, they decrypt everything under it 3. Folder sharing — not a crypto operation, purely organizational. AppView uses it for browsing
Lexicon changes needed
1. New lexicon: app.opake.cloud.folder (name, parent, createdAt, modifiedAt) 2. Document lexicon: rename parent → folder, change description to reference app.opake.cloud.folder 3. Bump schema version since parent field semantics change
Implementation scope
Lexicon definition
records.rs Folder struct
CLI commands: mkdir, ls --folder, upload --folder
folder CRUD in opake-core
Placement
This should come after Phase 3 (keyrings) and before Phase 4 (web UI). The AppView needs folders to exist for tree browsing. Could be Phase 3.5 or early Phase 4.
Architecture decision from session 5 discussion:
Design
Folder record: app.opake.cloud.folder
Fields: name, parent (optional AT-URI to another folder for nesting), createdAt, modifiedAt. No tags, no description for MVP.
Sharing model (3 levels)
1. Single file — direct grant wraps content key to recipient DID 2. Keyring membership — add DID to keyring, they decrypt everything under it 3. Folder sharing — not a crypto operation, purely organizational. AppView uses it for browsing
Lexicon changes needed
1. New lexicon: app.opake.cloud.folder (name, parent, createdAt, modifiedAt) 2. Document lexicon: rename parent → folder, change description to reference app.opake.cloud.folder 3. Bump schema version since parent field semantics change
Implementation scope
Placement
This should come after Phase 3 (keyrings) and before Phase 4 (web UI). The AppView needs folders to exist for tree browsing. Could be Phase 3.5 or early Phase 4.