Apache Casbin Editor

Clone this repo:
  1. f8567c4 fix: fix asf-site publishing error by Yang Luo · 12 days ago master
  2. dd3ec6c fix: publish site to casbin-editor.apache.org by Yang Luo · 12 days ago
  3. d5f8930 fix: ignore stale door.casdoor.com endpoint saved in localStorage by Yang Luo · 12 days ago
  4. 62c9974 fix: release only from tags instead of auto-releasing on push by Yang Luo · 12 days ago
  5. 2526189 feat: use casbin-editor-backend for remote enforcement by Yang Luo · 12 days ago feat-use-editor-backend

Casbin-editor

semantic-release Build and Deploy 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. Apache Casbin Editor: https://editor.casbin.org/
  2. Apache Casbin website: https://casbin.apache.org/editor

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

If the packaged app cannot load the local out/ bundle, it falls back to loading https://editor.casbin.org/ in the window.