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
- Use this template to create a new repository
- Clone your new repository
- Run the installer:
.\install.ps1
- 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)
- Click "Use this template" on GitHub
- Clone your new repository
- 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.jsonMethod 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:
- Fork this template
- Make improvements
- Submit pull request
- Update documentation
π License
MIT License - free for commercial and personal use.
π― Next Steps
After using this template:
- Customize the AI safety rules for your project
- Add project-specific health checks
- Configure automated backup schedules
- Set up team-specific checkpoint workflows
- Integrate with your CI/CD pipeline
Template Version: 1.0.0
Last Updated: 2024
Compatibility: Cross-platform (Windows/Linux/macOS)