Web-based model & policy editor for Casbin

Clone this repo:
  1. db14744 feat: hide editor title bar when embedded in iframe (#368) by Yang Luo · 3 months ago master v1.99.0
  2. 84747bd feat: add preview panel to model gallery (#366) by Jiayi Tu · 3 months ago v1.98.0
  3. 6f98360 feat: improve role graph layout for policy updates (#364) by Jiayi Tu · 3 months ago v1.97.0
  4. 593a92c fix: replace whole-card click with dedicated "Load in Editor" button in Model Gallery (#362) by Jiayi Tu · 3 months ago v1.96.4
  5. 33dd41f fix: add search bar to Model Gallery for keyword filtering (#360) by Jiayi Tu · 3 months ago

Casbin-editor

semantic-release Build Release GitHub issues GitHub forks Sourcegraph License Discord

Casbin-editor is a web-based Casbin model and policy editor. It's based on Next.js + TypeScript.

Use the Casbin-editor to write your Casbin model and policy in your web browser. It provides functionality such as syntax highlighting and code completion, just like an IDE for a programming language.

Try it at either:

  1. Casbin official website: https://casbin.org/editor
  2. Our standalone GitHub pages: https://editor.casbin.org

How it works?

Casbin-editor is a pure frontend Javascript project. It uses node-casbin to perform policy enforcement. It's notable that node-casbin can be used either in frontend Javascript or Node.js.

This project can be viewed as an example for using node-casbin in the browser.

For Dev

yarn install
yarn dev

Open browser: http://localhost:3000/

Production Preview

yarn build

# Make sure port 3000 is not in use
yarn start

Open browser: http://localhost:3000/

For Electron

This project supports being built as an Electron app:

yarn install
yarn dist