|
1 | 1 | # Complex Heart PHP SDK |
2 | 2 |
|
3 | 3 | [](https://github.com/ComplexHeart/php-sdk/actions/workflows/test.yml) |
| 4 | +[](LICENSE) |
| 5 | +[](https://www.php.net/) |
4 | 6 |
|
5 | | -Provide a set of useful classes and tools to ease the adoption of Domain Driven |
6 | | -Design into your project. |
| 7 | +An SDK for building Domain-Driven Design (DDD) applications in PHP. This metapackage bundles the essential Complex Heart libraries to provide a complete toolset for implementing DDD patterns with value objects, entities, aggregates, and flexible query criteria. |
7 | 8 |
|
8 | | -- [Contracts](https://github.com/ComplexHeart/php-contracts): Commons interfaces |
9 | | - to decouple some parts of the Domain. |
10 | | -- [Data Model](https://github.com/ComplexHeart/php-domain-model): Aggregates, |
11 | | - Entities and Value Objects. |
12 | | -- [Criteria](https://github.com/ComplexHeart/php-criteria): Small implementation |
13 | | - of a criteria pattern in PHP for Complex Heart SDK. |
| 9 | +## Overview |
| 10 | + |
| 11 | +The Complex Heart SDK is designed to ease the adoption of Domain-Driven Design principles in PHP projects by providing well-tested, production-ready components that handle common DDD patterns and challenges. |
| 12 | + |
| 13 | +## Features |
| 14 | + |
| 15 | +This SDK includes three core packages: |
| 16 | + |
| 17 | +- **[Contracts](https://github.com/ComplexHeart/php-contracts)** - Common interfaces and contracts to decouple domain logic from infrastructure concerns |
| 18 | +- **[Domain Model](https://github.com/ComplexHeart/php-domain-model)** - Base classes and utilities for building Aggregates, Entities, and Value Objects |
| 19 | +- **[Criteria](https://github.com/ComplexHeart/php-criteria)** - Flexible query pattern implementation for building type-safe, repository-agnostic queries |
| 20 | + |
| 21 | +## Requirements |
| 22 | + |
| 23 | +- PHP ^8.2 |
| 24 | +- ext-json |
| 25 | + |
| 26 | +## Installation |
| 27 | + |
| 28 | +Install via Composer: |
| 29 | + |
| 30 | +```bash |
| 31 | +composer require complex-heart/sdk |
| 32 | +``` |
| 33 | + |
| 34 | +This will install all three packages and their dependencies. |
| 35 | + |
| 36 | +## What's Included |
| 37 | + |
| 38 | +### Contracts Package |
| 39 | +Provides foundational interfaces for: |
| 40 | +- Value Objects |
| 41 | +- Entities and Aggregates |
| 42 | +- Domain Events |
| 43 | +- Repositories |
| 44 | +- Services |
| 45 | + |
| 46 | +### Domain Model Package |
| 47 | +Offers base implementations for: |
| 48 | +- Value Objects with validation and immutability |
| 49 | +- Entities with identity management |
| 50 | +- Aggregate roots with domain event handling |
| 51 | +- Rich domain behaviors |
| 52 | + |
| 53 | +### Criteria Package |
| 54 | +Enables flexible querying with: |
| 55 | +- Type-safe query building |
| 56 | +- Filtering, ordering, and pagination |
| 57 | +- Repository-agnostic design |
| 58 | +- Composable query specifications |
| 59 | + |
| 60 | +## Documentation |
| 61 | + |
| 62 | +For detailed documentation on each package, please visit: |
| 63 | + |
| 64 | +- [Contracts Documentation](https://github.com/ComplexHeart/php-contracts#readme) |
| 65 | +- [Domain Model Documentation](https://github.com/ComplexHeart/php-domain-model#readme) |
| 66 | +- [Criteria Documentation](https://github.com/ComplexHeart/php-criteria#readme) |
| 67 | + |
| 68 | +## License |
| 69 | + |
| 70 | +This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. |
| 71 | + |
| 72 | +## Contributing |
| 73 | + |
| 74 | +Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change. |
| 75 | + |
| 76 | +## Support |
| 77 | + |
| 78 | +If you encounter any issues or have questions: |
| 79 | + |
| 80 | +- Open an issue on [GitHub Issues](https://github.com/ComplexHeart/php-sdk/issues) |
| 81 | +- Check existing issues and discussions |
| 82 | +- Review the documentation for each individual package |
0 commit comments