201a281e3a
- Add plg_task_mokobackup: Joomla Scheduled Tasks integration so each backup profile can run on its own schedule (like Akeeba Backup Pro) - Replace JSON config/filters with individual form fields and DB columns - Add FTP/FTPS and Google Drive remote storage options per profile - Add archive settings tab (format, compression, split size, backup dir) - Add exclusion filter fields (dirs, files, tables) as newline-separated textareas instead of raw JSON Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
85 lines
3.2 KiB
Markdown
85 lines
3.2 KiB
Markdown
# CLAUDE.md
|
|
|
|
This file provides guidance to Claude Code when working with this repository.
|
|
|
|
## Project Overview
|
|
|
|
**MokoJoomBackup** -- Full-site backup and restore for Joomla — database, files, and configuration
|
|
|
|
| Field | Value |
|
|
|---|---|
|
|
| **Platform** | joomla |
|
|
| **Language** | PHP |
|
|
| **Default branch** | main |
|
|
| **License** | GPL-3.0-or-later |
|
|
| **Wiki** | [MokoJoomBackup Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoJoomBackup/wiki) |
|
|
| **Standards** | [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki/Home) |
|
|
|
|
## Common Commands
|
|
|
|
```bash
|
|
make build # Build the project
|
|
make lint # Run linters
|
|
make validate # Validate structure
|
|
make release # Full release pipeline
|
|
make minify # Minify CSS/JS assets
|
|
make clean # Clean build artifacts
|
|
```
|
|
|
|
```bash
|
|
composer install # Install PHP dependencies
|
|
```
|
|
|
|
## Architecture
|
|
|
|
This is a Joomla **package** extension (`pkg_mokobackup`) containing three sub-extensions:
|
|
|
|
### com_mokobackup (Component)
|
|
- Admin backend for managing backup profiles and backup records
|
|
- Backup engine: `Engine/BackupEngine`, `Engine/DatabaseDumper`, `Engine/FileScanner`, `Engine/Archiver`
|
|
- Joomla 4/5 MVC: Controllers, Models, Views, Tables
|
|
- Namespace: `Joomla\Component\MokoBackup\Administrator`
|
|
- Database tables: `#__mokobackup_profiles`, `#__mokobackup_records`
|
|
- CLI: `cli/mokobackup.php` for cron-based backups
|
|
|
|
### plg_system_mokobackup (System Plugin)
|
|
- Cleanup of expired backup archives (age + count limits)
|
|
- Namespace: `Joomla\Plugin\System\MokoBackup`
|
|
|
|
### plg_task_mokobackup (Task Plugin)
|
|
- Integrates with Joomla's Scheduled Tasks (com_scheduler)
|
|
- Registers "Run Backup Profile" task type
|
|
- Each scheduled task selects a backup profile — create multiple tasks for different schedules
|
|
- Namespace: `Joomla\Plugin\Task\MokoBackup`
|
|
|
|
### plg_webservices_mokobackup (WebServices Plugin)
|
|
- REST API for remote backup management
|
|
- Wire-compatible with existing mcp_mokobackup MCP server
|
|
- Endpoints: backup, backups, profiles, download, delete
|
|
- Namespace: `Joomla\Plugin\WebServices\MokoBackup`
|
|
|
|
### Database Schema
|
|
|
|
Two tables:
|
|
- `#__mokobackup_profiles` — backup profiles (name, description, config JSON, filters JSON)
|
|
- `#__mokobackup_records` — backup records (profile_id, status, origin, archive path, sizes, timestamps)
|
|
|
|
## Rules
|
|
|
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, or `*.min.css`/`*.min.js`
|
|
- **Attribution**: use `Authored-by: Moko Consulting` in commits
|
|
- **Branch strategy**: develop on `dev`, merge to `main` for release
|
|
- **Minification**: handled at build time (CI)
|
|
- **Wiki**: documentation lives in the Gitea wiki, not in `docs/` files
|
|
- **Standards**: this repo follows [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki/Home)
|
|
|
|
## Coding Standards
|
|
|
|
- PHP 8.1+ minimum
|
|
- Joomla 4/5 DI container pattern: `services/provider.php` > Extension class
|
|
- Legacy stub `.php` file required for plugin loader but empty
|
|
- `SubscriberInterface` for event subscription (not `on*` method naming)
|
|
- `bind() > check() > store()` for Table operations (not `save()`)
|
|
- Language file placement: site (no `folder`) vs admin (`folder="administrator"`)
|
|
- SPDX license headers on all PHP files
|