How a7med-xd/network-backup-saas works
This is a FastAPI network-configuration backup and audit service. Admins register devices and trigger backups or restores; backups are retrieved over SSH, stored, compared with prior configurations, audited, and optionally reported through alerts. Viewers and Admins can inspect fleet status, diffs, and compliance findings; Admins can also run bulk commands and manage rules. Scheduled jobs perform backup sweeps and email health reports. The graph follows documented routes and indexed imports; unsampled internals are represented only where README capabilities or source references support them.
Main entry points: main.py FastAPI routes · backup_service.py Backup service · notifier.py Alert dispatch · report.py Fleet health report
Components 22
API and access
- FastAPI routes
app/main.py - Authentication
app/auth.py - Dashboard UI
app/templates/dashboard.html
Device operations
- Bulk commands
app/bulk_commands.py - Backup service
app/backup_service.py - Restore service
app/restore_service.py - SSH device access
app/network.py - Scheduled jobs
app/scheduler.py
Audit and compliance
- Configuration diff
app/config_diff.py - Security audit
app/security_audit.py - Compliance rules
app/compliance.py - AI diff summary
app/ai_summary.py
Persistence and security
- Domain models
app/models.py - Database sessions
app/database.py - Credential encryption
app/security.py
Alerts and reports
- Alert dispatch
app/notifications/notifier.py - Telegram delivery
app/alerts.py - Slack delivery
app/notifications/slack.py - Teams delivery
app/notifications/teams.py - Fleet health report
app/notifications/report.py - Email report delivery
app/notifications/email_reports.py
Other components
- Admin or Viewer
Connections 31
- Admin or Viewer → FastAPI routes: uses
README.md - FastAPI routes → Authentication: delegates
app/main.py - FastAPI routes → Dashboard UI: renders
app/main.py - FastAPI routes → Backup service: invokes
app/main.py - FastAPI routes → Restore service: invokes
app/main.py - FastAPI routes → Bulk commands: routes to
README.md - FastAPI routes → Compliance rules: evaluates
app/main.py - FastAPI routes → Configuration diff: compares
app/main.py - FastAPI routes → AI diff summary: summarizes
README.md - FastAPI routes → Domain models: queries
app/main.py - FastAPI routes → Database sessions: checks
app/main.py - Backup service → SSH device access: fetches config
app/backup_service.py - Backup service → Configuration diff: compares configs
app/backup_service.py - Backup service → Security audit: scans config
app/backup_service.py - Backup service → Alert dispatch: sends alerts
app/backup_service.py - Backup service → Credential encryption: decrypts credentials
app/backup_service.py - Backup service → Domain models: stores backup
app/backup_service.py - Restore service → SSH device access: pushes config
app/restore_service.py - Restore service → Credential encryption: decrypts credentials
app/restore_service.py - Scheduled jobs → Backup service: runs sweep
app/scheduler.py - Scheduled jobs → Fleet health report: builds report
app/scheduler.py - Scheduled jobs → Email report delivery: sends report
app/scheduler.py - Fleet health report → SSH device access: checks reachability
app/notifications/report.py - Fleet health report → Security audit: scans backup
app/notifications/report.py - Fleet health report → Domain models: reads fleet
app/notifications/report.py - Alert dispatch → Telegram delivery: dispatches
app/notifications/notifier.py - Alert dispatch → Slack delivery: dispatches
app/notifications/notifier.py - Alert dispatch → Teams delivery: dispatches
app/notifications/notifier.py - Domain models → Database sessions: uses base
app/models.py - Bulk commands → SSH device access: executes commands
app/bulk_commands.py - Bulk commands → Credential encryption: decrypts credentials
app/bulk_commands.py