Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/authzed/playground
Playground for SpiceDB, the open source, Google Zanzibar-inspired permissions database to enable fine-grained access control for customer applications
https://github.com/authzed/playground
docker fine-grained-access-control permissions playground react spicedb vercel zanzibar
Last synced: 2 months ago
JSON representation
Playground for SpiceDB, the open source, Google Zanzibar-inspired permissions database to enable fine-grained access control for customer applications
- Host: GitHub
- URL: https://github.com/authzed/playground
- Owner: authzed
- License: apache-2.0
- Created: 2024-01-23T16:49:41.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T16:36:30.000Z (3 months ago)
- Last Synced: 2024-10-23T23:12:24.824Z (3 months ago)
- Topics: docker, fine-grained-access-control, permissions, playground, react, spicedb, vercel, zanzibar
- Language: TypeScript
- Homepage: https://play.authzed.com
- Size: 583 KB
- Stars: 35
- Watchers: 5
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE-OF-CONDUCT.md
Awesome Lists containing this project
README
# 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](https://github.com/authzed/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]
[SpiceDB]: https://authzed.com/spicedb
## Getting Started
## Deploying
### Docker
Run the latest Docker container
```command
docker run -it -p 3000:3000 ghcr.io/authzed/spicedb-playground:latest
```Connect to the running container.
```command
http://:3000
```### Vercel
Deploy an instance hosted on Vercel
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fauthzed%2Fplayground&project-name=spicedb-playground&repository-name=spicedb-playground)
or using the Vercel CLI
```command
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:
```command
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
1. Copy the files in the `wasm` root directory into `playground/public/static`
2. Run `yarn start` from the `playground` 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.
[wasm-config.json]: https://github.com/authzed/playground/blob/main/spicedb-common/wasm-config.json
[jq]: https://jqlang.github.io/jq/## Developing your own schema
You can try both [SpiceDB](https://github.com/authzed/spicedb) and [zed](https://github.com/authzed/zed) entirely in your browser on a SpiceDB Playground deployment thanks to the power of [WebAssembly](https://authzed.com/blog/some-assembly-required).
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:
[developing a schema]: https://authzed.com/docs/spicedb/modeling/developing-a-schema
[design documentation]: https://authzed.com/docs/spicedb/concepts/schema## 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.
[CONTRIBUTING.md]: CONTRIBUTING.md
[Urgent]: https://github.com/authzed/playground/labels/priority%2F0%20urgent
[High]: https://github.com/authzed/playground/labels/priority%2F1%20high
[Medium]: https://github.com/authzed/playground/labels/priority%2F2%20medium
[Low]: https://github.com/authzed/playground/labels/priority%2F3%20low
[Maybe]: https://github.com/authzed/playground/labels/priority%2F4%20maybe
[good first issues]: https://github.com/authzed/playground/labels/hint%2Fgood%20first%20issue
[documentation website]: https://github.com/authzed/docs## 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](https://authzed.com/discord) to ask questions and meet other users.[feel welcomed]: CODE-OF-CONDUCT.md