# desk-moloni Development Guidelines

## 🎯 Projeto: Integração DeskCRM + Moloni
Auto-generated from template Descomplicar® v2.0. Last updated: 2025-09-12 21:31

## Active Technologies
- **PHP 8.4+** - Core backend development
- **DeskCRM API** - Customer relationship management
- **Moloni API** - Financial/invoicing integration
- **MySQL/MariaDB** - Database layer
- **Branch**: 001-desk-moloni-integration

## Project Structure
```
desk-moloni/
├── src/                    # Source code
├── tests/                  # Test suite
├── templates/              # Template files
├── modules/                # Modular components
├── scripts/                # Automation scripts
├── docs/                   # Documentation
└── logs/                   # Application logs
```

## Commands
```bash
# Development
php desk_moloni.php         # Main application
php create_tables.php       # Database setup
./validate_sync.sh          # Synchronization validation

# Testing
phpunit                     # Run test suite
php -l desk_moloni.php      # Syntax check
```

## Code Style
- **PSR-12**: PHP coding standards
- **Type hints**: Mandatory for all parameters
- **Error handling**: Comprehensive exception handling
- **Documentation**: PHPDoc for all public methods
- **Security**: Input validation and sanitization

## Recent Changes
- 001-desk-moloni-integration: Core integration framework implemented
- Database structure created and validated
- API connections established
- Error handling and logging implemented

<!-- MANUAL ADDITIONS START -->
<!-- MANUAL ADDITIONS END -->