open source

Laravel Demo Mode

A Laravel package that turns an application into a public playground with seeded data, scheduled resets, rotating credentials, and safeguards for a temporary demo environment.

  • Laravel
  • PHP
  • Composer
  • Blade
  • Livewire
  • Inertia JS
Laravel Demo Mode visual with a demo browser window and reset cycle

Laravel Demo Mode packages the work needed to publish a safe, browsable demo of a Laravel application. I extracted it from the demo installations for Laravel SSO and the Mary UI Laravel Starter Kit, where the same concerns kept appearing: temporary data, a repeatable reset, credentials visitors can use, and guardrails around actions a public demo should not perform.

What the package provides

  • Repeatable demo data. An application-owned seeder defines the baseline; the package runs scheduled resets and can display the next reset time in the interface.
  • Rotating credentials. The demo login can publish credentials that rotate with the reset cycle instead of leaving a permanent public password.
  • Visible demo state. Blade components and a shared payload for Livewire or Inertia make the temporary nature of the environment clear to visitors.
  • Optional visitor isolation. A scoped sandbox mode lets visitors see the seeded baseline together with their own changes. It is deliberately ephemeral, rather than a multi-tenant security boundary.
  • Operational checks. A doctor command audits the configuration before a reset, while status and dry-run commands help explain what the installation will do.

The package keeps demo mode opt-in. Installation publishes configuration and can scaffold a seeder, but does not enable the demo in the current environment. Because resetting demo data can drop tables, the deployment must use a dedicated demo database and pass the package’s security checks before the first reset.

Built for existing Laravel interfaces

The application remains responsible for its own product and demo data. The package supplies the lifecycle and exposes one demo state that can be used from Blade, Livewire, or Inertia. It also ships guidance for AI-assisted Laravel development, so agents working on a demo installation can understand the reset and credential rules before editing it.

Explore the package and its documentation.