Git Product home page Git Product logo

gin-admin's Introduction

id title sidebar_label
README
English Document
English Document

English | 简体中文

Project Document

1. Basic Introduction

1.1 Project Introduction

Online Demo

username:guest

password:123456

Hi! Thank you for choosing gin-admin.gin-admin is a full-stack (frontend and backend separation) framework designed for management system. It integrates multiple functions, such as JWT authentication, dynamic routing, dynamic menu, casbin authentication, etc. So that you can focus more time on your business Requirements.

2. Getting started

- node version > v8.6.0
- golang version >= v1.14
- IDE recommendation: Goland
  • clone the project
git clone https://github.com/coderchiang/gin-admin
  • enter the project directory
cd gin-admin
  • add permission and exec
# add permission
sudo chmod a+x up.sh
# exec
./up.sh

up.sh Contains running scripts for all configurations of the project startup process ,the specific logic can be annotated according to your needs; you can also enter the web and server separately to build and configure the startup project. The specific operations are as follows:

2.1 Web

# enter the project directory
cd web

# install dependency
yarn install

# develop
yarn run serve

# build
yarn run build

2.2 Server

# enter the project directory
cd server
# using go.mod
go env -w GO111MODULE=on 
#In mainland China, access to go.org/x is prohibited,we recommend [goproxy.io](https://goproxy.io/zh/)
go env -w GOPROXY=https://goproxy.io,direct
# install go modules
go mod tidy

# build the server
go build

2.3 Initial Configuration Guide

2.4 API docs generation

cd server
swag init

After executing the above command,docs will show in server/,then open your browser, jump into http://localhost/swagger/index.html to see the swagger APIs.

3. Technical selection

  • Frontend: using Vben based on vue,to code the page.
  • Backend: using Gin to quickly build basic RESTful API. Gin is a web framework written in Go (Golang).
  • DB: MySql(5.7),using gorm to implement data manipulation, added support for SQLite databases.
  • Cache: using Redis to implement the recording of the JWT token of the currently active user and implement the multi-login restriction.
  • API: using Swagger to auto generate APIs docs。
  • Config: using fsnotify and viper to implement yaml config file。
  • Log: using zap record logs。

4. Project Architecture

4.1 Architecture Diagram

4.2 Project Layout

├── server           (server ,gin)
│   ├── app          (appliacation,backend api)
│   ├── common       (Public const,var,util function)
│   ├── conf         (configuration)
│   ├── dao          (Data Access Object )
│   ├── data         (global data )
│   ├── docs         (swagger generate document)
│   ├── dto          (Data Transfer Object  )
│   ├── initialize   (initialize system)
│   ├── log          (log file)
│   ├── middleware   (middleware directory)
│   ├── resource     (casbin resource)
│   ├── routers      (router conf directory)
│   └── service      (service directory)
└── web              (fontend,vue-vben-admin)
    ├── build        (vite)
    ├── dist         (dist)
    ├── mock         (mock data)
    ├── public       (public file)
    ├── src          
    ├── test
    └── types


5. Features

  • Authority management: Authority management based on jwt and casbin.
  • Department Management: Configure the positions of system users.
  • User management: The system administrator assigns user roles and role permissions.
  • Role management: Create the main object of permission control, and then assign different API permissions and menu permissions to the role.
  • Menu management: User dynamic menu configuration implementation, assigning different menus to different roles.
  • API management: Different users can call different API permissions.
  • Configuration management: The configuration file can be modified in the web page (the test environment does not provide this function).

6. How to contribute

You are very welcome to join!Raise an issue Or submit a Pull Request。

Pull Request:

  1. Fork code!
  2. Create your own branch: git checkout -b feat/xxxx
  3. Submit your changes: git commit -am 'feat(function): add xxxxx'
  4. Push your branch: git push origin feat/xxxx
  5. submitpull request

Git Contribution submission specification

  • feat Add new features
  • fix Fix the problem/BUG
  • style The code style is related and does not affect the running result
  • perf Optimization/performance improvement
  • refactor Refactor
  • revert Undo edit
  • test Test related
  • docs Documentation/notes
  • chore Dependency update/scaffolding configuration modification etc.
  • workflow Workflow improvements
  • ci Continuous integration
  • types Type definition file changes
  • wip In development

7. To-do list

  • upload & export Excel
  • file upload

8. Contacts

8.1 Groups

QQ group: 1055067008

QQ Group
Enter the QQ group, please do not advertise

Wechat group: comment "join gin-admin exchange group"

Wechat
Add WeChat, note "join gin-admin exchange group"

About Us

9. Donate

If you find this project useful, you can buy author a glass of juice 🍹 here

10. Commercial considerations

This project uses the MIT protocol, and the front-end Framework Vben is also based on the MIT protocol. It is a completely open source and free project and can be used without restrictions

gin-admin's People

Contributors

coderchiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.