On this page

Playground

The Playground is a workspace in your browser. It has a file explorer, an editor, a terminal, diffs and a preview. Each Playground workspace has its own Dryv Engine. Only you and the members of your organization can reach it, through the Platform.

The Playground needs a Dryv account. To work on your own machine instead, use the CLI or VS Code, which need no account.

When to use it

  • You want to try Dryv without installing anything.
  • You want to share a running preview with your team.
  • You want to work on a project from any computer.

Create a project

  1. Sign in at app.dryvcode.com and open Playground.
  2. Start a new project, or open /playground/new.
  3. Choose the organization the project belongs to. You need permission to create projects there. See Organizations.
  4. Name the project.
  5. Choose a starter:
    • Contract authoring language: TypeScript or Python.
    • Project type: for example Next.js + API contracts or OpenAPI + JSON Schema.
    • Data storage: no database (data resets when the app restarts), a PostgreSQL starter, or an existing PostgreSQL database.
  6. Preview the starter files, then choose Create and generate.

Instead of a starter you can connect a GitHub repository. See GitHub.

Work in the workbench

Open a project from Playground to get the workbench.

  • Explorer and editor. Edit any file. Search files by name with the palette; type > for commands.
  • Snapshots. Save your files as a snapshot. Runs use saved snapshots. You can restore an earlier snapshot; existing snapshots are kept.
  • Operations. Run Dryv on a snapshot:
    • Validate: check contracts and configuration.
    • Plan: show what generation would change.
    • Generate: write generated files to the run's output.
  • Runs. See each run's output. Copy a run's output into the workspace, or stop a run.
  • Console. Commands run on your Playground's Engine.
  • Activity. See what happened in the project.

Run your app

  1. Open Application and choose Start workspace.
  2. Install dependencies, then check and run your app from the terminal.
  3. When the app is ready, its private preview opens.

Stopping the workspace interrupts running commands. Your files and the project database are kept.

Database

A project can use:

  • a private PostgreSQL database for the workspace, with no public port. Its data survives workspace stop and start;
  • your own PostgreSQL database. Enter its connection string and, if needed, a custom certificate authority. Dryv can test the connection with a read-only query.

SQL files under database/ are applied only after you review them.

Share a preview

A preview starts private: only members of the organization can open it, and its address works for one hour. Reopen the preview for a fresh address.

To share it, choose Share preview, then:

  • Create unlisted link: anyone with the link can open it;
  • Publish publicly: it is published for anyone to open.

You can also open the generated site of a run, after confirming who will be able to see it.

Download your work

  • Download the open snapshot as ZIP.
  • Download the selected run's output as ZIP.

GitHub

The Playground connects to GitHub through the Dryv GitHub App.

  1. Open Source control and choose Connect a Git repository.
  2. Connect your GitHub account and choose which repositories the app can access.
  3. Pick a repository. Connecting keeps the files already in the project.
  4. Create or choose a branch, review the changed files, then commit and push.

Changes are reviewed before every commit. Deletions and replacements need your confirmation.

Troubleshooting

"Sign in to use the Playground." The Playground needs an account. Sign in, or use the CLI locally.

"Choose an organization where you have permission to create projects." Your role in that organization cannot create projects. Ask an owner or admin.

"Save files as a snapshot to run them." Runs use saved snapshots. Save first.

"Runtime connection lost." The worker is busy or restarting. Wait, then retry.

Search in