Getting started

Quickstart

From docs/quickstart.md at commit 2d81a95.

Spinto 0.1.0. These docs follow the main branch. Spinto isn't on crates.io yet, so you install it from a clone.

Spinto is a dashboard for Laravel for Rust durable workflows and queues. In about five minutes you’ll have it open on a real run.

Requirements

  • Node.js 22, to build Spinto’s frontend once.
  • PostgreSQL, for the example application.
  • For your own application: Laravel for Rust 0.1.4 or later, with the database workflow store.

Get a copy

Spinto isn’t on crates.io yet. Clone the repository and build the frontend. The crate embeds the built dist/ folder when it compiles:

git clone https://github.com/sifrious/spinto.git
cd spinto
npm ci && npm run build

Run the example

The repository includes examples/onboarding, a Laravel for Rust application with a customer-onboarding workflow that retries, sleeps, waits for an approval and builds a welcome pack. With PostgreSQL running:

cargo build
cd examples/onboarding
cp .env.example .env                      # then set DATABASE_URL
../../target/debug/onboarding key:generate # sets APP_KEY, which sessions need
../../target/debug/onboarding migrate
../../target/debug/onboarding db:seed      # prints the demo operator's password
../../target/debug/onboarding queue:work &
../../target/debug/onboarding demo:start --failures 2 --pack-seconds 20
../../target/debug/onboarding serve

Open http://127.0.0.1:8000/spinto and sign in as ops@spinto.test with the password db:seed printed.

The run stops at once to wait for an approval. Approve customer 1, the customer demo:start printed, from another terminal in examples/onboarding:

../../target/debug/onboarding demo:approve 1

The run then fails to provision twice, retries, builds the welcome pack for 20 seconds, sleeps through a 10-second cooling-off period and completes.

Add Spinto to your application

Until Spinto is on crates.io, depend on a local clone with its frontend built:

# Cargo.toml
[dependencies]
spinto = { path = "../spinto" }

Register the provider in your application’s builder:

// src/app.rs
use crate::http::spinto_access::SpintoAccess;

Application::configure()
    .with_providers(|providers| {
        providers.add(spinto::Spinto::new().authorize(SpintoAccess));
    })

Then run your application’s migrations. Spinto registers two tables of its own, for the job attempts and worker check-ins it records:

cargo run -- migrate

Spinto’s pages are now at /spinto, for the people SpintoAccess lets in. Spinto refuses every request until you tell it who may look. The Installation guide covers authorizing access, configuration, and the rest.

The example above already mounts Spinto this way. Use these steps when you want the dashboard on your own application.

Next steps

  • Installation covers requirements, authorization, configuration, and the example in more detail.
  • Deployment shows how to run Spinto next to your own queue workers or on Laravel Cloud.
  • The reader explains how Spinto turns the workflow store’s rows into runs, timelines, graphs and redacted payloads.