Skip to content

PulsarAn opinionated Laravel architecture for modular, domain-driven applications at scale.

Pulsar is architecture and code generation—not a framework or runtime layer—with deliberate homes for delivery, business logic, and outbound integrations.

Last updated:

What Pulsar gives you

Pulsar gives app/Pulsar a governed structure while ordinary Laravel code can remain in stock directories.

  • Predictable placement. Service, Domain, and Infrastructure each have an explicit home.
  • Thin adapters. HTTP, queue, CLI, and scheduler entry points validate, authorize, establish context, and call one UseCase.
  • Owned workflows. UseCases own orchestration and transactions; Operations are reusable workflow fragments that do not own transactions or emit events.
  • Explicit outbound boundaries. Domain Contracts describe capabilities, and Infrastructure Adapters implement them.

Current package: 0.4.1 (current). PHP requirement: ^8.3 (minimum 8.3.0).

app/Pulsar/
├── Services/{Service}/Modules/{Module}/UseCases/{Name}.php
├── Domain/{Domain}/Contracts/{Name}.php
└── Infrastructure/{Area}/{Name}.php
Generated Representative generated paths — one source-backed path from each Pulsar layer.

How it thinks

Services model audiences such as Admin, Client, and Internal. They are logical areas inside one application—not microservices, bounded contexts, deployment units, databases, or schemas. The Laravel-aware Domain is shared across audiences and independent of delivery, not independent of Laravel. Infrastructure implements Domain-owned Contracts.

The Service layer contains a UseCase that points to Domain capabilities and a Domain Contract; an Infrastructure Adapter points back to that Contract by implementing it.
Pulsar's three-layer dependency direction. Service workflows use the Laravel-first Domain; Infrastructure Adapters implement Domain-owned Contracts.

Interpretation. Service-layer UseCases use Domain capabilities and Contracts. Infrastructure Adapters implement those Contracts, so both dependency directions point inward to the Domain; delivery remains thin and workflows remain owned by UseCases.

Good fit

Pulsar suits medium-to-large Laravel applications, multi-tenant SaaS products, and teams that benefit from enforced placement and dependency boundaries. It can coexist incrementally with stock Laravel routes and modules.

Not a fit

Its opinionation and Laravel coupling are deliberate costs. Pulsar is not a microservices architecture, framework-independent architecture, or runtime replacement, and it is a poor fit for small applications or teams that prefer flexible, default Laravel placement.