Skip to content

Universal Backup System Template v1.0.0

Latest

Choose a tag to compare

@HalbonLabs HalbonLabs released this 09 Sep 19:12
· 4 commits to main since this release

Universal Backup System Template - Summary

πŸ“‹ Template Overview

This GitHub template repository provides a complete, framework-agnostic backup and checkpoint system that can be instantly deployed to any project. Originally developed for a SvelteKit/Supabase project, it has been generalized to work with any technology stack.

🎯 Key Features

  • Framework Agnostic: Works with React, Vue, Angular, SvelteKit, Node.js, Python, Ruby, and more
  • Cross-Platform: PowerShell scripts work on Windows, Linux, and macOS
  • AI Safety Protocol: Built-in safety checks with configurable rules
  • Health Monitoring: Comprehensive health checks for Git, dependencies, and project state
  • Automated Rollback: Smart rollback system with daily snapshots
  • Zero Configuration: Works out of the box with sensible defaults

πŸš€ Quick Start

  1. Use this template to create a new repository
  2. Clone your new repository
  3. Run the installer:
    .\install.ps1
  4. Start using the backup system:
    npm run save "Feature complete"
    npm run ai:safety-check
    npm run health:check

πŸ“ Template Structure

backup-system-template/
β”œβ”€β”€ scripts/                    # Core PowerShell scripts
β”‚   β”œβ”€β”€ checkpoint-simple.ps1   # Main backup/checkpoint
β”‚   β”œβ”€β”€ ai-safety-check.ps1     # AI safety protocol
β”‚   β”œβ”€β”€ health-check.ps1        # Health monitoring
β”‚   └── rollback-daily.ps1      # Rollback system
β”œβ”€β”€ examples/                   # Framework examples
β”‚   └── README.md              # Package.json examples
β”œβ”€β”€ .github/                   # GitHub integration
β”‚   β”œβ”€β”€ workflows/test.yml     # CI/CD testing
β”‚   └── template-repository.yml # Template metadata
β”œβ”€β”€ install.ps1               # Automated installer
β”œβ”€β”€ README.md                 # Main documentation
β”œβ”€β”€ QUICKSTART.md             # Quick start guide
└── CONTRIBUTING.md           # Contribution guidelines

πŸ› οΈ Installation Methods

Method 1: GitHub Template (Recommended)

  1. Click "Use this template" on GitHub
  2. Clone your new repository
  3. Run .\install.ps1

Method 2: Manual Installation

# Clone the template
git clone https://github.com/your-username/backup-system-template.git
cd your-project

# Copy scripts
Copy-Item -Path "backup-system-template\scripts\*" -Destination "scripts\" -Force

# Install NPM scripts (if applicable)
# Run install.ps1 or manually add to package.json

Method 3: Direct Script Download

# Download individual scripts
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/your-username/backup-system-template/main/scripts/checkpoint-simple.ps1" -OutFile "scripts\checkpoint-simple.ps1"

πŸŽ›οΈ NPM Scripts Added

The installer automatically adds these scripts to your package.json:

{
  "scripts": {
    "save": "pwsh -ExecutionPolicy Bypass -File scripts/checkpoint-simple.ps1",
    "checkpoint:feature": "pwsh -ExecutionPolicy Bypass -File scripts/checkpoint-simple.ps1 -Message 'Feature checkpoint'",
    "ai:safety-check": "pwsh -ExecutionPolicy Bypass -File scripts/ai-safety-check.ps1",
    "health:check": "pwsh -ExecutionPolicy Bypass -File scripts/health-check.ps1",
    "rollback:daily": "pwsh -ExecutionPolicy Bypass -File scripts/rollback-daily.ps1"
  }
}

πŸ”§ Supported Frameworks

  • Frontend: React, Vue, Angular, SvelteKit, Astro, Next.js
  • Backend: Node.js, Express, Fastify, NestJS
  • Full-Stack: SvelteKit, Next.js, Nuxt.js
  • Languages: JavaScript, TypeScript, Python, Ruby, PHP
  • Databases: Any (PostgreSQL, MySQL, MongoDB, SQLite)

πŸ§ͺ Testing & CI

The template includes comprehensive GitHub Actions workflows that test:

  • Installation on Windows, Linux, and macOS
  • Framework compatibility (React, Vue, Angular, Node.js, Python)
  • Script execution and error handling
  • Cross-platform PowerShell compatibility

πŸ”’ AI Safety Features

Built-in AI safety protocol that checks for:

  • Dangerous PowerShell commands
  • File system operations outside project
  • Network operations
  • System modifications
  • Unauthorized external tool usage

πŸ“Š Health Monitoring

Comprehensive health checks for:

  • Git repository status
  • Dependency security (npm audit)
  • File system integrity
  • Project configuration
  • Build system status

πŸ”„ Rollback System

Smart rollback capabilities:

  • Daily automated snapshots
  • Feature-level rollback points
  • Selective file restoration
  • Branch-based rollback
  • Emergency recovery modes

🀝 Contributing

This is a template repository designed for reuse. Contributions welcome:

  1. Fork this template
  2. Make improvements
  3. Submit pull request
  4. Update documentation

πŸ“„ License

MIT License - free for commercial and personal use.

🎯 Next Steps

After using this template:

  1. Customize the AI safety rules for your project
  2. Add project-specific health checks
  3. Configure automated backup schedules
  4. Set up team-specific checkpoint workflows
  5. Integrate with your CI/CD pipeline

Template Version: 1.0.0
Last Updated: 2024
Compatibility: Cross-platform (Windows/Linux/macOS)