smorken/domain
A Laravel package for organizing applications around domain-driven design, giving you a simple foundation for structuring domain logic and keeping business rules cleanly separated from framework and infrastructure concerns.
Architecture fit. smorken/domain is a DDD helper package for Laravel — the category typically supplies base entity/value-object classes, repository and service-layer contracts, command/event buses, and module scaffolding generators. Fit is entirely contingent on whether the team has already committed to a DDD-in-Laravel style, because there is no canonical implementation of DDD in Laravel. Every team's flavor differs on aggregate boundaries, repository returns (collection vs. query builder), where Eloquent lives, and how domain events cross into the framework. A third-party helper package encodes one author's opinions; if those diverge from ours, we inherit either a refactor or a permanently forked convention. The realistic fit is "narrow": useful as a reference implementation and pattern catalog, questionable as a runtime dependency.
Integration feasibility. The repository is Bitbucket-hosted with no Packagist presence implied, so consumption requires a Composer VCS repository entry plus credential provisioning (Bitbucket app password or SSH key) in every CI runner and developer environment. That is a persistent, non-trivial operational tax for a package of unknown size. Feasibility is high technically — it's plain PHP with PSR-4 autoloading — but the distribution channel is the wrong one for the PHP ecosystem, where GitHub and Packagist are the assumed path.
Technical risk. The adoption signals are the story here: zero stars, zero dependents, zero score. There is no evidence of production use anywhere, which means no one has filed the bugs we will file. Compounding factors to verify before any commitment:
| Diligence item | Why it matters | Blocking? |
|---|---|---|
LICENSE file present? |
Absent license = default all-rights-reserved; we have no legal right to use or fork it | Yes |
| Laravel/PHP version constraints | Silent breakage on Laravel 10→11 or PHP 8.3 upgrades | Yes |
| Test suite and CI | No tests = every upgrade is a manual regression hunt | Yes |
| Bus factor | Single maintainer, no releases, no changelog | Yes |
Transitive smorken/* deps |
May pull further unvetted packages | Yes |
| Security advisory coverage | Not on Packagist ⇒ excluded from composer audit feeds |
High |
Key questions.
Stack fit. Additive and low-blast-radius if confined to the domain layer — helper packages in this category rarely touch HTTP, queue, or Eloquent internals. The risk concentrates in the framework-version constraint (illuminate/support) and in auto-discovered service providers, which run on every request boot. Verify the provider does no unconditional binding or config publishing at boot before adopting.
Migration path. Do not consume the Bitbucket repo directly. Mirror it into internal GitHub (or GitLab), add the missing license determination, tag an internal release (0.1.0-internal.1), and serve it via Private Packagist, Satis, or a path repository. This removes the Bitbucket availability and permission dependency from the build path — the highest-probability operational failure — and gives us a place to patch. Pin to a commit SHA, never a branch; no branch protection exists upstream.
Compatibility. Confirm PSR-4 autoload roots, PHP ^8.x support, and Laravel constraint against our current and next major. Because there are no dependents, there is no compatibility folklore to lean on — we establish it empirically with a throwaway Laravel skeleton and a smoke test of each provided abstraction.
Sequencing.
Domain\Contracts\*) that delegate to the package. This is the single highest-leverage step: it makes the package replaceable in days rather than quarters.Maintenance. Effectively zero upstream maintenance. No releases, no changelog, no issue traffic. We should assume we are the maintainers from day one and budget accordingly — a fork with our own tests and a documented divergence log. The ongoing cost is small in absolute terms (a small codebase) but is a permanent line item with no community amortization.
Support. No community, no Stack Overflow corpus, no documentation beyond a README. Internal knowledge must be created and owned — a short ADR plus annotated source walkthrough is the minimum viable artifact. Onboarding a new engineer to bespoke conventions with no external references is slower than onboarding them to a well-known package or to code they can read in-repo.
Scaling. Runtime performance is almost certainly irrelevant at this layer. The scaling concern is organizational: at 10+ engineers, an opinionated helper package becomes a coordination surface. Its conventions must be documented and enforced (architecture tests, static analysis boundaries) or it degrades into inconsistent usage — at which point it has negative value relative to no abstraction at all.
Failure modes.
composer install fails cold across every environment. Mitigated entirely by the internal mirror.Ramp-up. Technical ramp is low — small, idiomatic PHP that a mid-level engineer can read in an afternoon. Organizational ramp is the real cost: no docs, no external references, unstated intent behind design choices, and convention decisions that must be ratified internally. Budget roughly a week of senior engineer time to evaluate, mirror, wrap, and document — and treat that week as the full cost of the build-it-ourselves alternative, which is the honest comparison.
How can I help you explore Laravel packages today?