This commit introduces a more reliable and consistent approach to setting up the development environment using backups: - Add setup-from-backup.sh script for environment setup from existing backups - Standardize script naming and organization - Move obsolete scripts to bin/obsolete directory - Update documentation with new workflow instructions - Create migration guide for transitioning to new workflow - Update Memory Bank with workflow improvements The new workflow provides: - More reliable environment setup - Faster setup process - Offline development capability - Consistent development environments across team members Breaking changes: - setup-dev.sh is replaced by setup-from-backup.sh - sync-and-setup.sh is replaced by separate scripts - verify-with-wpcli.sh is no longer used Migration path is documented in MIGRATION_GUIDE.md
124 lines
No EOL
2.8 KiB
Markdown
124 lines
No EOL
2.8 KiB
Markdown
# System Patterns
|
|
|
|
This file documents the architectural and design patterns used in the project.
|
|
2025-03-26 11:13:00 - Updated with development environment workflow patterns
|
|
|
|
## Development Environment Patterns
|
|
|
|
### Container Architecture
|
|
* **Docker Composition**
|
|
* WordPress (PHP-FPM)
|
|
* Nginx web server
|
|
* MariaDB database
|
|
* phpMyAdmin utility
|
|
* Shared volumes for persistence
|
|
* Network isolation
|
|
* Environment-based configuration
|
|
|
|
### Development Workflow Patterns
|
|
* **Backup-Based Setup**
|
|
* Production data backup creation
|
|
* Local backup storage
|
|
* Backup-based environment initialization
|
|
* Consistent development environments
|
|
* Offline development capability
|
|
* **Script Organization**
|
|
* Standardized naming conventions
|
|
* Clear separation of concerns
|
|
* Comprehensive error handling
|
|
* User-friendly feedback
|
|
* Modular script design
|
|
|
|
### Configuration Management
|
|
* **Environment Variables**
|
|
* Database credentials
|
|
* WordPress settings
|
|
* Development flags
|
|
* Debug options
|
|
* Site URLs
|
|
* **Docker Volumes**
|
|
* WordPress files
|
|
* Database data
|
|
* Configuration files
|
|
* SSL certificates
|
|
* Logs
|
|
|
|
### WordPress Integration
|
|
* **Core Configuration**
|
|
* wp-config.php management
|
|
* Environment-based settings
|
|
* Debug mode control
|
|
* URL configuration
|
|
* Security settings
|
|
* **Plugin Management**
|
|
* Controlled activation
|
|
* Version management
|
|
* Dependency handling
|
|
* Update procedures
|
|
* Compatibility checks
|
|
|
|
### Database Patterns
|
|
* **Connection Management**
|
|
* Environment-based credentials
|
|
* Connection pooling
|
|
* Error handling
|
|
* Retry mechanisms
|
|
* Timeout configuration
|
|
* **Data Access**
|
|
* WordPress WPDB wrapper
|
|
* Prepared statements
|
|
* Transaction support
|
|
* Query optimization
|
|
* Cache integration
|
|
|
|
### Security Patterns
|
|
* **Development Security**
|
|
* Disabled SSL requirement
|
|
* Debug mode enabled
|
|
* Error display active
|
|
* Test data isolation
|
|
* Local-only access
|
|
* **Production Preparation**
|
|
* SSL configuration ready
|
|
* Error logging configured
|
|
* Security headers prepared
|
|
* Access controls defined
|
|
* Data sanitization
|
|
|
|
### Testing Architecture
|
|
* **Test Environment**
|
|
* Isolated containers
|
|
* Test-specific configuration
|
|
* Data fixtures
|
|
* Mock services
|
|
* Debug capabilities
|
|
* **Test Types**
|
|
* Unit tests
|
|
* Integration tests
|
|
* E2E tests
|
|
* Performance tests
|
|
* Security tests
|
|
|
|
### Logging and Monitoring
|
|
* **Log Management**
|
|
* PHP error logs
|
|
* WordPress debug log
|
|
* Nginx access/error logs
|
|
* Database logs
|
|
* Container logs
|
|
* **Monitoring**
|
|
* Container health checks
|
|
* Resource usage
|
|
* Error tracking
|
|
* Performance metrics
|
|
* Security events
|
|
|
|
### Version Control
|
|
* **Feature Branches**
|
|
* Feature branches
|
|
* Pull requests
|
|
* Code review process
|
|
* Continuous integration
|
|
* Automated testing
|
|
|
|
2025-03-26 11:13:00 - Added development environment workflow patterns |