Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ba622cd
docs(05): capture phase context
FSM1 Jan 21, 2026
9917a9d
docs(05): research folder system phase
FSM1 Jan 21, 2026
83adf33
add stage 5 planning
FSM1 Jan 21, 2026
eef4c74
fix(05): revise plans based on checker feedback
FSM1 Jan 21, 2026
b68dcb4
feat(05-01): create FolderIpns entity and IPNS DTOs
FSM1 Jan 21, 2026
222f799
feat(05-02): add IPNS record creation with libp2p integration
FSM1 Jan 21, 2026
eecb0ee
feat(05-01): create IpnsService with delegated routing
FSM1 Jan 21, 2026
7941c62
feat(05-02): add folder metadata types and encryption
FSM1 Jan 21, 2026
765b594
feat(05-01): create IpnsController, IpnsModule, and regenerate API cl…
FSM1 Jan 21, 2026
fda4641
docs(05-01): complete Backend IPNS Module plan
FSM1 Jan 21, 2026
b775de3
test(05-02): add IPNS record and folder metadata tests
FSM1 Jan 21, 2026
0eec667
docs(05-02): complete Crypto Package IPNS Support plan
FSM1 Jan 21, 2026
9b0d404
feat(05-03): create vault store for key management
FSM1 Jan 21, 2026
f8762f4
feat(05-03): create IPNS service for record publishing
FSM1 Jan 21, 2026
0d1f4c5
feat(05-03): create folder store and service
FSM1 Jan 21, 2026
c6db8d2
docs(05-03): complete Frontend Folder State plan
FSM1 Jan 21, 2026
1e02e28
feat(05-04): implement folder rename and delete operations
FSM1 Jan 21, 2026
e9f7065
feat(05-04): implement move operations for files and folders
FSM1 Jan 21, 2026
aa3ae9e
feat(05-04): create useFolder hook for UI integration
FSM1 Jan 21, 2026
736c81a
docs(05-04): complete folder CRUD operations plan
FSM1 Jan 21, 2026
e472f68
docs(05): complete folder system phase
FSM1 Jan 21, 2026
db66859
fix(security): address Phase 5 security review findings
FSM1 Jan 21, 2026
7012f52
improve test coversage and address security concerns
FSM1 Jan 21, 2026
75a3ea6
docs(security): update LOW severity issues backlog and add verificati…
FSM1 Jan 21, 2026
d8df6c5
fix(ci): resolve OpenAPI generation and test coverage failures
FSM1 Jan 21, 2026
b7603cb
fix(tests): add User entity import in IpnsService tests
FSM1 Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions .planning/REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ Requirements for initial release. Each maps to roadmap phases.
- [x] **FILE-01**: User can upload files up to 100MB
- [x] **FILE-02**: User can download and decrypt files
- [x] **FILE-03**: User can delete files (with IPFS unpin)
- [ ] **FILE-04**: User can rename files
- [ ] **FILE-05**: User can move files between folders
- [x] **FILE-04**: User can rename files
- [x] **FILE-05**: User can move files between folders
- [x] **FILE-06**: User can select multiple files for bulk upload
- [x] **FILE-07**: User can select multiple files for bulk delete

### Folder Operations

- [ ] **FOLD-01**: User can create folders
- [ ] **FOLD-02**: User can delete folders (recursive)
- [ ] **FOLD-03**: User can nest folders up to 20 levels deep
- [ ] **FOLD-04**: User can rename folders
- [ ] **FOLD-05**: User can move folders between parent folders
- [ ] **FOLD-06**: Each folder has its own IPNS keypair for metadata
- [x] **FOLD-01**: User can create folders
- [x] **FOLD-02**: User can delete folders (recursive)
- [x] **FOLD-03**: User can nest folders up to 20 levels deep
- [x] **FOLD-04**: User can rename folders
- [x] **FOLD-05**: User can move folders between parent folders
- [x] **FOLD-06**: Each folder has its own IPNS keypair for metadata

### Backend API

- [x] **API-01**: Backend verifies Web3Auth JWT via JWKS endpoint
- [x] **API-02**: Backend issues and rotates access/refresh tokens
- [x] **API-03**: Backend relays encrypted blobs to Pinata (POST /ipfs/add)
- [x] **API-04**: Backend relays unpin requests to Pinata (POST /vault/unpin)
- [ ] **API-05**: Backend relays pre-signed IPNS records (POST /ipns/publish)
- [x] **API-05**: Backend relays pre-signed IPNS records (POST /ipns/publish)
- [x] **API-06**: Backend stores encrypted vault keys (rootFolderKey, ipnsPrivateKey)
- [x] **API-07**: Backend enforces 500 MiB storage quota per user
- [ ] **API-08**: Backend returns TEE public keys on login
Expand Down Expand Up @@ -176,21 +176,21 @@ Which phases cover which requirements. Updated during roadmap creation.
| FILE-01 | Phase 4 | Complete |
| FILE-02 | Phase 4 | Complete |
| FILE-03 | Phase 4 | Complete |
| FILE-04 | Phase 5 | Pending |
| FILE-05 | Phase 5 | Pending |
| FILE-04 | Phase 5 | Complete |
| FILE-05 | Phase 5 | Complete |
| FILE-06 | Phase 4 | Complete |
| FILE-07 | Phase 4 | Complete |
| FOLD-01 | Phase 5 | Pending |
| FOLD-02 | Phase 5 | Pending |
| FOLD-03 | Phase 5 | Pending |
| FOLD-04 | Phase 5 | Pending |
| FOLD-05 | Phase 5 | Pending |
| FOLD-06 | Phase 5 | Pending |
| FOLD-01 | Phase 5 | Complete |
| FOLD-02 | Phase 5 | Complete |
| FOLD-03 | Phase 5 | Complete |
| FOLD-04 | Phase 5 | Complete |
| FOLD-05 | Phase 5 | Complete |
| FOLD-06 | Phase 5 | Complete |
| API-01 | Phase 2 | Complete |
| API-02 | Phase 2 | Complete |
| API-03 | Phase 4 | Complete |
| API-04 | Phase 4 | Complete |
| API-05 | Phase 5 | Pending |
| API-05 | Phase 5 | Complete |
| API-06 | Phase 4 | Complete |
| API-07 | Phase 4 | Complete |
| API-08 | Phase 8 | Pending |
Expand Down
23 changes: 12 additions & 11 deletions .planning/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Decimal phases appear between their surrounding integers in numeric order.
- [x] **Phase 4: File Storage** - Upload/download encrypted files via IPFS relay
- [x] **Phase 4.1: API Service Testing** - Unit tests for backend services per TESTING.md (INSERTED)
- [ ] **Phase 4.2: Local IPFS Testing Infrastructure** - Add local IPFS node to Docker for offline testing (INSERTED)
- [ ] **Phase 5: Folder System** - IPNS metadata, folder hierarchy, and operations
- [x] **Phase 5: Folder System** - IPNS metadata, folder hierarchy, and operations
- [ ] **Phase 6: File Browser UI** - Web interface for file management
- [ ] **Phase 7: Multi-Device Sync** - IPNS polling and sync state management
- [ ] **Phase 8: TEE Integration** - Auto-republishing via Phala Cloud
Expand Down Expand Up @@ -155,7 +155,7 @@ Plans:

### Phase 5: Folder System

**Goal**: Users can organize files in encrypted folder hierarchy
**Goal**: Users can organize files in encrypted folder hierarchy with IPNS metadata
**Depends on**: Phase 4.1
**Requirements**: FOLD-01, FOLD-02, FOLD-03, FOLD-04, FOLD-05, FOLD-06, FILE-04, FILE-05, API-05
**Success Criteria** (what must be TRUE):
Expand All @@ -166,14 +166,14 @@ Plans:
4. User can rename files and folders
5. User can move files and folders between parent folders
6. Each folder has its own IPNS keypair for metadata
**Plans**: TBD
**Plans**: 4 plans

Plans:

- [ ] 05-01: IPNS relay endpoints and metadata structure
- [ ] 05-02: Folder CRUD operations with encrypted metadata
- [ ] 05-03: File rename and move operations
- [ ] 05-04: Folder tree traversal and hierarchy management
- [x] 05-01-PLAN.md — Backend IPNS relay endpoints and FolderIpns entity
- [x] 05-02-PLAN.md — Crypto module IPNS record creation and folder metadata types
- [x] 05-03-PLAN.md — Frontend vault/folder stores and IPNS publishing service
- [x] 05-04-PLAN.md — Frontend folder CRUD operations (create, rename, delete, move)

### Phase 6: File Browser UI

Expand Down Expand Up @@ -312,8 +312,8 @@ Decimal phases (if any) execute between their surrounding integers.
| 3. Core Encryption | 3/3 | Complete | 2026-01-20 |
| 4. File Storage | 4/4 | Complete | 2026-01-20 |
| 4.1 API Service Testing | 3/3 | Complete | 2026-01-21 |
| 4.2 Local IPFS Testing | 0/2 | Not started | - |
| 5. Folder System | 0/4 | Not started | - |
| 4.2 Local IPFS Testing | 0/TBD | Not started | - |
| 5. Folder System | 4/4 | Complete | 2026-01-21 |
| 6. File Browser UI | 0/4 | Not started | - |
| 7. Multi-Device Sync | 0/3 | Not started | - |
| 8. TEE Integration | 0/4 | Not started | - |
Expand All @@ -334,5 +334,6 @@ _Phase 4 planned: 2026-01-20_
_Phase 4 complete: 2026-01-20_
_Phase 4.1 planned: 2026-01-20_
_Phase 4.1 complete: 2026-01-21_
_Phase 4.2 planned: 2026-01-21_
_Total phases: 11 | Total plans: 43 | Depth: Comprehensive_
_Phase 5 planned: 2026-01-21_
_Phase 5 complete: 2026-01-21_
_Total phases: 11 | Total plans: 45 | Depth: Comprehensive_
42 changes: 30 additions & 12 deletions .planning/STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
See: .planning/PROJECT.md (updated 2026-01-20)

**Core value:** Zero-knowledge privacy - files encrypted client-side, server never sees plaintext
**Current focus:** Phase 4.2 Local IPFS Testing Infrastructure - COMPLETE
**Current focus:** Phase 5 Folder System - COMPLETE

## Current Position

Phase: 4.2 of 11 (Local IPFS Testing) - COMPLETE
Plan: 2 of 2 in Phase 4.2 complete
Status: Phase 4.2 complete - Local IPFS testing infrastructure ready
Last activity: 2026-01-21 - Completed 04.2-02-PLAN.md (CI service containers + tests)
Phase: 5 of 11 (Folder System) - COMPLETE
Plan: 4 of 4 in Phase 5 complete
Status: Phase 5 complete - folder system infrastructure ready
Last activity: 2026-01-21 - Phase 5 verified and complete

Progress: [####......] 42% (19 of 45 plans)
Progress: [#####.....] 51% (23 of 45 plans)

## Performance Metrics

**Velocity:**

- Total plans completed: 19
- Average duration: 4.6 min
- Total execution time: 1.5 hours
- Total plans completed: 23
- Average duration: 4.4 min
- Total execution time: 1.7 hours

**By Phase:**

Expand All @@ -34,10 +34,11 @@ Progress: [####......] 42% (19 of 45 plans)
| 04-file-storage | 4/4 | 17 min | 4.3 min |
| 04.1-api-service-testing | 3/3 | 11 min | 3.7 min |
| 04.2-local-ipfs-testing | 2/2 | 14 min | 7 min |
| 05-folder-system | 4/4 | 18 min | 4.5 min |

**Recent Trend:**

- Last 5 plans: 5m, 3m, 3m, 8m, 6m
- Last 5 plans: 6m, 4m, 6m, 4m, 4m
- Trend: Consistent

_Updated after each plan completion_
Expand Down Expand Up @@ -111,6 +112,23 @@ Recent decisions affecting current work:
| Kubo API POST for all operations | 04.2-01 | Kubo RPC uses POST (not REST), even for cat and unpin |
| IPFS_PROVIDER env var for backend selection | 04.2-01 | 'local' or 'pinata' switches provider implementation |
| Kubo API port localhost-only | 04.2-01 | 5001 bound to 127.0.0.1 for security (admin-level access) |
| Unique (userId, ipnsName) constraint | 05-01 | Ensures each folder tracked uniquely per user |
| sequenceNumber as bigint string | 05-01 | TypeORM returns bigint as string; service uses BigInt() for increment |
| encryptedIpnsPrivateKey only on first publish | 05-01 | Reduces payload; key stored once for TEE republishing |
| Exponential backoff for delegated routing | 05-01 | Max 3 retries with increasing delay for rate limits |
| ipns npm package for record creation | 05-02 | Handles CBOR/protobuf/signatures correctly - don't hand-roll |
| Ed25519 64-byte libp2p format | 05-02 | concat(privateKey, publicKey) for libp2p compatibility |
| V1+V2 compatible IPNS signatures | 05-02 | v1Compatible: true for maximum network compatibility |
| IPNS names base32 (bafzaa...) | 05-02 | libp2p default; both base32 and base36 (k51...) are valid |
| FolderMetadata JSON serialization | 05-02 | Simple, debuggable; size overhead acceptable for metadata |
| VaultStore memory-only keys | 05-03 | Security - never persist sensitive keys to storage |
| FolderNode includes decrypted keys | 05-03 | Enable folder operations without re-deriving |
| Local IPNS signing with backend relay | 05-03 | Server never sees IPNS private keys |
| MAX_FOLDER_DEPTH=20 in createFolder | 05-03 | Enforces FOLD-03 depth limit |
| deleteFileFromFolder renamed | 05-04 | Avoid export conflict with delete.service.ts |
| add-before-remove pattern for moves | 05-04 | Prevents data loss - add to dest first, then remove from source |
| Fire-and-forget unpin on delete | 05-04 | Don't block user on IPFS cleanup |
| isDescendantOf prevents circular moves | 05-04 | Prevents moving folder into itself or descendants |

### Pending Todos

Expand All @@ -136,10 +154,10 @@ None yet.
## Session Continuity

Last session: 2026-01-21
Stopped at: Completed Phase 4.2 (Local IPFS Testing Infrastructure)
Stopped at: Completed Phase 5 (Folder System)
Resume file: None

---

_State initialized: 2026-01-20_
_Last updated: 2026-01-21 after 04.2-02 completion_
_Last updated: 2026-01-21 after Phase 5 completion_
Loading
Loading