## Architecture Overview

High-level system design for the backup tool

System Architecture
Frontend Layer
Dashboard View
Overview, stats, recent backups
Backup View
Jobs, sources, schedules
Settings View
Config, storage, notifications
↓ REST API ↓
Backend Layer (Python)
API Server
FastAPI/Flask
Backup Engine
Core logic
Scheduler
APScheduler
Source Adapters
SSH, DB, Local
↓ Persistence ↓
Data Layer
SQLite Database
Jobs, sources, history, config
File Storage
Backup archives

### Key Design Principles

- Source-agnostic: Adapter pattern for different backup sources (local, SSH, future cloud)
- Job-driven: Everything is a job - manual or scheduled, full or incremental
- SQLite for simplicity: Single file database, no external DB server needed
- REST API: Clean separation between frontend and backend
- Extensible: Plugin architecture for new source types and storage backends

### Technology Stack

#### Backend

- Python 3.11+
- FastAPI (async, auto-docs)
- SQLAlchemy + Alembic
- APScheduler (job scheduling)
- Paramiko (SSH)
- rsync/libsync (incremental backups)

#### Frontend

- React 18+ with TypeScript
- TanStack Query (data fetching)
- React Router (navigation)
- Tailwind CSS (styling)
- Recharts (dashboard charts)