How Pulsar bootstraps Laravel
The minimal runtime chain is: the installer adds the application-wide provider and discovery paths; Laravel loads that provider from bootstrap/providers.php; each generated Service provider loads its own routes after you register it in the same list.
Installer-owned wiring
app/Providers/PulsarServiceProvider.php is the application-wide extension point. It establishes Pulsar's Policy naming and provides deliberate places for bindings, scoped or contextual bindings, gates, and observers. The installer creates it, but a routine rerun preserves local changes.
bootstrap/providers.php is Laravel's application-provider list. Installation adds the fully qualified application provider once. A later make:service Client invocation only prints the generated Client provider class; you register that distinct class yourself.
bootstrap/app.php remains Laravel's application builder. Pulsar safely adds Listener discovery under app/Pulsar/Domain/*/Listeners and expands concrete Artisan Command directories under each Service Module. It does not replace existing routing, middleware, or exception configuration.
Service-owned wiring
The generated ClientServiceProvider registers its RouteServiceProvider. That provider loads Routes/api.php under the /api/client URI prefix, client. route-name prefix, and api middleware. Because the API file starts empty, successful application boot proves provider registration—not the existence of a route or feature.
This split keeps responsibilities visible:
| Owner | Responsibility |
|---|---|
| Installer | Application provider, provider-list entry, Listener discovery, and Artisan Command discovery. |
| Application | One explicit Client provider entry after generation. |
| Client Service | Its route provider, API path, name prefix, middleware, and later feature routes. |
| Laravel | Provider lifecycle, Event discovery, Command registration, route loading, middleware, and application boot. |
Why reruns are safe
Installation plans every candidate change before writing. A recognized existing entry or path is not duplicated; a mergeable custom array retains its existing paths. Unsafe or ambiguous input refuses the whole plan with no writes. A successful application-builder change gets a byte-for-byte recovery backup, while provider-only restoration with --force does not.
The duplicate-provider check is intentionally literal: it recognizes the fully qualified application provider entry. Normalize imported shorthand before installation so the provider list retains one semantic registration.
Boundary of this explanation
This page explains only the first-install chain needed to reason about the files you recently changed. Pulsar remains Laravel-aware: Laravel owns the runtime lifecycle, and Pulsar restores discovery conventions inside it. The broader architecture section owns the deeper placement and dependency structure.
Build your first Pulsar feature uses the loaded Client route group, and Tour the project you built follows the complete Request through that boundary.