clutch-property-mgmt / business-domain
Pure business domain models for Clutch Property Management. Contains framework-agnostic entities such as Property, Unit, Address, CompanyInfo, ContactInfo, and related value objects. Designed for Clean Architecture: zero infrastructure, no PDO, no external dependencies.
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/clutch-property-mgmt/business-domain
Requires
- phpolar/model: ^2.2
This package is not auto-updated.
Last update: 2026-02-22 17:56:31 UTC
README
Pure business domain models for Clutch Property Management. Contains framework-agnostic entities such as Property, Unit, Address, CompanyInfo, ContactInfo, and related value objects. Designed for Clean Architecture: zero infrastructure, no PDO, no external dependencies.
Table of Contents
- Goals
- What’s Included
- What’s Not Included
- Install
- Usage
- Directory & Namespaces
- Versioning
- Contributing
- License
Goals
- Represent the core business domain of a property management company
- Provide stable, pure, side‑effect‑free domain entities
- Stay framework‑agnostic and persistence‑agnostic
- Serve as the business foundation for
storefrontandstorefront-admin
What’s Included
- Core business entities:
PropertyUnitAddressCompanyCompanyInfoContactInfo
- Simple domain invariants and rules with no external I/O
- Immutable value objects where appropriate
What’s Not Included
- No PDO or repository implementations
- No validation framework
- No HTTP, controllers, or framework glue
- No CMS-related classes (see
content-domain)
Install
composer require clutch-property-mgmt/business-domain
Requires PHP 8.2+.
Usage
Entities
<?php use ClutchPropertyMgmt\\BusinessDomain\\Property; use ClutchPropertyMgmt\\BusinessDomain\\Address; $address = new Address( street: '123 Main St', city: 'Fort Collins', state: 'CO', postalCode: '80524' ); $property = new Property( id: 42, name: 'Midtown Lofts', address: $address, );
Value Objects
<?php final class ContactInfo { public function __construct( public readonly string $phone, public readonly string $email, ) {} }
Directory & Namespaces
src/ Property.php Unit.php Address.php Company.php CompanyInfo.php ContactInfo.php
Namespace root: ClutchPropertyMgmt\\BusinessDomain
Versioning
- Semantic Versioning (SemVer)
- Breaking changes only in MAJOR releases
Contributing
- Fork the repo and create a feature branch
- Include tests where applicable
- Ensure CI passes
- Open a PR with a clear description
License
MIT License. See LICENSE for details.