$ show plutonhq/pluton
Pluton is a self-hosted, open-source backup application that wraps restic and rclone to provide scheduled, encrypted backups to a wide variety of cloud and local storage providers. The system is built as a full-stack monorepo with a Node.js/Express backend (TypeScript) and a React frontend (Vite), communicating via REST APIs. It manages backup plans, devices, storage locations, and restore operations through a web dashboard, with support for replication, retention policies, integrity checks, and multi-channel notifications (email, Slack, Discord, push). The architecture follows a layered pattern: controllers handle HTTP requests, services orchestrate business logic, stores encapsulate database access (SQLite via Drizzle ORM), and managers/strategies handle execution of backup, restore, and system operations using restic and rclone as child processes. A job queue with cron scheduling drives automated backups, and event emitters decouple progress tracking and notification dispatch. The frontend provides a rich UI with virtualized file browsers, snapshot viewers, and step-by-step wizards for plan creation and restore. The codebase is well-structured with extensive unit tests, CI/CD pipelines, and cross-platform installers (Docker, Linux AppImage, macOS, Windows).
The LLM identified 4 files worth highlighting for reuse:
Classifies restic exit codes into success, warning, retryable, and fatal categories. Provides helper functions like isRetryable, isWarning, and classifyResticExitCode. This module is self-contained and can be reused in any Node.js project that wraps restic, eliminating the need to manually interpret exit codes.
Implements a custom encrypted blob format using Argon2id key derivation and AES-256-GCM encryption. The format includes a magic header, version, KDF parameters, salt, nonce, ciphertext, and authentication tag. This module is standalone and demonstrates a secure, versioned packaging pattern suitable for any application that needs to encrypt and transport sensitive data.
Abstract base class for notifications that supports multiple output formats (HTML, JSON, Slack Block Kit, Discord embed). Subclasses implement format-specific renderers while sharing common logic for template loading and channel dispatch. This pattern is reusable for any application requiring multi-channel notifications with structured content.
In-memory job queue with deduplication, priority ordering, retry with exponential backoff, and concurrency limits. Supports adding, removing, and re-queuing jobs. The queue is decoupled from specific task implementations and can be extracted for use in other Node.js applications that need a lightweight, non-persistent job scheduler.