Code Monkey home page Code Monkey logo

edas's Introduction

EDAS

Api在线文档

介绍

企业级分布式应用服务EDAS(Enterprise Distributed Application Service) 期望做一个基于go-micro + casbin + jwt 的用户认证和权限的微服务 参考

软件架构

软件架构说明

模块划分
服务划分
数据库图

技术实现

  1. 技术方案 参考MTBSystem
    • 服务端 go-micro
    • 数据库 mysql
    • 缓存 redis
    • 前端 react
    • 服务器 centos7 & nginx
    • 本地环境 go 1.13.4
    • 容器 Docker
    • 进程管理 supervisor
    • 数据库备份 冷备份(rsync+mysqldump)
  2. 特性
    • 遵循 RESTful API 设计规范
    • 基于原生 http net 可以方便修改为各种框架和定制服务
    • 基于 Casbin 的 RBAC 访问控制模型
    • 基于 SQL 语句的数据库访问
    • 依赖注入(基于dig)
    • 日志追踪(基于zap)
    • JWT 认证
    • 支持Swagger文档(基于swaggo)
    • 单元测试(基于net/http/httptest包,覆盖所有接口层的测试)
  3. xxxx

使用说明

  1. 使用的开源第三方库

如下:

go get github.com/jmoiron/sqlx
go get go.uber.org/zap
go get go.uber.org/dig
go get github.com/garyburd/redigo/redis
go get github.com/go-sql-driver/mysql
go get github.com/json-iterator/go
go get github.com/stretchr/testify
go get github.com/swaggo/swag
go get google.golang.org/grpc
go get github.com/micro/go-micro
go get github.com/micro/go-plugins
go get github.com/golang/protobuf/proto
go get github.com/golang/protoc-gen-go
go get github.com/micro/protoc-gen-micro
go get github.com/google/uuid
go get github.com/julienschmidt/httprouter
go get github.com/juju/ratelimit
go get github.com/casbin/casbin
go get github.com/casbin/casbin-server
  1. 项目结构概览
├─.gitee
├─service  服务划分
│  ├─apigw 网关
│  │  ├─handler     
│  │  ├─middleware
│  │  │  └─casbin
│  │  └─route
│  ├─permission 权限微服务
│  │  ├─db
│  │  ├─handler
│  │  └─proto
│  └─user       用户微服务
│      ├─db
│      ├─handler
│      └─proto
├─share
│  ├─config  项目配置
│  ├─errors  错误说明
│  ├─log     zap日志配置
│  └─util    工具集合
└─sql 数据库字段

进度说明

  • [*] 账号系统,注册/登录/查询用户数据
  • JWT认证 未完成
  • [*] 菜单/角色/用户的增删改查操作
  • 菜单动作/菜单资源/角色与菜单的绑定/用户与角色绑定 未完成
  • casbin 的 RBAC 访问控制 未完成

感谢以下的开源支持

共同学习

该项目是源于自己的项目积累及个人思考,因为个人能力有限,希望有小伙伴可以一起参与共同学习进步

  1. Fork 本仓库
  2. 新建分支
  3. 提交代码
  4. 新建 Pull Request

期待与您一起学习进步,下面是我的微信二维码:

微信二维码

edas's People

Contributors

yak-tech avatar quincy515 avatar

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.