Mainnet#126
Merged
Merged
Conversation
added 10 commits
July 23, 2026 06:07
- Add BackupRecord entity with status tracking and IPFS integration - Add BackupAlert entity for monitoring and notification - Add BackupConfig entity for per-wallet backup configuration - Support full, incremental, and selective backup types
- CreateBackupDto for initiating backups with wallet address and type - UpdateBackupConfigDto for configuring backup settings - RestoreBackupDto for restoring from backup with dry-run support - Validation decorators for input sanitization
- Automated backup creation with IPFS storage - Scheduled backups via cron and interval-based triggers - Backup health monitoring with checksum verification - Backup rotation with configurable retention policies - Restoration testing with dry-run support - Alert creation with webhook notifications
- POST /backup - Create new backup - GET /backup/wallet/:walletAddress - List backups - POST /backup/restore - Restore from backup - GET /backup/health - Run health check - POST /backup/rotation - Trigger rotation - POST /backup/restoration-test - Run restoration tests - GET/PUT /backup/config/:walletAddress - Manage backup config - GET /backup/alerts/:walletAddress - Get alerts - PUT /backup/alerts/:id/acknowledge - Acknowledge alert
- Register backup entities with TypeORM - Import ScheduleModule for cron-based triggers - Import dependent modules (IPFS, Identity, Verification, DataSharing) - Export BackupService for cross-module usage
- uploadJson for backup data storage with auto-generated filenames - fetchJson for retrieving backup data from IPFS - Consistent error handling with InternalServerErrorException
- Add findAllByWallet methods for backup data collection - Add restore methods for backup restoration - Enable backup system to query and restore credential data - Maintain backward compatibility with existing API
- Add BackupModule to AppModule imports - Enable backup functionality across the application - Follow existing module integration patterns
- Test backup creation with success and failure scenarios - Test health check functionality - Test rotation with old backup cleanup - Test configuration management - Test all controller endpoints - Mock external dependencies for isolation
- Add BACKUP_AUTO_ENABLED for enabling/disabling automatic backups - Add BACKUP_HEALTH_CHECK_INTERVAL_HOURS for health monitoring - Add BACKUP_ROTATION_CHECK_INTERVAL_DAYS for rotation scheduling - Add BACKUP_RESTORATION_TEST_INTERVAL_DAYS for restoration tests - Document all backup-related environment variables
|
Someone is attempting to deploy a commit to the Josie's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
|
thank you for contributing to this project @Mainnet-ops |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #49
Summary
Changes
New module (
backend/src/backup/):BackupRecord,BackupAlert,BackupConfigwith TypeORM integrationModified files:
ipfs.service.ts— AddeduploadJsonandfetchJsonhelper methodsidentity.service.ts— AddedfindAllByWalletandrestoremethodsverification.service.ts— AddedfindAllByWalletandrestoremethodsdata-sharing.service.ts— AddedfindAllByOwnerandrestoremethodsapp.module.ts— IntegratedBackupModule.env.example— Added 7 backup configuration variablesTesting
backup.service.spec.ts(7) andbackup.controller.spec.ts(11)npm testrequires installing dependencies; pre-existing@nestjs/redispackage issue prevents install (outside this PR's scope)Tradeoffs
BackupTypeenum but not implemented yet.Architecture
The backup system follows the same patterns as the existing
AuditRetentionService— interval-based background workers using Nest lifecycle hooks +@nestjs/schedulecron. Each wallet has an independentBackupConfigcontrolling cadence, retention, and feature toggles. All backup data is stored on IPFS with checksums for integrity verification.Out of scope
BackupType.INCREMENTAL)