# WPStack Sandbox Manager

An isolated, disposable WordPress Multisite demo platform built by
[WP Stack Online](https://wpstack.online/).

**Author:** Aditya Bhimrajka  
**Website:** [WP Stack Online](https://wpstack.online/)  
**License:** GPL-2.0-or-later

WPStack Sandbox Manager turns a customer-owned WordPress Multisite network into
a managed plugin-testing environment. No sandbox hosting is provided by WP
Stack Online: each customer controls their infrastructure, plugins, data, and
capacity.

## Features

- Network Admin product registry for installed plugins
- Per-product initial, extension, and maximum session timing
- Per-product landing pages, colors, dependencies, and availability
- Public plugin-demo catalogue generated from customer configuration
- Private, isolated Multisite sandbox per visitor
- Automatic temporary user creation and one-time login
- Live second-by-second session countdown
- Six-minute extensions capped at 50 minutes total
- Immediate expiry and clean reset controls
- Automatic temporary-site and user cleanup
- Per-visitor launch limits and global capacity protection
- Demo-safe restrictions for uploads, email, external requests, and privileges
- Network Admin session overview

## Operational defaults

- Six-minute initial lifetime
- Six-minute extensions, capped at 50 minutes total
- Live countdown and immediate expiry controls
- One active sandbox per hashed visitor address
- Five launch attempts per visitor per hour
- Only the selected product and its configured dependencies are activated
- Outgoing email and external HTTP requests blocked on demo subsites
- Temporary sites and users permanently deleted after expiry

## Deployment

Install as a network plugin and network-activate it. The activation routine
creates the network session table and the public demo landing page.

For reliable cleanup, invoke the cleanup hook from a server cron:

```sh
wp cron event run wpstack_demo_cleanup --path=/path/to/demo
```

Do not expose registration on the Multisite network. Only the manager should
create sites and users.

## Product configuration

Open **Network Admin → WPStack Sandbox Manager**. Add an installed plugin,
choose its wp-admin landing page, and configure:

- Initial session duration
- Extension duration
- Maximum total lifetime
- Whether extensions are allowed
- Required plugin dependencies
- Public description and accent color

Timing rules are copied into each session when it starts. Editing a product
does not silently alter active sessions.

## Editions

### Community

- One configured demo product
- Private sandboxes, login, reset, expiry, and cleanup
- Configurable timing
- WP Stack Online branding

### Pro

- Unlimited configured demo products
- Per-product policies and dependencies
- Custom brand name, URL, and lab label
- Commercial license and automatic updates through Freemius

One Multisite network is one activation. Temporary subsites never consume
license activations.

## Pricing

- Pro, 1 network: **$6/month** or **$60/year**
- Pro, 3 networks: **$12/month** or **$120/year**
- Pro, 10 networks: **$18/month** or **$180/year**

These are license quantities for the same Pro plan, not separate plugin
editions.

## Freemius handoff

The plugin integrates Freemius product `35851` using the public SDK key and
network-level Multisite licensing. The Community build physically excludes
`src/Premium/`; the Pro entitlement is enabled only when Freemius reports a
feature-enabled Pro license for the network.

Never place a Freemius secret key in distributed plugin code. The Community
edition remains operational without a licensing connection; cleanup and
security controls are never disabled when a paid license expires.

## Screenshots

### 1. Public plugin demo laboratory

![WPStack Sandbox Manager public demo board](assets/screenshot-1.png)

### 2. Active sandbox controls

![Live countdown, extension, and expiry controls](assets/screenshot-2.png)

### 3. Responsive mobile experience

![WPStack Sandbox Manager on mobile](assets/screenshot-3.png)

## Credits

Built by **WP Stack Online**.  
Created and maintained by **Aditya Bhimrajka**.
