vinkius-labs/markovable

Markovable

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/vinkius-labs/markovable

v1.2.0 2025-10-26 07:30 UTC

This package is auto-updated.

Last update: 2025-10-26 14:04:43 UTC


README

Markovable is a Laravel-native engine for building adaptive Markov chains that learn from your product’s voice and user journeys. It turns familiar Eloquent patterns into powerful prediction, generation, anomaly detection, and analysis flows so you can ship intelligent experiences without leaving PHP.

"Give your data a memory and it will return with stories you never thought to ask." – The Markovable Manifesto ✨

Why Markovable?

  • Human DX – API-first design, fluent builders, and sensible defaults keep developers in flow.
  • Production Ready – Cache, database, and file storage drivers out of the box, plus queue-friendly jobs.
  • SaaS Native – Multi-tenant caching, predictive scoring, and lifecycle workflows keep subscription products informed in real time.
  • Composable – Extend analyzers, generators, and builders to fit any domain-specific language or dataset.
  • Observable – Built-in events, anomaly alerts, and exports make analytics, monitoring, and audits effortless.

Table of Contents

  1. Getting Started
  2. Configuration Guide
  3. Training Guide
  4. Usage Recipes
  5. Use Cases
  6. PageRank Analyzer Guide
  7. PageRank Graph Builders
  8. Predictive Intelligence
  9. Architecture
  10. Artisan Command Reference
  11. Artisan Commands Use Cases
  12. Technical Reference
  13. Contributing

Quick Peek

use VinkiusLabs\Markovable\Facades\Markovable;

$baseline = 'analytics::predictive-saas';

Markovable::chain('analytics')
    ->cache($baseline)
    ->train($historicalSessions);

$insights = Markovable::predictive($baseline)
    ->dataset($latestTenantSnapshots)
    ->usingOptions([
        'churn' => ['include_recommendations' => true],
        'ltv' => ['segments' => ['self_serve', 'enterprise'], 'include_historical' => true],
    ]);

$churnAlerts = $insights->churnScore()->get();
$ltvReport = $insights->ltv()->get();
use VinkiusLabs\Markovable\Facades\Markovable;
use App\Markovable\SaaSAuthorityGraph;
use VinkiusLabs\Markovable\Models\PageRankSnapshot;

$authority = Markovable::pageRank()
    ->useGraphBuilder(new SaaSAuthorityGraph())
    ->dampingFactor(0.9)
    ->groupBy('prefix')
    ->includeMetadata()
    ->result();

PageRankSnapshot::capture('saas-authority:q2', $authority);

What’s Inside

  • Feature-rich MarkovableChain for training, caching, generating, and analyzing sequences.
  • Generators tuned for natural language and navigation flows.
  • Analyzer strategies to surface probabilities, detect anomalies, calculate PageRank authority, and predict next-best actions.
  • Detectors and monitoring pipelines to surface unseen sequences, emerging patterns, seasonality shifts, and behaviour drift.
  • Traits and observers that keep Eloquent models self-training.
  • Artisan commands to orchestrate training, generation, and analysis from the CLI.

Ready to Explore?

Head over to the docs linked above to dive into setup, recipes, and architecture deep dives. Pair Markovable with your favorite Laravel tools, automate the mundane, and let curiosity lead the roadmap.

If you build something brilliant, we want to hear about it—open an issue or PR, or share your story. Happy modelling! 🚀