Awesome
<a href="https://authzed.com#gh-dark-mode-only" target="_blank"> <img width="300" src="https://github.com/authzed/spicedb/assets/343539/82234426-468b-4297-8b5c-f06a44fe2278" alt="spicedb logo"> </a> <a href="https://authzed.com#gh-light-mode-only" target="_blank"> <img width="300" src="https://github.com/authzed/spicedb/assets/343539/312ff046-7076-4c30-afd4-2e3d86c06f51" alt="spicedb Logo"> </a>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.
SpiceDB Playground features include:
- Rich text editor with syntax highlighting and tooltips
- Visual relationship editor with support for defining caveat context data
- Developer system that detects and presents schema and data errors
- Real-time check requests against a full SpiceDB instance running client side via WASM
- Fully functional zed CLI instance running client side via WASM
- Schema and relationship graph visualization
- Import and export schema and workspace data as a YAML file
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.
Learn more about SpiceDB
Getting Started
Deploying
Docker
Run the latest Docker container
docker run -it -p 3000:3000 ghcr.io/authzed/spicedb-playground:latest
Connect to the running container.
http://<container>:3000
Vercel
Deploy an instance hosted on Vercel
or using the Vercel CLI
NODE_OPTIONS=--openssl-legacy-provider vercel build
vercel deploy --prebuilt
ℹ️ Git Large File Storage (LFS) must be enabled in your Vercel project settings.
NodeJS
The build
directory in the project root directory after running yarn build
will contain an optimized production React application that can be served using your preferred NodeJS hosting method.
ℹ️ Node v18.x is required.
For example:
NODE_OPTIONS=--openssl-legacy-provider yarn global install serve
cd build
serve
Installing dependencies
Setup git submodules: git submodule update --init --recursive
Run yarn install
in the root project directory.
Running for development
- Copy the files in the
wasm
root directory intoplayground/public/static
- Run
yarn start
from theplayground
subdirectory
Updating wasm dependencies
The project contains prebuilt WASM files for versions of both SpiceDB and zed. To update the versions, edit the wasm-config.json file with the desired tag/commit hash and then run from the project root:
yarn run update:spicedb
yarn run update:zed
ℹ️ jq is required and must be installed.
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:
<a href="https://www.youtube.com/watch?v=AoK0LrkGFDY" target="_blank"><img width="600" alt="SpiceDB Primer YouTube Thumbnail" src="https://github.com/authzed/spicedb/assets/343539/7784dfa2-b330-4c5e-b32a-090759e48392"></a>
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.