GitHub - authzed/playground: Playground for SpiceDB, the open source, Google Zanzibar-inspired permissions database to enable fine-grained access control for customer applications (original) (raw)

spicedb logo spicedb Logo

Playground

The SpiceDB Playground is an interactive app for building a SpiceDB schema, interacting with test relationships, and quickly iterating with test assertions.

Whether you're just getting started learning SpiceDB concepts or need to develop a new permissions system schema for your application, the SpiceDB playground has functionality to help.

screenshot

Features include:

What is SpiceDB?

SpiceDB is a graph database purpose-built for storing and evaluating access control data.

As of 2021, broken access control became the #1 threat to the web. With SpiceDB, developers finally have the solution to stopping this threat the same way as the hyperscalers.

Getting Started

Run locally

yarn add global serve && yarn build && cd build && serve

Deploying

Docker

Run the latest Docker container

docker run -it -p 3000:3000 ghcr.io/authzed/spicedb-playground:latest

Connect to the running container.

Vercel

Deploy an instance hosted on Vercel

Deploy with Vercel

or using the Vercel CLI

vercel build vercel deploy --prebuilt

ℹ️ Git Large File Storage (LFS) must be enabled in your Vercel project settings.

Enabling sharing functionality

To enable the sharing functionality on Vercel, you need to configure the following environment variables in your Vercel project settings:

Required for sharing:

Optional:

You can set these environment variables in the Vercel dashboard under your project's Settings > Environment Variables.

Running for development with sharing enabled

The vercel CLI can be used to run locally with sharing enabled:

VITE_SHARE_API_ENDPOINT=http://localhost:3000 SHARE_SALT=... AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... S3_ENDPOINT=... S3_BUCKET=...  vercel dev

Developing your own schema

You can try both SpiceDB and zed entirely in your browser on a SpiceDB Playground deployment thanks to the power of WebAssembly.

If you don't want to start with the examples loadable from a Playground, you can follow a guide for developing a schema or review the the schema language design documentation.

Watch the SpiceDB primer video to get started with schema development:

SpiceDB Primer YouTube Thumbnail

Contribute

CONTRIBUTING.md documents communication, contribution flow, legal requirements, and common tasks when contributing to the project.

You can find issues by priority: Urgent, High, Medium, Low, Maybe. There are also good first issues.

Our documentation website is also open source if you'd like to clarify anything you find confusing.

Joining the SpiceDB Community

SpiceDB is a community project where everyone is invited to participate and feel welcomed. While the project has a technical goal, participation is not restricted to those with code contributions. Join our Community Discord to ask questions and meet other users.