Giter Site home page Giter Site logo

jalinwang / casbin-dashboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from casbin/casbin-hub

0.0 0.0 0.0 410 KB

The web dashboard for Casbin

Home Page: https://dashboard.casbin.com

License: Apache License 2.0

JavaScript 70.22% Go 27.38% CSS 1.00% HTML 1.40%

casbin-dashboard's Introduction

casbin-dashboard

Casbin-dashboard is the official web UI (admin portal) for Casbin models and policies. A security administrator can use it to view & edit Casbin models and policy rules.

Demo

https://dashboard.casbin.com

Architecture

Casbin-dashboard contains 2 parts:

Name Description Language Source code
Frontend Web frontend UI for Casbin-dashboard Javascript + React + Ant Design https://github.com/casbin/casbin-dashboard/tree/master/web
Backend RESTful API backend for Casbin-dashboard Golang + Beego + MySQL https://github.com/casbin/casbin-dashboard

Installation

  • Get the code:
go get github.com/casbin/casbin-dashboard
  • Setup database:

Casbin-dashboard will store its metadata in a MySQL database named: casbin_metadata, will create it if not existed. The DB connection string can be specified at: https://github.com/casbin/casbin-dashboard/blob/master/conf/app.conf

  • Setup casbin-dashboard to enable some third-party login platform

Casbin-forum provide a way to sign up using Github account, so you may have to get your own GithubAuthClientID, GithubAuthClientSecret first.

You could get them by clicking on this url: https://github.com/settings/developers , You should set Homepage URL to fit your own domain address, for local testing, sethttp://localhost:3000. And set the Authorization callback URL, the same domain address as Homepage URL, for local testing, sethttp://localhost:3000.

  • Modified config files:

Change your own GithubAuthClientID, GithubAuthClientSecret in conf/app.conf, web/src/conf.js.

dataSourceName = root:123@tcp(localhost:3306)/

Casbin-dashboard uses XORM to connect to DB, so all DBs supported by XORM can also be used.

  • Run backend (in port 8800):
go run main.go
  • Run frontend (in the same machine's port 3030):
cd web
npm install
npm start
  • Open browser:

http://localhost:3030/

casbin-dashboard's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.