GithubHelp home page GithubHelp logo

hackycy / sf-egg-admin Goto Github PK

View Code? Open in Web Editor NEW
94.0 5.0 25.0 4.07 MB

🚀 基于EggJs + TypeScript + TypeORM + Redis + MySql + Vue + Element-UI编写的一款简单高效的前后端分离的权限管理系统

Home Page: http://opensource.admin.si-yee.com

License: MIT License

JavaScript 0.25% TypeScript 80.93% PLpgSQL 18.24% Shell 0.58%
typescript egg typeorm redis bull eggjs-typescript typeorm-mysql sf-egg-admin

sf-egg-admin's Introduction

sf-egg-admin

基于EggJs + TypeScript + TypeORM + Redis + MySql + Vue + Element-UI编写的一款简单高效的前后端分离的权限管理系统。希望这个项目在全栈的路上能够帮助到你。

egg版已不作维护,请转移至midway或者nest版本

前端项目地址:传送门

midway版:传送门

nest版:传送门

演示地址

演示环境账号密码:

账号 密码 权限
openadmin 123456 仅只有各个功能的查询权限
monitoradmin 123456 系统监控页面及按钮权限

本地部署账号密码:

账号 密码 权限
rootadmin 123456 超级管理员

系统模块

├─系统管理
│  ├─用户管理
│  ├─角色管理
│  ├─菜单管理
├─系统监控
│  ├─在线用户
│  ├─登录日志
│  ├─请求追踪
├─任务调度
│  ├─定时任务
│  └─任务日志

系统特点

  • 前后端请求参数校验

  • JWT 认证

  • 基于 EggJS 框架,内置了基础的中间件支持(用户认证、访问日志、请求追踪等)

  • 用户权限动态刷新

  • 代码简单,结构清晰

技术选型

后端

  • EggJS + TypeScript
  • TypeORM(MYSQL)
  • ioredis(Redis)
  • bull(队列)

前端

  • Vue全家桶
  • Element-UI

本地开发

初始化数据库,以及服务启动

新建并导入数据库MySql>=5.7.

数据库脚本位于 db/init.sql

修改数据库配置信息,在config目录下更改对应模式下的配置

基于apidoc自动生成的API文档,在Controller下写好注释后,运行命令npm run apidoc即可自动更新生成API文档。

参考对应配置请参考:config.local.ts

项目启动

$ npm i
$ npm run dev

请不要在开发模式下运行npm run tsc,如果不小心运行了你需要在npm run dev前运行npm run clean

系统截图

项目部署

执行

$ npm run tsc
$ npm start

反向代理配置示例

server
{
    # ... 省略
		
	# 请添加以下配置
    location / {
      try_files $uri $uri/ /index.html;
    }

    location /api/
    {
        proxy_pass http://127.0.0.1:7001/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header REMOTE-HOST $remote_addr;

        #缓存相关配置
        #proxy_cache cache_one;
        #proxy_cache_key $host$request_uri$is_args$args;
        #proxy_cache_valid 200 304 301 302 1h;

        #持久化连接相关配置
        proxy_connect_timeout 3000s;
        proxy_read_timeout 86400s;
        proxy_send_timeout 3000s;
        #proxy_http_version 1.1;
        #proxy_set_header Upgrade $http_upgrade;
        #proxy_set_header Connection "upgrade";

        add_header X-Cache $upstream_cache_status;

        #expires 12h;
    }
    
    # ... 省略
}

环境要求

  • Node.js 8.x
  • Typescript 2.8+
  • MYSQL 5.7+
  • Redis 6.0+

依赖的第三方库

欢迎Star && PR

如果项目有帮助到你可以点个Star支持下。有更好的实现欢迎PR。

致谢

sf-egg-admin's People

Contributors

hackycy 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

Watchers

 avatar  avatar  avatar  avatar  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.