Update Claude.md to reference skills with brief overviews
Replace detailed instructions with skill references and 2-3 sentence overviews for: - Docker Environment → /docker-setup - Testing → /run-tests - Code Quality → /static-analysis - Adding New Modules → /create-module - Database Operations → /database-operations - Debugging → /debug-setup - Troubleshooting Docker → /troubleshoot-docker This reduces duplication and keeps Claude.md concise while maintaining comprehensive guidance through skills.
This commit is contained in:
parent
5ae612227e
commit
215564868f
1 changed files with 17 additions and 48 deletions
65
Claude.md
65
Claude.md
|
|
@ -155,55 +155,29 @@ Commands (write operations) and Queries (read operations) are separated:
|
||||||
|
|
||||||
### Docker Environment
|
### Docker Environment
|
||||||
|
|
||||||
All development happens in Docker containers:
|
See skill: `/docker-setup` for detailed instructions.
|
||||||
|
|
||||||
```bash
|
All development happens in Docker containers with PHP 8.1, MySQL 8.0, and phpMyAdmin. Use `make up` to start the environment and `make install` to install dependencies.
|
||||||
# Start environment
|
|
||||||
make up
|
|
||||||
|
|
||||||
# Install dependencies
|
|
||||||
make install
|
|
||||||
|
|
||||||
# Access container shell
|
|
||||||
make shell
|
|
||||||
```
|
|
||||||
|
|
||||||
**Available Services:**
|
|
||||||
- **App**: PHP 8.1 + Apache (http://localhost:8000)
|
|
||||||
- **Database**: MySQL 8.0 (port 3306)
|
|
||||||
- **phpMyAdmin**: Database management (http://localhost:8080)
|
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
Comprehensive testing suite with PHPUnit:
|
See skill: `/run-tests` for detailed instructions.
|
||||||
|
|
||||||
```bash
|
Comprehensive testing suite with PHPUnit supporting unit tests, integration tests, and coverage reports. Use `make test` to run all tests.
|
||||||
make test # Run all tests
|
|
||||||
make test-unit # Unit tests only
|
|
||||||
make test-integration # Integration tests only
|
|
||||||
make test-coverage # Coverage report
|
|
||||||
```
|
|
||||||
|
|
||||||
### Code Quality
|
### Code Quality
|
||||||
|
|
||||||
Static analysis and code quality tools:
|
See skill: `/static-analysis` for detailed instructions.
|
||||||
|
|
||||||
```bash
|
Static analysis with PHPStan and Deptrac to enforce type safety and architectural boundaries. Use `make static-analysis` to run both tools.
|
||||||
make phpstan # PHPStan static analysis
|
|
||||||
make deptrac # Deptrac layer analysis
|
|
||||||
make static-analysis # Run both
|
|
||||||
make rector # Preview Rector changes
|
|
||||||
make rector-fix # Apply Rector changes
|
|
||||||
```
|
|
||||||
|
|
||||||
## Important Patterns
|
## Important Patterns
|
||||||
|
|
||||||
### Adding New Modules
|
### Adding New Modules
|
||||||
|
|
||||||
1. Create directory: `src/Modules/{ModuleName}/`
|
See skill: `/create-module` for detailed instructions.
|
||||||
2. Implement Domain, Application, and Infrastructure layers
|
|
||||||
3. Create `{ModuleName}ServiceProvider.php` in module root
|
Create modules following DDD principles with Domain, Application, and Infrastructure layers. The ModuleLoader automatically discovers service providers in `src/Modules/*/`.
|
||||||
4. ModuleLoader automatically discovers and registers it
|
|
||||||
|
|
||||||
### Creating Service Provider
|
### Creating Service Provider
|
||||||
|
|
||||||
|
|
@ -283,11 +257,9 @@ APP_SUPPORTED_LOCALES=en,de,fr
|
||||||
|
|
||||||
## Debugging
|
## Debugging
|
||||||
|
|
||||||
Xdebug is configured for debugging:
|
See skill: `/debug-setup` for detailed instructions.
|
||||||
|
|
||||||
- Set breakpoints in IDE
|
Xdebug is pre-configured in the Docker environment for PHPStorm and VS Code. Debug sessions connect on port 9003 with automatic path mapping to `/var/www/html`.
|
||||||
- Access application via http://localhost:8000
|
|
||||||
- Debug sessions automatically connect on port 9003
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|
@ -332,15 +304,12 @@ make rector # Code quality preview
|
||||||
```
|
```
|
||||||
|
|
||||||
**Database:**
|
**Database:**
|
||||||
|
|
||||||
|
See skill: `/database-operations` for detailed instructions.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Import schema
|
# Import schema
|
||||||
docker compose exec -T db mysql -u foundation_user -pfoundation_password foundation < database/schema.sql
|
docker compose exec -T db mysql -u foundation_user -pfoundation_password foundation < database/schema.sql
|
||||||
|
|
||||||
# Access MySQL CLI
|
|
||||||
docker compose exec db mysql -u foundation_user -p foundation
|
|
||||||
|
|
||||||
# Export database
|
|
||||||
docker compose exec db mysqldump -u foundation_user -pfoundation_password foundation > backup.sql
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Best Practices
|
## Best Practices
|
||||||
|
|
@ -360,9 +329,9 @@ docker compose exec db mysqldump -u foundation_user -pfoundation_password founda
|
||||||
|
|
||||||
### Docker Issues
|
### Docker Issues
|
||||||
|
|
||||||
- Ensure Docker and Docker Compose are installed
|
See skill: `/troubleshoot-docker` for detailed diagnostic steps and solutions.
|
||||||
- Check port conflicts (8000, 8080, 3306)
|
|
||||||
- Verify user permissions: `export USER_ID=$(id -u) && export GROUP_ID=$(id -g)`
|
Common issues include port conflicts (8000, 8080, 3306), permission errors, and container startup failures. Use `docker compose ps` and `docker compose logs` to diagnose problems.
|
||||||
|
|
||||||
### Database Connection Issues
|
### Database Connection Issues
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue