Skip to content

feat: add vault export, recovery tool, and export format documentation (Phase 10)#98

Merged
FSM1 merged 17 commits into
mainfrom
feat/phase-10-data-portability
Feb 11, 2026
Merged

feat: add vault export, recovery tool, and export format documentation (Phase 10)#98
FSM1 merged 17 commits into
mainfrom
feat/phase-10-data-portability

Conversation

@FSM1

@FSM1 FSM1 commented Feb 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Vault export API endpoint (GET /vault/export) returns encrypted vault keys and folder structure as JSON
  • Settings page export button allows users to download their vault export from the web UI
  • Standalone recovery HTML page (recovery.html) enables infrastructure-independent vault recovery using only a browser
  • Vault export format documentation (docs/VAULT_EXPORT_FORMAT.md) with test vector generation script
  • Phase 10 planning artifacts (plans, summaries, verification, research)

Satisfies requirements PORT-01, PORT-02, PORT-03.

Test plan

  • GET /vault/export returns valid JSON with all vault fields
  • Settings page "Export Vault" button triggers download
  • recovery.html loads standalone and can decrypt a test export
  • Test vectors match cross-platform crypto expectations
  • Existing E2E tests still pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Reformatted desktop configuration file for consistency. No impact on functionality or user experience.

FSM1 and others added 16 commits February 11, 2026 01:54
Phase 10: Data Portability
- Implementation decisions documented
- Phase boundary established

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 10: Data Portability
- Standard stack identified (no new deps for export, CDN noble-*/fflate for recovery tool)
- Architecture patterns documented (API endpoint, settings UI, standalone HTML recovery)
- eciesjs v0.4.16 binary format verified from installed source (16-byte nonce, specific HKDF params)
- Pitfalls catalogued (ECIES format, HKDF salt/info, AES-GCM tag handling, IPNS gateway)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 10: Data Portability
- 3 plans in 2 waves
- Wave 1: API export + web UI (10-01), standalone recovery HTML (10-02) [parallel]
- Wave 2: Technical documentation with test vectors (10-03)
- Ready for execution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create VaultExportDto with format/version/exportedAt fields
- Add getExportData to VaultService with User join
- Add GET /vault/export endpoint to VaultController
- Register User entity in VaultModule
- Regenerate API client with export function

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create VaultExport component with export button and dialog
- Reuse ConfirmDialog for security warning before export
- Download vault as cipherbox-vault-export.json via Blob URL
- Add terminal-aesthetic CSS for export section
- Integrate VaultExport into SettingsPage below LinkedMethods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Self-contained recovery tool with embedded CSS and JavaScript
- 4-step guided walkthrough: load export, provide key, configure gateway, recover
- ECIES decrypt matching eciesjs@0.4.16 format (65-byte ephemeral PK, 16-byte nonce, 16-byte tag)
- AES-256-GCM decrypt for folder metadata (12-byte IV, hex+base64 format) and files
- IPNS resolution via public delegated routing with ipfs.io fallback
- Recursive folder traversal with per-file error handling
- Zip download preserving folder structure via fflate
- CDN imports only: @noble/curves, @noble/hashes, fflate
- Dark terminal aesthetic, responsive layout, no CipherBox server dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tasks completed: 1/1
- Standalone recovery HTML page with ECIES/AES-GCM crypto

SUMMARY: .planning/phases/10-data-portability/10-02-SUMMARY.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tasks completed: 2/2
- API export endpoint and DTO
- Web app VaultExport component on Settings page

SUMMARY: .planning/phases/10-data-portability/10-01-SUMMARY.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Complete specification covering export JSON schema, ECIES binary format,
  AES-256-GCM parameters, encrypted folder metadata format
- Step-by-step recovery procedure with pseudocode
- ECIES byte offsets: ephemeralPK(65) + nonce(16) + tag(16) + ciphertext(N)
- Documents 16-byte AES-GCM nonce in ECIES (non-standard, eciesjs specific)
- HKDF-SHA256 with undefined salt/info matching eciesjs@0.4.16
- IPNS resolution methods for infrastructure-independent recovery
- Security considerations and compatibility notes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 10 verified: 7/7 must-haves pass.
PORT-01, PORT-02, PORT-03 requirements complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The VaultService gained a User repository dependency in phase 10 but
the spec was never updated, causing all 31 existing tests to fail
during module compilation and vault.service.ts coverage to drop to 19%.

Adds the User repository mock to the test module and 5 tests covering
getExportData: social login, external wallet, missing user, missing
vault, and timestamp format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 11, 2026

Copy link
Copy Markdown

Walkthrough

The deep-link desktop schemes configuration in the Tauri app settings was reformatted from a multi-line array to an inline array representation. No functional changes were introduced; only the JSON formatting was modified.

Changes

Cohort / File(s) Summary
Configuration Formatting
apps/desktop/src-tauri/tauri.conf.json
Reformatted the deepLinkProtocol schemes array from multi-line to inline representation without altering values or behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions vault export and recovery tool features, but the actual changeset only reformats a JSON array in tauri.conf.json with no functional changes. Update the title to accurately reflect the change: e.g., 'refactor: format deep-link schemes configuration in tauri.conf.json' or align the changeset with the Phase 10 implementation described in objectives.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/phase-10-data-portability

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@FSM1 FSM1 enabled auto-merge (squash) February 11, 2026 03:59
@FSM1 FSM1 disabled auto-merge February 11, 2026 04:01
@FSM1 FSM1 merged commit 9e7fe8e into main Feb 11, 2026
8 checks passed
@FSM1 FSM1 deleted the feat/phase-10-data-portability branch February 11, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant