Hand-written narrative reference pages for the most-touched classes in Nexus.
Each page introduces the class, shows a worked example, and links to the full
auto-generated API reference on api.nexusactors.com.
For exhaustive method-by-method documentation of every public class in every
package, see api.nexusactors.com.
Front-door classes
These are the classes you will interact with most often when building with Nexus.
Core API
| Class | Package | Role |
|---|
| Duration | nexus-runtime | Immutable nanosecond-precision duration value object |
| ActorSystem | nexus-core | Entry point — creates, runs, and shuts down an actor system |
| Behavior | nexus-core | Immutable actor message-handler definition |
| Props | nexus-core | Immutable spawn configuration for an actor |
| ActorRef | nexus-core | Type-safe reference to a running actor |
| ActorContext | nexus-core | Runtime context available inside every handler |
| BehaviorWithState | nexus-core | Return type for stateful closure handlers |
Persistence
| Class | Package | Role |
|---|
| PersistenceId | nexus-persistence | Unique identity for a persistent actor |
| EventSourcedBehavior | nexus-persistence | Event-sourced behavior builder |
| DurableStateBehavior | nexus-persistence | Durable-state behavior builder |
| Effect | nexus-persistence | Side-effect descriptor for event-sourced commands |
| EventStore | nexus-persistence | Interface for reading and writing event streams |
Infrastructure
| Class | Package | Role |
|---|
| Runtime | nexus-runtime | Concurrency backend abstraction (Fiber / Swoole / Step) |
| MailboxConfig | nexus-runtime | Bounded or unbounded mailbox configuration |
| Envelope | nexus-core | Immutable message wrapper with routing metadata |
Lifecycle signals
| Class | Package | Role |
|---|
| Signal | nexus-core | Marker interface for runtime lifecycle notifications |
HTTP
| Class | Package | Role |
|---|
| HttpApp | nexus-http | Fluent DSL entry point for building HTTP applications |
| RouteBuilder | nexus-http | Per-route middleware and naming configuration |
| CompiledHttpApp | nexus-http | Immutable PSR-15 handler produced by HttpApp::compile() |
| WebSocketHandler | nexus-http-ws | Base class for WebSocket connection handlers |
| WebSocketContext | nexus-http-ws | Per-connection context for sending frames and inspecting the upgrade request |
| AuthenticationMiddleware | nexus-http-auth | PSR-15 middleware that stamps a Principal onto authenticated requests |
| RequiresAuth | nexus-http-auth | PHP attribute enforcing authentication (and sibling role/scope attributes) |
Scaling
| Class | Package | Role |
|---|
| WorkerNode | nexus-worker-pool | Per-thread coordinator in a Swoole worker pool |
Bootstrap
| Class | Package | Role |
|---|
| NexusApp | nexus-app | Fluent bootstrap helper for single-process applications |
Auto-generated API documentation
The complete method-by-method reference for every public class in every Nexus
package is available at api.nexusactors.com. The
pages are generated by phpDocumentor from the source docblocks and updated on
every release.
Internal classes
Nexus has roughly 29 classes tagged @internal — implementation details of the
Behavior / ActorCell machinery that are not part of the public API surface.
They are documented in the Internal classes appendix along with
an explanation of why each one is hidden.