Skip to content

feat: secure backup & encrypted export options#583

Open
mendarb wants to merge 1 commit intorohitdash08:mainfrom
mendarb:feat/secure-backup-126
Open

feat: secure backup & encrypted export options#583
mendarb wants to merge 1 commit intorohitdash08:mainfrom
mendarb:feat/secure-backup-126

Conversation

@mendarb
Copy link
Copy Markdown

@mendarb mendarb commented Mar 20, 2026

Summary

  • Add POST /export endpoint for encrypted data export (expenses, bills, categories)
  • Uses AES-256-GCM encryption with PBKDF2-HMAC-SHA256 key derivation from user-provided password
  • Supports JSON and CSV export formats
  • Add frontend Export page with format selector, password input, and download button
  • Add cryptography dependency to requirements.txt
  • Comprehensive backend tests including encryption/decryption round-trip validation

Closes #126

Test plan

  • POST /export with valid password and json format returns encrypted payload that decrypts correctly
  • POST /export with csv format returns encrypted CSV data
  • Passwords shorter than 8 characters are rejected with 400
  • Invalid format values are rejected with 400
  • Endpoint requires JWT authentication
  • Wrong password fails to decrypt (authentication tag mismatch)
  • Frontend page renders format selector and password field
  • Download triggers a .encrypted.json file save

🤖 Generated with Claude Code

Add AES-256-GCM encrypted export of user data (expenses, bills,
categories) in JSON or CSV format. Password-derived key via
PBKDF2-HMAC-SHA256. Includes backend route, frontend export page
with download flow, and comprehensive tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mendarb mendarb requested a review from rohitdash08 as a code owner March 20, 2026 14:44
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.

Secure backup & encrypted export options

1 participant