Sandbox concepts
Markdown

Sandboxes

A product sandbox is an isolated environment that keeps a product and the context needed to work on it together.

In PHPSandbox today, a product sandbox is built around a runnable project. It brings the project's files, PHP and other language runtimes, dependencies, configuration, services, processes, and previews into one environment. As PHPSandbox grows, the same sandbox can also hold more of the material and integrations used to demonstrate, share, and improve the product.

What is available today

A sandbox can provide:

  • A filesystem for project and configuration files
  • PHP and other language runtimes for running commands and the project
  • Composer and Git tools
  • Configured processes and supporting services
  • Logs, ports, metrics, and captured mail
  • Live previews for viewing and sharing the running product

Available tools can vary with the selected template, account capabilities, and the current sandbox state.

How a sandbox runs

Each sandbox has a runtime that provides the compute used to run its commands, processes, and services.

A sandbox can be stopped and restarted without being deleted. See Lifecycle for the states a sandbox moves through and how they affect the Workspace and SDK.

Choose a starting point

A template gives a new sandbox the files, runtime, and setup expected by a framework such as Laravel. Forking copies an existing sandbox so work can continue independently. Importing brings an existing project into a new sandbox from a repository or ZIP archive.

Project setup can install dependencies, configure environment values, run preparation commands, start processes, and expose preview ports. See Project setup when a project needs repeatable preparation.

Workspace and SDK together

The Workspace and SDK are two interfaces to the same product sandbox. They do not create different kinds of sandboxes.

A sandbox created through the SDK can be opened in the Workspace. Changes made through either interface affect the same files, configuration, and runtime, so automated work can be inspected or continued interactively.

  • Lifecycle to understand preparation, ready, stopped, and deleted states.
  • Previews and sharing to understand how a running product becomes available through a live URL.
  • Project setup to make a project's environment repeatable.

Loading templates

You can also reach out on Twitter or Discord if you need help.