Download the PHP package monkeyscloud/monkeyslegion-live without Composer
On this page you can find all versions of the php package monkeyscloud/monkeyslegion-live. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download monkeyscloud/monkeyslegion-live
More information about monkeyscloud/monkeyslegion-live
Files in monkeyscloud/monkeyslegion-live
Package monkeyslegion-live
Short Description Server-driven reactive components — write PHP 8.4, get a reactive UI with MonkeysJS
License MIT
Informations about the package monkeyslegion-live
monkeyslegion-live
Server-driven reactive components for MonkeysLegion. Write PHP, get a reactive UI — no API, no SPA build step.
monkeyslegion-live is the server half. MonkeysJS is the client runtime that ships with it. Together they give you Livewire/LiveComponent-class interactivity: components are plain PHP 8.4 classes, the UI updates over the wire, and you never hand-write fetch calls or JSON endpoints.
The differentiator: MonkeysJS is a purpose-built runtime, not a wrapper around Alpine.js or Stimulus. It's designed against this exact wire protocol — hydration, morphing, and batching are first-class. No PHP framework ships streamed AI rendering from a server into the DOM token-by-token.
Installation
Add to your layout:
Requirements
- PHP 8.4+
monkeyscloud/monkeyslegion-template^2.0monkeyscloud/monkeyslegion-http^2.1monkeyscloud/monkeyslegion-router^2.1monkeyscloud/monkeyslegion-di^2.0monkeyscloud/monkeyslegion-encryption^1.0
Optional
monkeyslegion-validation— live form validation viaWithValidationmonkeyslegion-permissions—#[RequiresPermission]on actionsmonkeyslegion-sockets— real-time push viaBroadcastsmonkeyslegion-apex— streamed AI rendering viaStreamsmonkeyslegion-files— chunked file uploads viaWithFileUploads
Quick Start
1. Write a component
2. Write the template
3. Use it
Directive Set
| Directive | Purpose |
|---|---|
ml:model |
Two-way bind input to #[State] |
ml:model.live |
Sync on every input event |
ml:model.live.debounce.300ms |
Debounced live sync |
ml:model.blur |
Sync on blur |
ml:model.lazy |
Sync on change |
ml:click |
Call #[Action] method |
ml:submit.prevent |
Form submission action |
ml:keydown.enter |
Key event → action |
ml:loading |
Show during round-trip |
ml:loading.remove |
Hide during round-trip |
ml:loading.attr.disabled |
Set attribute during loading |
ml:loading.delay.200ms |
Delayed loading indicator |
ml:dirty |
Reflect unsynced changes |
ml:poll.5s |
Re-render on interval |
ml:poll.keep-alive.30s |
Poll even when tab hidden |
ml:offline |
Show when offline |
ml:online |
Show when online |
ml:transition |
CSS enter/leave transitions |
ml:ignore |
Opt subtree out of morphing |
ml:replace |
Force full replacement |
ml:preserve |
Keep node identical across morphs |
ml:stream |
Target for streamed content |
Modifiers: .prevent, .stop, .self, .debounce.<ms>, .throttle.<ms>, .once, .window, .outside
Component API
State
Actions
Computed
Lifecycle Hooks
Property-specific hooks: updatedEmail(), updatingStatus().
Events
Validation
Streaming AI (Apex Integration)
Testing
CLI
Configuration
Copy config/live.example.mlc to your project's config/live.mlc. See the file for all options.
Security Model
| Concern | Mitigation |
|---|---|
| State tampering | HMAC checksum on every snapshot; mismatch → 419 |
| Calling private methods | Only #[Action] methods are routable |
| Mass-assignment | Only #[State] (non-readonly) properties accept client updates |
| Argument injection | Action args type-coerced against method signature |
| Authorization | #[RequiresPermission] runs before the action body |
| Entity tampering | Entities rehydrate by id with checksum |
| CSRF | Token injected by @liveScripts, validated on every POST |
| File-upload abuse | Size/MIME allowlists enforced server-side |
License
MIT © MonkeysCloud
All versions of monkeyslegion-live with dependencies
monkeyscloud/monkeyslegion-template Version ^2.0
monkeyscloud/monkeyslegion-http Version ^2.1
monkeyscloud/monkeyslegion-router Version ^2.1
monkeyscloud/monkeyslegion-di Version ^2.0
monkeyscloud/monkeyslegion-encryption Version ^1.0