Giter VIP home page Giter VIP logo

hzwy23 / hauth Goto Github PK

View Code? Open in Web Editor NEW
446.0 46.0 181.0 34.28 MB

hauth项目,不是一个前端or后台框架! 而是一个集成权限管理,菜单资源管理,域管理,角色管理,用户管理,组织架构管理,操作日志管理等等的快速开发平台. hauth是一个基础产品,在这个基础产品上,根据业务需求,快速的开发应用服务.账号:admin,密码:123456

Home Page: http://www.wisrc.com

License: MIT License

Shell 0.01% Go 99.92% Python 0.07%

hauth's Introduction

Asofdate Hauth Project Release

golang版本建议:

go sdk >= 1.8

Java版本地址 hauth-java

获取项目源代码方法. 请确保设置了GOPATH环境变量

go get github.com/hzwy23/hauth
#上边命令,将会在GOPATH/bin目录中生成hauth可执行文件,由于系统运行需要配置文件和静态页面
#所系请将GOPATH/bin的hauth可执行文件,复制到$GOPATH/src/github.com/hzwy23/hauth目录中
#或者使用项目中提供的build.sh脚本编译,再次生成可执行文件.
#请按照下边的操作,导入数据库.

asofdate hauth项目简介

每一个项目,都有截止日期,为了实现快速开发目标,我们以beego为基础,开发出了一款快速开发平台。这个平台内部集成了菜单管理、用户管理、角色管理、授权管理、日志管理、机构管理、路由管理、域定义管理等等。在这个平台的基础上,可以快速的开发自己的应用,以响应瞬息万变的市场需求。

项目目标

打造一款安全,稳定,易拓展的快速开发平台.在这个平台的基础上,能够迅速的开发出市场上需要的应用产品,省去系统基础服务开发测试工作量。

特点介绍

  1. 去session化,采用jwt标准管理用户连接信息,易于分布式环境部署.
  2. 菜单页面采用metro风格,简洁明了.
  3. 权限控制到按钮级别,有效的对系统API服务进行控制.
  4. 快速添加应用程序,只需要在菜单资源管理页面中注册新应用的菜单、路由信息,便可便捷的扩展新应用.
  5. 用户操作记录十分精细,有效的记录用户每一个API请求.
  6. 后台服务代码,提供国际化服务,轻松实现国际化
  7. 系统帮助,提供swagger ui界面,方便管理系统API.

系统简介

系统管理是整个产品的核心功能部分,系统中菜单资源是整个系统的公有资源,其余的资源,都是建立在各自的域中。

每个域中特有的信息是:机构、用户、角色,所以,在这个开发平台中,可以轻松的构建出一个适用于不同群体的应用产品,不同的群体信息相互隔离,同一个群体内信息共享。在应用系统中,当新增一个用户群体时,只需要新建一个域,便可实现这个功能。

安装方法

1. 导入数据库信息

创建数据库用户,导入数据文件,目前支持mysql,mariadb。oracle版本属于商业版,暂时不开源,有需求可以联系。

导入数据文件方法,请修改下边“数据库名”为你的数据库中存在的数据库名

mysql -uroot -p 数据库名 < ./init_hauth.sql

提示:init_hauth.sql在src/github.com/hzwy23/hauth/db目录中

2. 编译hauth代码,生成可执行文件

A. 直接以安装包的方式编译

执行下边命令,在执行命令前,请确保您已经安装了go sdk

## cd切换到hauth的解压目录,然后执行下边命令
./build.sh
## 上边这种模式编译会生成一个可执行文件hauth,

这个命令将会在hauth的解压目录下生成hauth可执行文件。

B. 采用build编译main.go文件方式

main.go文件在hauth解压的根目录中,编译方法如下:

# cd 到hauth解压后的根目录
go get github.com/hzwy23/hauth
go build -i main.go

使用liteide的童鞋,采用第二种方式比较好调试,只需要设置GOPATH环境变量后,就可以直接打开main.go,然后点击BuildAndRun按钮,既可以启动服务。

3 修改配置文件

配置文件在conf目录中,app.conf是beego的配置文件,主要涉及到服务端口号等等,另外一个是app.conf配置文件,这个里边主要是是=数据库连接信息与日志管理信息配置。

beeog的配置方法,请在beego项目中查阅,请移步:beego.me。下边来讲讲app.conf中数据库的配置方法。

DB.type=mysql
DB.tns = "tcp(localhost:3306)/test"
DB.user = root
DB.passwd="xzPEh+SfFL3aimN0zGNB9w=="

注意: 修改的文件必须保存为utf-8编码,否则可能会出现异常,DB.type=mysql,这个值请不要修改,因为当前项目中提供的数据库脚本是针对于mysql和mariadb的。

  1. 修改DB.tns中对应的数据库地址,端口号,数据库名称。

  2. 修改DB.user成相应的数据库用户名

  3. 修改DB.passwd成上边用户所对应的密码,系统启动后会自动加密,在此输入密码明文即可。

启动方法

## linux上,请执行。此外需要注意的是:linux上开启1024以下端口号需要管理员权限。
nohup ./hauth &

## Mac上,
sudo ./hauth

## windows上,
## 请直接双击hauth.exe可执行文件

打开浏览器,访问:https://localhost:8090

管理员用户: admin, 密码: hzwy23

系统管理界面

交流方式

E-mail: [email protected]

demo演示地址:https://139.9.34.174:8090

演示demo属于是hauth项目的演化版本:github.com/hzwy23/appsugar

用户名: demo

密 码: 123456

代码贡献列表

github账号
cp542524698
xingyuejun
hzwy23

hauth's People

Contributors

hzwy23 avatar sotex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hauth's Issues

界面太另类了

这界面太另类了,即使熟悉后很方便(假如),是否考虑提供传统风格?上面菜单或工具栏或左边的导航

自定义样式

如果要新增加一种自定义样式,请问要怎么弄呢?

对golang版本问题有要求

至少1.7版本吧,看这里https://golang.org/doc/go1.7关于runtime包中的CallersFrames
1.6版本:
github.com/hzwy23/asofdate/vendor/go.uber.org/zap/stacktrace.go:63: undefined: runtime.CallersFrames

1.8版本:
[root@web asofdate]# ./asofdate
create mysql dbhandle success.
./asofdate flag redefined: graceful
panic: ./asofdate flag redefined: graceful

goroutine 1 [running]:
flag.(*FlagSet).Var(0xc42001c240, 0xe2f6c0, 0xe8d484, 0xb22fc0, 0x8, 0xb3913a, 0x21)
/root/go/src/flag/flag.go:793 +0x420
flag.BoolVar(0xe8d484, 0xb22fc0, 0x8, 0x887400, 0xb3913a, 0x21)
/root/go/src/flag/flag.go:572 +0x72
github.com/hzwy23/asofdate/vendor/github.com/astaxie/beego/grace.init.1()
/root/goproject/src/github.com/hzwy23/asofdate/vendor/github.com/astaxie/beego/grace/grace.go:93 +0x60
github.com/hzwy23/asofdate/vendor/github.com/astaxie/beego/grace.init()
/root/goproject/src/github.com/hzwy23/asofdate/vendor/github.com/astaxie/beego/grace/server.go:307 +0x89
github.com/hzwy23/asofdate/vendor/github.com/astaxie/beego.init()
/root/goproject/src/github.com/hzwy23/asofdate/vendor/github.com/astaxie/beego/tree.go:581 +0x87
github.com/hzwy23/asofdate/hauth/service.init()
/root/goproject/src/github.com/hzwy23/asofdate/hauth/service/sql_define.go:4 +0x7d
main.init()
/root/goproject/src/asofdate/main.go:16 +0x4e
[root@web asofdate]# vim /root/goproject/src/github.com/hzwy23/asofdate/vendor/github.com/astaxie/beego/grace/grace.go
[root@web asofdate]# go version
go version go1.8.1 linux/amd64

本機上執行發生錯誤

您好,在本機上執行發生錯誤訊息
編譯都通過,錯誤訊息如下
2017/11/09 10:23:10 [I] [asm_amd64.s:2197] https server Running on https://:8090
2017/11/09 10:23:26 [server.go:2751] [HTTP] http: TLS handshake error from xx.xx.xxx.xx:50009: tls: first record does not look like a TLS handshake
2017/11/09 10:23:26 [server.go:2751] [HTTP] http: TLS handshake error from xx.xx.xxx.xx:50010: tls: first record does not look like a TLS handshake
2017/11/09 10:23:31 [server.go:2751] [HTTP] http: TLS handshake error from xx.xx.xxx.xx:50017: tls: first record does not look like a TLS handshake

能不能讲解下域和组织的设计理念

一般账户+角色+权限已经够用,组织对账户分组也能理解,上下级分组是不是也能达到域的作用,所以这个项目中域的作用不是很明白,能不能讲解下域和组织的设计理念,以及在这个项目中的作用?

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.